GNU bug report logs - #2520
Read configuration file on SIGUSR1

Previous Next

Package: emacs;

Reported by: cmr.Pent <at> gmail.com

Date: Sun, 1 Mar 2009 09:15:03 UTC

Severity: wishlist

Tags: confirmed

Full log


Message #17 received at 2520 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: rfrancoise <at> debian.org, cmr.Pent <at> gmail.com, 2520 <at> debbugs.gnu.org
Subject: Re: bug#2520: 23.0.91; Dies on SIGHUP
Date: Sun, 29 Sep 2019 15:59:06 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> 1) emacs -Q. Emacs process starts.
>> 2) pkill -s 1 emacs. Emacs process dies.
>
>> The more appropriate behavior would be to reload the configuration
>> without restarting (i.e. reread X resource values).  This behavior
>> would be especially useful for the daemon mode.
>
> It could make sense, indeed.  It can be pretty problematic as well,
> since most config files read by Emacs (i.e. site-start.el, default.el,
> .emacs) are normally only read a single time per session, and in
> a particular order, at a particular time, so rereading them later on can
> very easily give you unexpected results.
>
> It is a good practice to keep your .emacs file "idempotent", but I think
> such files are the exceptions rather than the rule.  So, yes, it could
> be handy, but it would have to come with big warnings "may not do what
> you expect".

So the suggestion here is to make Emacs re-read ~/.emacs on SIGHUP.  I
think that sounds like a useful feature -- it would allow you to, for
instance, ssh in to a machine, put (server-start) in ~/.emacs, and then
SIGHUP the Emacs process you want to talk to.

It's definitely something I could have used a number of times...  and
re-reading init files on SIGHUP isn't an unusual thing to do.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.