-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(ext): Add Emacsclient as an editor option #158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
Edit: Urgh don't worry about the CI failures, I'll fix them later.
Edit 2: CI fixed :)
@@ -7,6 +7,7 @@ class Editor { | |||
const editors = { | |||
'nvim': new Editor('nvim', false), | |||
'vim': new Editor('vim', false), | |||
'emacsclient': new Editor('emacsclient --alternate-editor= --reuse-frame', true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an Emacs user and I don't know what an Emacs frame is, so I'll just have to trust you on this one. But please let me know if any of these arguments is 'opinionated' and may not work for the wider crowd.
And I'd appreciate a post to Discussions later if it's needed, explaining how this interacts with e.g. https://www.emacswiki.org/emacs/EmacsClient#h5o-5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An Emacs "frame" is what the rest of the world calls a window. An Emacs "window" is what the rest of the world calls a frame. I guess the Emacs usage of window pre-dates the widespread availability of GUIs.
--alternate-editor=
means, if no existing Emacs server is running, start one in the background using the default options, then connect to that.--reuse-frame
means, open the file in an existing Emacs window if one exists, else open a new one.--create-frame
means always use a new window. Some users would prefer that to--reuse-frame
.- We have to specify one of
--reuse-frame
and--create-frame
, because the default is to use the TTY, which I think we definitely don't want.
I'd personally be in favour of naming this entry "Emacs", and removing the existing entry, so that emacsclient
is always used for Emacs. That would be opinionated, though, and I have already lost that argument elsewhere.
ac85c65
to
59a1e10
Compare
`emacsclient` asks an existing Emacs process to open the file. For many users, this is likely to be more appropriate than the existing Emacs option, which always starts a new `emacs` process to edit the email.
Thanks again! Hopefully I can have some time this weekend to publish a new version :) |
Description
Emacsclient asks an existing Emacs process to open the file. For many users, this is likely to be more appropriate than the existing Emacs option, which always starts a new Emacs process to edit the email.
Changes
66fdbed
feat(ext): Add emacsclient as an editor optionemacsclient
asks an existing Emacs process to open the file. For many users, this is likely to be more appropriate than the existing Emacs option, which always starts a newemacs
process to edit the email.Checklist
Is this a breaking change?
No.
Test results
Success.