From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= 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 09:59:10 +0200 Message-ID: <4BDFD3CE.4030700@swipnet.se> References: <3D94147C-CA80-4DB1-AD11-4707C3077275@swipnet.se> <4BDE87A4.5060701@swipnet.se> <4BDF1106.7060200@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 1272967919 7925 80.91.229.12 (4 May 2010 10:11:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 10:11:59 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 04 12:11:57 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 1O9F6b-00078C-29 for ged-emacs-devel@m.gmane.org; Tue, 04 May 2010 12:11:57 +0200 Original-Received: from localhost ([127.0.0.1]:52299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9F6Z-0005bA-8k for ged-emacs-devel@m.gmane.org; Tue, 04 May 2010 06:11:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9F6R-0005Y0-2H for emacs-devel@gnu.org; Tue, 04 May 2010 06:11:47 -0400 Original-Received: from [140.186.70.92] (port=44461 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9F6N-0005UP-Qc for emacs-devel@gnu.org; Tue, 04 May 2010 06:11:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9F6M-0004C3-Rh for emacs-devel@gnu.org; Tue, 04 May 2010 06:11:43 -0400 Original-Received: from smtprelay-h22.telenor.se ([195.54.99.197]:43301) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9D28-0008Sa-V7 for emacs-devel@gnu.org; Tue, 04 May 2010 03:59:18 -0400 Original-Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-h22.telenor.se (Postfix) with ESMTP id 6D045D0B4 for ; Tue, 4 May 2010 09:59:11 +0200 (CEST) X-SENDER-IP: [85.225.45.110] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApdGACpw30tV4S1uPGdsb2JhbACHaZVGDAEBAQE1LbsbhRIE X-IronPort-AV: E=Sophos;i="4.52,325,1270418400"; d="scan'208";a="514452932" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb3.telenor.se with ESMTP; 04 May 2010 09:59:10 +0200 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id 21C347FA05A; Tue, 4 May 2010 09:59:10 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 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:124498 Archived-At: 2010-05-04 04:38, Stefan Monnier skrev: >>>> For this bug report, yes. But for the more general session management >>>> handling, it really is "start where we stopped". >>> But that's the whole problem: what do you define as "where we stopped"? >>> As I said, there are as many current directories as there are buffers. >> Yes there is, it is what getcwd returns. That is where the process is >> started. > > A far cry from "where we stopped". No, according to the OS, that is exactly where the process current directory is when we stop. Where do you say the process current directory is when Emacs stops? Just because Emacs can remember a bunch of directories doesn't men it "has" different current directories. Eamcs does not do chdir, except in subprocesses, so the original process stays in the same directory the whole time. A file dialog can remember where it was when closed last, and by default show that directory again. That doesn't mean that the process now has two current directories. > >> That is the current directory according to the OS. A process can >> only have one current directory, and Emacs is no different. > > But that directory is mostly invisible to Emacs, because Emacs really > doesn't have such a concept (that the OS imposes it on us doesn't make > any difference to it). So what? Session management doesn't care what the processes do internally. Restarting Emacs in the same directory as it stopped always work, but just pointing out a desktop file does not. For example, the directory remembered by *scratch* is not restored. > >>>> Who knows what other/future packages save in the current directory? >>> There's really no such thing as "Emacs's current directory". >> Yes there is, it is what getcwd returns. Anything else is just cosmetics >> and not the current directory of the Emacs process. > > In which way is this getcwd data relevant/useful? It is where Emacs was started, it is where Emacs was stopped, and thus where Emacs should be restarted. Where else should Emacs be restarted? Its not like we didn't do this before, but by the aid of the Gnome session manager. Now the session manager don't do this for us anymore. It is not radically new behavior, it is restoring old behaviour. I don't understand, why would we ever want Emacs to restart in a different directory than where it stopped? You claim there is a bunch of directories to choose from, so we should just give up and not do anything? That is hardly constructive. Jan D.