emacs-devel
[Top][All Lists]
Advanced

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

Saving Emacs sessions


From: Petteri Hintsanen
Subject: Saving Emacs sessions
Date: Mon, 27 Feb 2023 01:48:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hello Emacs devs,

I try to set up per-directory sessions, that is, save separate
.emacs.desktop files to certain directories.

Last time I used these was many years ago, around Emacs 21 or so.  Back
then, if I recall correctly, it was enough to do M-x desktop-save RET
and Emacs would ask for the directory where to save the desktop.  And by
setting (desktop-save-mode 1) in the init file, Emacs would restore the
desktop in the startup directory, should one exist.

With Emacs 28 I assumed the behavior would be the same.  Also the manual
suggests this (chapter 44):

  "If you turn on ‘desktop-save-mode’ in your init file, then when Emacs
   starts, it looks for a saved desktop in the current directory.  (More
   precisely, it looks in the directories specified by ‘desktop-path’,
   and uses the first desktop it finds.)  Thus, you can have separate
   saved desktops in different directories, and the starting directory
   determines which one Emacs reloads."

But with the default configuration, .emacs.desktop is saved into
~/.emacs.d/, and Emacs does not look for a saved desktop in the current
directory at startup.

The reason seems to be that the default value for desktop-path is
("~/.emacs.d/" "~").  It used to have ".", but that was removed in
commit e76f0800d2.

Was there a specific reason for omitting "."?  If yes, I would suggest
to clarify the manual so that it does talk about "current" or "starting
directory" at all.



[After writing this I found out that the manual has been changed in the
current git master.  But I think the issue still persists, see e.g.
misc.texi:2746.]



Thanks,
Petteri




reply via email to

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