Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for major mode change #22

Open
corrafig opened this issue Apr 13, 2021 · 5 comments
Open

Support for major mode change #22

corrafig opened this issue Apr 13, 2021 · 5 comments
Labels
enhancement *sigh* what now? help wanted Ok, this is more than I can manage

Comments

@corrafig
Copy link

My use case:

  1. Have JSON in browser
  2. Select JSON and trigger emacs-everywhere
  3. Change major mode to json-mode
  4. Modify JSON in Emacs
  5. Finish emacs-everywhere and replace text in browser

Is there any way to success in the last step? C-c C-c is not bound anymore to emacs-everywhere, calling emacs-everywhere-finish-or-ctrl-c-ctrl-c neither works.

@tecosaur
Copy link
Owner

This is definitely possible, and probably wouldn't be too hard even.
Unfortunately I'm fairly tight on time at the moment, so the quickest way you could see this would be via a PR 🙂

@tecosaur tecosaur added the enhancement *sigh* what now? label Apr 13, 2021
@eatse21
Copy link

eatse21 commented Dec 4, 2021

Hi,

If you do M-x emacs-everywhere-mode once you’re done with your edit in another mode, you should be able to C-c C-c normally

@tecosaur
Copy link
Owner

I've played around a bit with change-mode-hooks, after-change-mode-hooks, and 'permenant-local, but I haven't been able to get anything to work.

If anybody has ideas, I'd be keen to hear them.

@tecosaur tecosaur added the help wanted Ok, this is more than I can manage label Jan 17, 2022
@timacs
Copy link

timacs commented Jan 21, 2022

Could the functions major-mode-suspend and major-mode-restore be of help here? I mean I'd call major-mode-suspend in step 3 and major-mode-restore before step 5.

Haven't tested that suggestion, sorry. I'm just going to install emacs-everywhere.

@ronisbr
Copy link

ronisbr commented Jan 17, 2023

I could do something like this by:

  1. Enabling the new mode (in my case julia-mode).
  2. Do whatever I need.
  3. Enable org-mode.
  4. Enable emacs-everywhere-mode.
  5. C-c C-c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement *sigh* what now? help wanted Ok, this is more than I can manage
Projects
None yet
Development

No branches or pull requests

5 participants