From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28945: 25.2; desktop auto save timer does not work Date: Sat, 11 Nov 2017 11:58:38 +0200 Message-ID: <831sl5p25t.fsf@gnu.org> References: <87k1znuphh.fsf@gmail.com> <83k1zf5v4y.fsf@gnu.org> <87375sya0w.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1510394354 28367 195.159.176.226 (11 Nov 2017 09:59:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Nov 2017 09:59:14 +0000 (UTC) Cc: 28945-done@debbugs.gnu.org To: Peter Neidhardt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 11 10:59:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDSZ6-0006vQ-NK for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Nov 2017 10:59:04 +0100 Original-Received: from localhost ([::1]:45017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDSZD-0004jw-Ty for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Nov 2017 04:59:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDSZ7-0004jQ-K9 for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2017 04:59:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDSZ4-00027O-IB for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2017 04:59:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54287) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDSZ4-00027E-Ek for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2017 04:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eDSZ4-0007xG-88 for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2017 04:59:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Nov 2017 09:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 28945 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 28945@debbugs.gnu.org, eliz@gnu.org, pe.neidhardt@googlemail.com Original-Received: via spool by 28945-done@debbugs.gnu.org id=D28945.151039432930549 (code D ref 28945); Sat, 11 Nov 2017 09:59:02 +0000 Original-Received: (at 28945-done) by debbugs.gnu.org; 11 Nov 2017 09:58:49 +0000 Original-Received: from localhost ([127.0.0.1]:34734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDSYq-0007wf-PR for submit@debbugs.gnu.org; Sat, 11 Nov 2017 04:58:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDSYp-0007wR-7W for 28945-done@debbugs.gnu.org; Sat, 11 Nov 2017 04:58:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDSYg-0001zH-Nx for 28945-done@debbugs.gnu.org; Sat, 11 Nov 2017 04:58:41 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDSYg-0001zD-Km; Sat, 11 Nov 2017 04:58:38 -0500 Original-Received: from [176.228.60.248] (port=1875 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eDSYf-0001YA-Rk; Sat, 11 Nov 2017 04:58:38 -0500 In-reply-to: <87375sya0w.fsf@gmail.com> (message from Peter Neidhardt on Sun, 05 Nov 2017 17:18:07 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139751 Archived-At: > From: Peter Neidhardt > Cc: 28945@debbugs.gnu.org > Date: Sun, 05 Nov 2017 17:18:07 +0100 > > > I tried this recipe, but couldn't reproduce the problem. I wonder > > what was missing from my reproduction experiment. My .emacs for this > > experiment had only one line: > > > > (desktop-save-mode 1) > > > > Is this different from what you tried? In my case, the timer is still > > there after restarting Emacs. > > You are right, there is more to trigger the issue: > > (desktop-save-mode 1) > (global-linum-mode) You may wish to try the new native display of line numbers in Emacs 26, which doesn't have this problem (and is significantly faster). > What happens is that during intialization, > window-configuration-change-hook is mode buffer-local by > global-linum-mode. After init, desktop.el loads the desktop session, at > which point the window-configuration-change-hook is still buffer-local > and `desktop-read' fails. Thanks, now everything is clear. I installed your suggested fix into the release branch, and I'm marking this bug done. > >> Lastly, a minor nit: desktop.el adds a lambda to `after-init-hook'; can > >> we turn this into a named function? > > > > Why is that important? This hook runs long before the user starts > > interacting with Emacs, so there doesn't seem to be any good reason > > for the user to look into what this function does. Or am I missing > > something? > > It is for debugging problems such as this one. While investigating > after-init-hook, I saw that value: > #[0 "\303\211\235\203\304\"\301\305!\210\210 \205\306 \210\307\211\207" > [command-line-args desktop-save-mode inhibit-startup-screen "--no-desktop" delete 0 desktop-read t] > 4]) > > Thankfully the word "desktop" is mentioned, otherwise it would have been > hard to get the hunch that something was executed afterwards regarding > the desktop. > > Function names make for good documentation, they make the > self-documentation more meaningful. Yes, but that's an argument against _any_ use of lambda functions in Emacs (because we don't really have opaque APIs). So I'm not sure we need to convert this to a named function.