all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Stephen J. Turnbull" <stephen@xemacs.org>,
	"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 16:26:47 +0200	[thread overview]
Message-ID: <4BE02EA7.2070102@swipnet.se> (raw)
In-Reply-To: <jwvfx27rd3a.fsf-monnier+emacs@gnu.org>

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.






  reply	other threads:[~2010-05-04 14:26 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
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. [this message]
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=4BE02EA7.2070102@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stephen@xemacs.org \
    /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.