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: emacs.desktop non-functional Date: Sat, 19 Mar 2016 10:14:07 +0200 Message-ID: <83io0i9968.fsf@gnu.org> References: <56EA0AA1.2020101@mousecar.com> <83fuvpai3i.fsf@gnu.org> <56EB1C37.3030308@mousecar.com> <8360wk9pvb.fsf@gnu.org> <56EC5550.5030801@mousecar.com> <83lh5f8rn2.fsf@gnu.org> <56ECACE1.4090005@mousecar.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1458375295 18424 80.91.229.3 (19 Mar 2016 08:14:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 08:14:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 19 09:14:51 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 1ahC26-0004AO-7y for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Mar 2016 09:14:50 +0100 Original-Received: from localhost ([::1]:47882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahC25-0007AJ-Fk for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Mar 2016 04:14:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahC1u-0007A8-TY for help-gnu-emacs@gnu.org; Sat, 19 Mar 2016 04:14:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahC1r-0007w5-N4 for help-gnu-emacs@gnu.org; Sat, 19 Mar 2016 04:14:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahC1r-0007w0-J9 for help-gnu-emacs@gnu.org; Sat, 19 Mar 2016 04:14:35 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2170 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ahC1q-0000iQ-U4 for help-gnu-emacs@gnu.org; Sat, 19 Mar 2016 04:14:35 -0400 In-reply-to: <56ECACE1.4090005@mousecar.com> (message from ken on Fri, 18 Mar 2016 21:35:29 -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.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109633 Archived-At: > From: ken > Date: Fri, 18 Mar 2016 21:35:29 -0400 > > > I asked the questions and hoped that I will get detailed answers. > > Like how do you invoke Emacs, in which directory, etc. This is > > important information that is supposed to lead to the problem. > > There's an icon in the Applications menu that I click on when I have to. > But "emacs" is also in that group of applications which gnome starts > automatically. In what directory does Emacs start when you do any of these? Also, if you start it by typing "emacs &" from a shell prompt, when your current directory is the one of the .emacs.desktop file, does Emacs restore all the buffers in that .emacs.desktop file? > >> "Use the desktop library to save the state of Emacs from one session to > >> another. Once you save the Emacs desktop—the buffers, their file names, > >> major modes, buffer positions, and so on—then subsequent Emacs sessions > >> reload the saved desktop. By default, the desktop also tries to save the > >> frame and window configuration...." > >> > >> It doesn't do any of that. > > Does your emacs do all of that? Yes. > > Please note that the manual on-line is for version 24.5, whereas you > > have 24.3. So not all of what is described is supposed to be working > > in your version. Perhaps consider upgrading to 24.5. > > The functionality is the same, so it's not necessary for that sreason. I don't understand what you are saying here. In Emacs 24.5, frame and window configuration is also saved and restored, which doesn't happen in 24.3. So the text you quote above is only accurate for the version later than what you have. Emacs 24.3 is not supposed to restore the frames and windows from the last session, only the buffers. (AFAIU, it doesn't do even that in your case.) > > What if you invoke desktop-read by hand -- does that restore the > > previous session's buffers? > > No. No new buffers, just all the same ones which were already opened. > > The minibuffer says "Warning: desktop file appears to be in use by PID > 4074. Using it may cause conflicts. Use it anyway?" PID 4074 doesn't > exist... probably from a crashed session. I do see PID 4074 in the list of processes you show, see the last line: $ ps -ef|grep emacs xx 2887 2453 0 Mar17 ? 00:00:00 /usr/bin/emacs --smid=1019c4f12271782266145082947974782600000023660023 --no-splash --chdir=/home/zl --daemon xx 2944 2453 0 Mar17 ? 00:00:00 emacsclient -c --alternate-editor= xx 2951 2944 0 Mar17 ? 00:00:00 emacs --daemon xx 3100 2951 0 Mar17 ? 00:00:00 emacs --daemon xx 3101 2887 0 Mar17 ? 00:00:00 /usr/bin/emacs --smid=1019c4f12271782266145082947974782600000023660023 --no-splash --chdir=/home/zl --daemon xx 4074 2687 0 09:26 ? 00:00:25 emacs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Did some testing. When I open a new buffer and type somethign in it but > before saving the buffer to a file, the buffer name is not to be found > in any of the emacs.desktop files. > > If I then save taht buffer to a file, still nothing-- neither the buffer > name nor its filename-- is saved to any emacs.desktop file. > > So I'm guessing then that if the system suddenly goes down at this > point, there will be no record in .emacs.desktop of that newly opened > file. (This is actually the initial case I'm wondering about.) Is that > how it works for you as well? It does, but it isn't supposed to in Emacs 24.3. In Emacs 24.4, a feature was added whereby the desktop file is auto-saved every now and then, so it will be restored after a crash. Before that, Emacs would only save the data when it exited, and when you manually invoked desktop-save. > This might be strange too: > > $ ps -ef|grep emacs > xx 2887 2453 0 Mar17 ? 00:00:00 /usr/bin/emacs > --smid=1019c4f12271782266145082947974782600000023660023 --no-splash > --chdir=/home/zl --daemon > xx 2944 2453 0 Mar17 ? 00:00:00 emacsclient -c > --alternate-editor= > xx 2951 2944 0 Mar17 ? 00:00:00 emacs --daemon > xx 3100 2951 0 Mar17 ? 00:00:00 emacs --daemon > xx 3101 2887 0 Mar17 ? 00:00:00 /usr/bin/emacs > --smid=1019c4f12271782266145082947974782600000023660023 --no-splash > --chdir=/home/zl --daemon > xx 4074 2687 0 09:26 ? 00:00:25 emacs > > Isn't that a lot of processes for having just four files open? Could be part of your problem. Are all of these run by your user? Which one of those is "the Emacs" which you know you are running? You could find this out by typing M-: (emacs-pid) RET