From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100117: Run kill-emacs when exiting for display closed or SIGTERM/HUP. Date: Tue, 04 May 2010 16:26:47 +0200 Message-ID: <4BE02EA7.2070102@swipnet.se> References: <3D94147C-CA80-4DB1-AD11-4707C3077275@swipnet.se> <4BDE87A4.5060701@swipnet.se> <4BDF1106.7060200@swipnet.se> <87633474hd.fsf@uwakimon.sk.tsukuba.ac.jp> <4BDFD57A.3050808@swipnet.se> <87d3xb7vge.fsf@uwakimon.sk.tsukuba.ac.jp> <4BE0184C.1090902@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1272983232 5832 80.91.229.12 (4 May 2010 14:27:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 14:27:12 +0000 (UTC) Cc: "Stephen J. Turnbull" , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 04 16:27:09 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9J5Z-0006Qf-Ip for ged-emacs-devel@m.gmane.org; Tue, 04 May 2010 16:27:09 +0200 Original-Received: from localhost ([127.0.0.1]:44641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9J5Y-0006Xr-LD for ged-emacs-devel@m.gmane.org; Tue, 04 May 2010 10:27:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9J5S-0006Wf-2e for emacs-devel@gnu.org; Tue, 04 May 2010 10:27:02 -0400 Original-Received: from [140.186.70.92] (port=46831 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9J5O-0006WW-Gw for emacs-devel@gnu.org; Tue, 04 May 2010 10:27:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9J5M-00032A-VI for emacs-devel@gnu.org; Tue, 04 May 2010 10:26:58 -0400 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]:40823) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9J5M-00031v-LG for emacs-devel@gnu.org; Tue, 04 May 2010 10:26:56 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 86AC2E9C28 for ; Tue, 4 May 2010 16:26:55 +0200 (CEST) X-SENDER-IP: [85.225.45.110] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArY6AN7K30tV4S1uPGdsb2JhbACHaZVHDAEBAQE1Lbw/hRME X-IronPort-AV: E=Sophos;i="4.52,327,1270418400"; d="scan'208";a="70436611" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 04 May 2010 16:26:54 +0200 Original-Received: from [10.225.32.35] (unknown [193.45.43.33]) by coolsville.localdomain (Postfix) with ESMTPSA id D6E687FA05A; Tue, 4 May 2010 16:26:51 +0200 (CEST) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124508 Archived-At: On 2010-05-04 15:54, Stefan Monnier wrote: > Yes, --chdir solves partially the problem you encountered. The problem > with that is the "partially". Adding a new feature to *partially* fix > a bug is only a good idea if that bug can't be solved fully some other > way (e.g. by adding a different feature). The --chdir was introduced to restore a feature we had earlier, it is not a new feature. It is a new command line option, but an old feature w.r.t. session management. >> This assumes you are using desktop. If you restart an Emacs without any >> desktop saved, the default directory is still wrong. But with --chdir it >> is not. > > If you don't use desktop, then Emacs is restarted in a completely > different state, so it's really no surprise that the default-directory > in *scratch* is different. It's just a very minor detail in > this respect. It may be to you, but it is not to me. I open files all the time from *scratch* just because the default directory there is right. It is a bug for Emacs not to restore this after a session restart. I'd like desktop.el to be more modular so we could save desktop automatically in the session specific restore data file. I tried once, but it was so hard coded to use just one file, so I gave up. > >> desktop.el would have to add a function to the hook >> emacs-save-session-functions that stores whatever data it needs to >> recover. For example, the desktop file name in use. > > That would sound like The Right Way to solve the problem, don't you think? > It solves another problem, that of not having the desktop file in Emacs current directory. It still does not solve the problem of default directory for buffers like *scratch*. If I start emacs in /some/dir without a desktop file and have desktop-mode enabled, there will be no desktop saved when I log out. When the session manager then restarts Emacs in $HOME it will read my desktop file in $HOME. That is a bug also. Jan D.