From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: desktop-save problems Date: Wed, 13 Jul 2016 23:02:39 +0300 Message-ID: <83poqh8fxc.fsf@gnu.org> References: <576087FA.5020106@mousecar.com> <831t3yebgf.fsf@gnu.org> <57869B44.7050907@mousecar.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468440230 11655 80.91.229.3 (13 Jul 2016 20:03:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2016 20:03:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 13 22:03:43 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNQNg-0005NP-5Q for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jul 2016 22:03:40 +0200 Original-Received: from localhost ([::1]:49695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNQNf-0006tS-JE for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jul 2016 16:03:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNQNE-0006tH-E0 for help-gnu-emacs@gnu.org; Wed, 13 Jul 2016 16:03:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNQN9-0006xf-BT for help-gnu-emacs@gnu.org; Wed, 13 Jul 2016 16:03:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNQN9-0006wd-8e for help-gnu-emacs@gnu.org; Wed, 13 Jul 2016 16:03:07 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1227 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bNQN6-0003xI-JQ for help-gnu-emacs@gnu.org; Wed, 13 Jul 2016 16:03:05 -0400 In-reply-to: <57869B44.7050907@mousecar.com> (message from ken on Wed, 13 Jul 2016 15:49:24 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110818 Archived-At: > From: ken > Date: Wed, 13 Jul 2016 15:49:24 -0400 > > > The way I do it is turn on desktop-save-mode, then Emacs will save the > > desktop when I exit automatically. > > This means that the desktop isn't saved when the system crashes, e.g., > the power suddenly goes out, yes? If this is frequent enough, you can save manually at strategic times. > Also, in my emacs (24.3.1) I'm always prompted for the directory to save > the desktop in. Is there a way to specify one directory where the > desktop is saved so I don't have this prompt come up? It doesn't prompt me, it uses the ~/.emacs.d/ directory by default; the directory from which the desktop was read overrides that. I'm never asked any such questions. Something is wrong with your setup. > >> Second, is there a way for "desktop-save" to be run programmatically > >> whenever I open a new file/buffer or kill a buffer? > > In a new enough version of Emacs, the desktop is periodically saved > > even when no buffer is killed. > > Which version is "new enough"? 24.4 and later. > Also, wouldn't it make more sense for desktop-save to work when file or > buffer is opened or closed? Since we now save periodically, we don't need to resolve this dilemma. > >> *Third, when I use tramp to open a buffer from a remote machine and then > >> do "desktop-save" etc., that buffer name is written into the session > >> file after "(setq file-name-history" but not under ";; Buffer section"; > >> that is, it isn't given a "(desktop-create-buffer" section in the > >> session file. Consequently, when I next time start emacs, none of the > >> buffers opened with tramp previous session are opened. > > Please report this as a bug with a recipe starting from "emacs -Q", > > and all the relevant details. > > Did this. Thanks.