From: Eli Zaretskii <eliz@gnu.org>
To: Petteri Hintsanen <petterih@iki.fi>
Cc: emacs-devel@gnu.org
Subject: Re: Saving Emacs sessions
Date: Mon, 27 Feb 2023 13:33:09 +0200 [thread overview]
Message-ID: <838rgjibre.fsf@gnu.org> (raw)
In-Reply-To: <87fsaskmxk.fsf@iki.fi> (message from Petteri Hintsanen on Mon, 27 Feb 2023 01:48:55 +0200)
> From: Petteri Hintsanen <petterih@iki.fi>
> Date: Mon, 27 Feb 2023 01:48:55 +0200
>
> 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.
"M-x desktop-save" still asks in which directory to save the desktop,
so you can still have that feature.
> 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 "."?
Yes, see bug#10977.
I have desktop-path customized since long ago to start with ".", as I
use this feature a lot. Suggest that you do the same.
> [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.]
Fixed, thanks.
next prev parent reply other threads:[~2023-02-27 11:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-26 23:48 Saving Emacs sessions Petteri Hintsanen
2023-02-27 11:33 ` Eli Zaretskii [this message]
2023-02-27 19:47 ` Petteri Hintsanen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838rgjibre.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=petterih@iki.fi \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).