all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
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	[thread overview]
Message-ID: <4BDFD3CE.4030700@swipnet.se> (raw)
In-Reply-To: <jwvwrvkqtq2.fsf-monnier+emacs@gnu.org>

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.




  reply	other threads:[~2010-05-04  7:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1O8efK-0003y3-Sb@internal.in.savannah.gnu.org>
2010-05-02 19:24 ` [Emacs-diffs] /srv/bzr/emacs/trunk r100117: Run kill-emacs when exiting for display closed or SIGTERM/HUP Stefan Monnier
2010-05-02 20:53   ` Jan Djärv
2010-05-03  0:55     ` Stefan Monnier
2010-05-03  8:21       ` Jan D.
2010-05-03 17:43         ` Stefan Monnier
2010-05-03 18:08           ` Jan Djärv
2010-05-04  2:38             ` Stefan Monnier
2010-05-04  7:59               ` Jan Djärv [this message]
2010-05-04 11:49                 ` Stephen J. Turnbull
2010-05-04 13:03                   ` Jan D.
2010-05-04 13:48                 ` Stefan Monnier
2010-05-04 14:42                   ` Jan D.
2010-05-04  3:03             ` Stephen J. Turnbull
2010-05-04  8:06               ` Jan Djärv
2010-05-04 11:33                 ` Stephen J. Turnbull
2010-05-04 12:51                   ` Jan D.
2010-05-04 13:54                     ` Stefan Monnier
2010-05-04 14:26                       ` Jan D.
2010-05-04 18:50                         ` Stefan Monnier
2010-05-05  5:17                           ` Stephen J. Turnbull
2010-05-05  7:21                           ` Jan Djärv
2010-05-05 14:00                             ` Stefan Monnier
2010-05-05 16:18                               ` Jan Djärv
2010-05-05 18:24                                 ` Stefan Monnier
2010-05-04 16:45                 ` Juri Linkov
2010-05-04 18:50                   ` Jan Djärv
2010-05-04 19:55                     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BDFD3CE.4030700@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.