From: Eli Zaretskii <eliz@gnu.org>
To: Peter Neidhardt <pe.neidhardt@googlemail.com>
Cc: 28945-done@debbugs.gnu.org
Subject: bug#28945: 25.2; desktop auto save timer does not work
Date: Sat, 11 Nov 2017 11:58:38 +0200 [thread overview]
Message-ID: <831sl5p25t.fsf@gnu.org> (raw)
In-Reply-To: <87375sya0w.fsf@gmail.com> (message from Peter Neidhardt on Sun, 05 Nov 2017 17:18:07 +0100)
> From: Peter Neidhardt <pe.neidhardt@googlemail.com>
> 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.
next prev parent reply other threads:[~2017-11-11 9:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-22 16:19 bug#28945: 25.2; desktop auto save timer does not work Peter Neidhardt
2017-10-22 17:11 ` Eli Zaretskii
2017-10-22 17:41 ` Peter Neidhardt
2017-10-22 17:58 ` Eli Zaretskii
2017-10-23 19:28 ` Peter Neidhardt
2017-10-23 19:35 ` Eli Zaretskii
2017-10-23 19:57 ` Peter Neidhardt
2017-10-23 20:02 ` Eli Zaretskii
2017-10-24 21:46 ` Richard Stallman
2017-10-25 2:32 ` Eli Zaretskii
2017-10-26 3:42 ` Richard Stallman
2017-10-26 10:01 ` Pierre Neidhardt
2017-10-27 2:42 ` Richard Stallman
2017-10-27 9:12 ` Eli Zaretskii
2017-10-28 21:49 ` Richard Stallman
2017-10-26 15:53 ` Eli Zaretskii
2017-10-26 16:19 ` Drew Adams
2017-10-26 17:10 ` Eli Zaretskii
2017-10-26 18:28 ` Drew Adams
2017-10-26 18:46 ` Eli Zaretskii
2017-10-28 12:12 ` Eli Zaretskii
2017-11-05 16:18 ` Peter Neidhardt
2017-11-11 9:58 ` Eli Zaretskii [this message]
2017-11-11 11:59 ` Peter Neidhardt
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=831sl5p25t.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=28945-done@debbugs.gnu.org \
--cc=pe.neidhardt@googlemail.com \
/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).