![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Yes, it is as awesome as it sounds.*
1) Set up emacs to start as a daemon (ideally as part of your .profile or .xinitrc or something so
it's up and running whenever you're logged in):
$ emacs --daemon
This by itself is an amazing thing. It only reads in your config file, etc. once and sets it all up
behind the scenes, and then you can connect to it with
$ emacsclient -c
and it'll open up an emacs window for you all ready to go. Yes. Fast enough to
compete with vi.
2) There's a catch: you have to be using a browser that lets you edit in an outside editor.
Conkeror does, but I have no idea about anything else. Anyway, set it up to run emacsclient -c
With conkeror, in my .conkerorrc I added the following:
editor_shell_command = "emacsclient -c"
It might also work if you set your environmental EDITOR command (and this is good for other programs
that automatically open an editor for you, too!)
export EDITOR="emacsclient -c"
3) When you invoke the external editor, it'll start it up and connect to the daemon, and BAM,
nigh-instant editing joy! To close the frame, use C-x 5 0; to close the buffer when you're done
editing and commit the changes back to the browser, you can also use C-x #.
It's a little bit fraught with peril, however; I'm seeing weird behavior if I open up another
client--or even another document in the same client!--in the middle of editing a text area. It's
like it doesn't make the association to let the browser know "Hey I'm done here's your text!". I
lost this entryonce twice as a result. Fortunately, conkeror opens a NEW temp file in
your temp directory each time, so I was able to just retrieve the text from the previous one once I
figured out that I needed to open the other client first. Annoying, but I can live with it,
especially since I almost always have an emacs client up already anyway.
Also, you'll probably want to disable fill-mode. You might want to add a hook automatically
disabling fill-mode for text files anyway; I find that it's more annoying than useful much of the
time...
4) THERE IS NO STEP FOUR XD
*I'm totally doing it right now!!!
1) Set up emacs to start as a daemon (ideally as part of your .profile or .xinitrc or something so
it's up and running whenever you're logged in):
$ emacs --daemon
This by itself is an amazing thing. It only reads in your config file, etc. once and sets it all up
behind the scenes, and then you can connect to it with
$ emacsclient -c
and it'll open up an emacs window for you all ready to go. Yes. Fast enough to
compete with vi.
2) There's a catch: you have to be using a browser that lets you edit in an outside editor.
Conkeror does, but I have no idea about anything else. Anyway, set it up to run emacsclient -c
With conkeror, in my .conkerorrc I added the following:
editor_shell_command = "emacsclient -c"
It might also work if you set your environmental EDITOR command (and this is good for other programs
that automatically open an editor for you, too!)
export EDITOR="emacsclient -c"
3) When you invoke the external editor, it'll start it up and connect to the daemon, and BAM,
nigh-instant editing joy! To close the frame, use C-x 5 0; to close the buffer when you're done
editing and commit the changes back to the browser, you can also use C-x #.
It's a little bit fraught with peril, however; I'm seeing weird behavior if I open up another
client--or even another document in the same client!--in the middle of editing a text area. It's
like it doesn't make the association to let the browser know "Hey I'm done here's your text!". I
lost this entry
your temp directory each time, so I was able to just retrieve the text from the previous one once I
figured out that I needed to open the other client first. Annoying, but I can live with it,
especially since I almost always have an emacs client up already anyway.
Also, you'll probably want to disable fill-mode. You might want to add a hook automatically
disabling fill-mode for text files anyway; I find that it's more annoying than useful much of the
time...
4) THERE IS NO STEP FOUR XD
*I'm totally doing it right now!!!
no subject
Date: 2012-02-20 09:43 am (UTC)