[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100117: Run kill-emacs when exit

From: Jan Djärv
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
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100423 Thunderbird/3.0.4

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

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]