* Restarting Emacs? @ 2009-07-29 11:53 Elena 2009-07-29 22:13 ` Giorgos Keramidas ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: Elena @ 2009-07-29 11:53 UTC (permalink / raw) To: help-gnu-emacs Hello, can you make Emacs restart itself a la Firefox (for instance: after an heavy update of initialization file)? Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Restarting Emacs? 2009-07-29 11:53 Restarting Emacs? Elena @ 2009-07-29 22:13 ` Giorgos Keramidas 2009-07-29 22:57 ` Ian Eure ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Giorgos Keramidas @ 2009-07-29 22:13 UTC (permalink / raw) To: help-gnu-emacs On Wed, 29 Jul 2009 04:53:54 -0700 (PDT), Elena <egarrulo@gmail.com> wrote: > Hello, > can you make Emacs restart itself a la Firefox (for instance: after an > heavy update of initialization file)? Not really, no. At least not _exactly_ what Firefox does, AFAICT. You can, however, evaluate Lisp snippets in a *scratch* buffer as you are editing your start-up code. I often pull my `~/.gnus.el' in the *scratch* buffer; copy parts of the Lisp code; then I modify them and evaluate them in order (by typing `C-x C-e' after one or more s-exps). When everything works I save the new Lisp code in my `~/.gnus.el' file for later. Now, if what you want is some sort of `session' support in Emacs, to save a set of open buffers, and other runtime state, the `desktop' library may be useful. It is available in GNU Emacs 22 and it supports parts of what Firefox does for GNU Emacs buffers. See the manual for full details. Look for the word `desktop' in the index of the manual, and you'll quickly find this section: ,---[ C-h r i desktop RET ]-------------------------------------------- | | 51 Saving Emacs Sessions | ************************ | | Use the desktop library to save the state of Emacs from one session to | another. Once you save the Emacs "desktop"--the buffers, their file | names, major modes, buffer positions, and so on--then subsequent Emacs | sessions reload the saved desktop. | | ... | `----------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Restarting Emacs? 2009-07-29 11:53 Restarting Emacs? Elena 2009-07-29 22:13 ` Giorgos Keramidas @ 2009-07-29 22:57 ` Ian Eure 2009-07-30 0:08 ` Sven Bretfeld 2009-07-30 0:21 ` Lennart Borgman [not found] ` <mailman.3422.1248908240.2239.help-gnu-emacs@gnu.org> 3 siblings, 1 reply; 7+ messages in thread From: Ian Eure @ 2009-07-29 22:57 UTC (permalink / raw) To: Elena; +Cc: help-gnu-emacs On Jul 29, 2009, at 4:53 AM, Elena wrote: > Hello, > > can you make Emacs restart itself a la Firefox (for instance: after an > heavy update of initialization file)? > Why would you want to do that when you could just eval-buffer the new init file? - Ian ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Restarting Emacs? 2009-07-29 22:57 ` Ian Eure @ 2009-07-30 0:08 ` Sven Bretfeld 0 siblings, 0 replies; 7+ messages in thread From: Sven Bretfeld @ 2009-07-30 0:08 UTC (permalink / raw) To: help-gnu-emacs Ian Eure <ian@digg.com> writes: > On Jul 29, 2009, at 4:53 AM, Elena wrote: > >> can you make Emacs restart itself a la Firefox (for instance: after an >> heavy update of initialization file)? >> > Why would you want to do that when you could just eval-buffer the new > init file? For example, because you have defined a keybinding and you want to get rid of it again. Deleting the code and evaluating the buffer wouldn't delete the keybinding, would it? Sven -- Sven Bretfeld \ CEntrum für CERES \ REligionswissenschaftliche ________\_Studien__________________ Ruhr-Universität Bochum Universitätsstraße 150 D-44780 Bochum http://www.ruhr-uni-bochum.de/relwiss/Lehrstuhl/Mitarbeitende/Bretfeld.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Restarting Emacs? 2009-07-29 11:53 Restarting Emacs? Elena 2009-07-29 22:13 ` Giorgos Keramidas 2009-07-29 22:57 ` Ian Eure @ 2009-07-30 0:21 ` Lennart Borgman 2009-07-30 1:59 ` Lennart Borgman [not found] ` <mailman.3422.1248908240.2239.help-gnu-emacs@gnu.org> 3 siblings, 1 reply; 7+ messages in thread From: Lennart Borgman @ 2009-07-30 0:21 UTC (permalink / raw) To: Elena; +Cc: help-gnu-emacs On Wed, Jul 29, 2009 at 1:53 PM, Elena<egarrulo@gmail.com> wrote: > Hello, > > can you make Emacs restart itself a la Firefox (for instance: after an > heavy update of initialization file)? You mean with all the files you have opened etc? For that you can use desktop-mode. Stopping and starting Emacs itself by hand is not a very big problem, or? If you think so then you could write a function that does: 1) adds a function that start a new Emacs instance last in the hook kill-emacs-hook. 2) Kills emacs ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Restarting Emacs? 2009-07-30 0:21 ` Lennart Borgman @ 2009-07-30 1:59 ` Lennart Borgman 0 siblings, 0 replies; 7+ messages in thread From: Lennart Borgman @ 2009-07-30 1:59 UTC (permalink / raw) To: Elena; +Cc: help-gnu-emacs On Thu, Jul 30, 2009 at 2:21 AM, Lennart Borgman<lennart.borgman@gmail.com> wrote: > On Wed, Jul 29, 2009 at 1:53 PM, Elena<egarrulo@gmail.com> wrote: >> Hello, >> >> can you make Emacs restart itself a la Firefox (for instance: after an >> heavy update of initialization file)? > > > You mean with all the files you have opened etc? For that you can use > desktop-mode. > > Stopping and starting Emacs itself by hand is not a very big problem, > or? If you think so then you could write a function that does: > > 1) adds a function that start a new Emacs instance last in the hook > kill-emacs-hook. > 2) Kills emacs Kind of unnecessary, but ... I wrote a function emacs-restart that you can grab from the file ourcomments-util.el in nXhtml (currently only in the Launchpad repository). ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.3422.1248908240.2239.help-gnu-emacs@gnu.org>]
* Re: Restarting Emacs? [not found] ` <mailman.3422.1248908240.2239.help-gnu-emacs@gnu.org> @ 2009-07-30 7:49 ` Elena 0 siblings, 0 replies; 7+ messages in thread From: Elena @ 2009-07-30 7:49 UTC (permalink / raw) To: help-gnu-emacs On 29 Lug, 22:57, Ian Eure <i...@digg.com> wrote: > On Jul 29, 2009, at 4:53 AM, Elena wrote: > > > Hello, > > > can you make Emacs restart itself a la Firefox (for instance: after an > > heavy update of initialization file)? > > Why would you want to do that when you could just eval-buffer the new > init file? > > - Ian Because I share same Emacs configuration files both at work and at home. Whenever I modify some file at home, before leaving I synchronize them with a copy on a USB stick. When I'm back to work I have to synchronize them back and restart Emacs. Therefore I was looking for a way to write a function to automate such task from Emacs itself. Furthermore, I was thinking about writing a module which would look for updates of currently installed modules and automatically downloading them and restarting Emacs... ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-30 7:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-29 11:53 Restarting Emacs? Elena 2009-07-29 22:13 ` Giorgos Keramidas 2009-07-29 22:57 ` Ian Eure 2009-07-30 0:08 ` Sven Bretfeld 2009-07-30 0:21 ` Lennart Borgman 2009-07-30 1:59 ` Lennart Borgman [not found] ` <mailman.3422.1248908240.2239.help-gnu-emacs@gnu.org> 2009-07-30 7:49 ` Elena
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.