I've been slowly learning elisp and new commands for emacs, and have been steadily building up my .emacs. Having to keep a console open to repeatedly open and close an instance of emacs seems sub-optimal for testing, but running emacs -nw from within emacs throws a "standard input is not a tty" error. Is there any way to do this correctly? If not, is Reload .emacs for all active buffers still the recommended way to reapply settings from .emacs and the other init files?
-
All the caveats from the linked Q&A apply, meaning that how you modify and re-apply a given setting necessarily depends on the nature of that setting. However if you do need to revert your file buffers, the linked answer is certainly still an easy way to do that. – phils Jun 17 '13 at 23:55
1 Answers
As wvxvw mentioned, you can eval
the settings in your *scratch*
buffer, or through some other method (e.g. ielm). This generally makes the appropriate change. Sometimes you need to toggle the major mode to see the changes.
But, sometimes it just easier/cleaner to restart from scratch.
With that in mind (starting from scratch), it looks like you're comfortable running Emacs in terminal mode, so one way to skin this cat would be to start your initial run also in terminal mode, then exit and restart - with the addition of:
(require 'saveplace)
(setq save-place t)
Then, when you invoke Emacs and view your .emacs
file, you'll be right at the point where you last made changes. Just change your invocation to something like:
emacs -nw ~/.emacs
Of course you could also use a heavier-weight package, such as desktop to keep track of the open files/buffers.
Running in terminal mode has the added benefit of not having to move your hands from the keyboard - which you might have to do if you run Emacs graphically (depending on window manager settings).
Of course, if your Emacs takes a long time to load, it might be worth checking out some of the non-emacsclient solutions to the SO question "How can I make Emacs start-up faster?".

- 1
- 1

- 73,529
- 11
- 197
- 229