From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Saving Emacs sessions Date: Mon, 27 Feb 2023 13:33:09 +0200 Message-ID: <838rgjibre.fsf@gnu.org> References: <87fsaskmxk.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33122"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Petteri Hintsanen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 27 12:33:41 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pWblE-0008RG-Qy for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Feb 2023 12:33:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWbkf-0003GD-R1; Mon, 27 Feb 2023 06:33:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWbke-0003DJ-6C for emacs-devel@gnu.org; Mon, 27 Feb 2023 06:33:04 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWbkc-0004wT-R7; Mon, 27 Feb 2023 06:33:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=aJIgEvpjnEKsAWh2pGztBpeLaC5wsOHSscuFA7rEGNI=; b=nQxH3kIUBMZgKvja+ZRU Gf6b32DO40DIkgXNj76SiY0+KUTo2ZG8FCMpLheVN2PMr8Goz97mMq/mWwVQJqEKqZ8gynWwln9lo 1EDpEaHJr7vrAjhrcZe+Zt7ig+m57vxt0zJK58LkJYQ1gZ4uzNIrtQfYMO6AdQP6qGuOLQycpmtAp R0ynMRHnr/m7pEXO7OCmKJ3IYBacd5pDKQflfZjydp5qFNqB7smujA84+unZ8ejxVYsdEfawpoZG5 3CKtJ2Qq4R41FmzxLhEEActz3WnlRmTD9s7WDLPQvg1+X/DdfQEawDb6f1NlEy5OQj7877IfIaiav WFKWujW1/dCy2A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWbkb-0005sU-Dz; Mon, 27 Feb 2023 06:33:02 -0500 In-Reply-To: <87fsaskmxk.fsf@iki.fi> (message from Petteri Hintsanen on Mon, 27 Feb 2023 01:48:55 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303830 Archived-At: > From: Petteri Hintsanen > 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.