From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 12:42:32 2017 Received: (at submit) by debbugs.gnu.org; 22 Oct 2017 16:42:32 +0000 Received: from localhost ([127.0.0.1]:56120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6JKa-0001Qu-50 for submit@debbugs.gnu.org; Sun, 22 Oct 2017 12:42:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6IyC-0000qa-EE for submit@debbugs.gnu.org; Sun, 22 Oct 2017 12:19:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6Iy5-0007JT-SA for submit@debbugs.gnu.org; Sun, 22 Oct 2017 12:19:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6Iy5-0007JK-Or for submit@debbugs.gnu.org; Sun, 22 Oct 2017 12:19:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6Iy4-0000Y5-Dy for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 12:19:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6Iy1-0007Fe-9S for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 12:19:16 -0400 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:52722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6Iy0-0007ET-Ut for bug-gnu-emacs@gnu.org; Sun, 22 Oct 2017 12:19:13 -0400 Received: by mail-wm0-x22b.google.com with SMTP id 78so2823327wmb.1 for ; Sun, 22 Oct 2017 09:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:user-agent:to:subject:message-id:date:mime-version; bh=9rVd9MkKVNU7bqx/c9/J0JHd8SkzmMg5zIM/Nap6ZE0=; b=qN1tpLwa/2NI1EMNtBGd6Fslz2F+kIEzXRlyADEWz4dLjLzWUWjFi6MvribfAf+/0Y J4SsenyJ3Hhu6fBWGLZ15AFwAHODSKtUPA32x3TRDZIpFuY13R0E+whGXgWCk8y/c8zK qtXIUp4EYD8a8pc0DnxLHwDWbt4+bGwlPaCoo5tmfVSSY4Ow8Go8/CVjN8wfxdKCgPRY sWXNOVaTuHCTAb/LYQsm7cqQH88f0JshpMHnre5azhlvjho0fy/PF6J9MVVFDwIgI41E MYc0yJhNF/lsJtlSY8pXq7TB1JqGUD0cup8SF0ewOH/mFv4Je62+5l2YzYHwlQlN55Vc SnNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:user-agent:to:subject:message-id:date :mime-version; bh=9rVd9MkKVNU7bqx/c9/J0JHd8SkzmMg5zIM/Nap6ZE0=; b=I+8FMM63lVA4lLKNsdLc+6i76cBcT9VhQXutV59FH/W80JF3Fgk6m9J3ULLeZ2Hi67 74J4LHcnudBXixJLBPOw15kXNXwYRB3DkodRbhezxzawd6fLMAurHFYdcUdkccXupbwU fSAbiDoXX30NpkDAKeXleAx4cwzblReSjr+uYi4wxMn1+gojRvz2nyFj8UTKL18U6zIr pH275dvyaKCiiWKSLycEbfhi30SMLEjL8CP0vq626e1+ggsi269Xx9PggWzA2Xv2Encl vj99JxmFML/P6x+MXV8zdXi5hUngCB8/iYYcpTY1PV9lRbJ5zvw3t02mW3TyUbUBnPp0 r6PA== X-Gm-Message-State: AMCzsaWy7mw3D21FvyT3rRDbipfMhPjVwkTpabCETy8qM5mrOe6Tlqhi PJzpZmLZSXsflQfEvfU12miLnw== X-Google-Smtp-Source: ABhQp+SxYWG7LquPWqC+wJ+37RS6R77dScaPyI/eLt50z/90LYc4BkRxa8xo5O+3QVC29egBhJDfgA== X-Received: by 10.28.128.194 with SMTP id b185mr3270677wmd.152.1508689150010; Sun, 22 Oct 2017 09:19:10 -0700 (PDT) Received: from dhiov23k ([197.1.53.85]) by smtp.gmail.com with ESMTPSA id 5sm10170732wrt.59.2017.10.22.09.19.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Oct 2017 09:19:09 -0700 (PDT) From: Peter Neidhardt X-Google-Original-From: Peter Neidhardt User-agent: mu4e 0.9.18; emacs 25.2.1 To: bug-gnu-emacs@gnu.org Subject: 25.2; desktop auto save timer does not work Message-ID: <87k1znuphh.fsf@gmail.com> Date: Sun, 22 Oct 2017 17:19:07 +0100 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 22 Oct 2017 12:42:30 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Recipe: - Add (desktop-save-mode) to your init.el. - Start Emacs. Check the value of `window-configuration-change-hook': the _global_ value should contain `desktop-auto-save-set-timer'. - Save the desktop. - Quit Emacs. - Restart Emacs. - Check `window-configuration-change-hook': the timer is gone. I've narrowed down the issue to `desktop-read': ;; ... (setq desktop-autosave-was-enabled (memq 'desktop-auto-save-set-timer 'window-configuration-change-hook)) (desktop-auto-save-disable) ;; ... (if desktop-autosave-was-enabled (desktop-auto-save-enable)) The check is done on the _local_ value of `window-configuration-change-hook', thus `desktop-auto-save-enable' will never be re-run. The fix is as simple as (setq desktop-autosave-was-enabled (memq 'desktop-auto-save-set-timer (default-toplevel-value 'window-configuration-change-hook))) I've been annoyed by this issue for years but before today I could not find the logic behind the issue and did not know what to report. The issue effectively makes desktop-mode half-useless since desktop won't be saved when Emacs gets killed too abruptly (crashes, power outage...). Did nobody notice this before or is it that nobody could figure out the logic like me? While we are at it, we might change the documentation and value of `desktop-auto-save-timeout': Number of seconds idle time before auto-save of the desktop. The idle timer activates auto-saving only when window configuration changes. This is terribly confusing, isn't it? One might wonder whether it's a timer that saves every 30 seconds or the configuration change. The actual logic is as follow: - On every window configuration change, the timer is _reset_. - When idle for `desktop-auto-save-timeout', the desktop is saved. The timer is run only _once_. In practice, this means that the user actually be idle for 30 seconds or else it won't get saved at all. Does this happen a lot in practice? I'm don't think so. Considering the timer runs only once per window conf change, it does not run very often, in particular it runs only once when nothing is happening. So I think it's wiser to set the default to something much lower, say 5 or 10. Lastly, a minor nit: desktop.el adds a lambda to `after-init-hook'; can we turn this into a named function? In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16) of 2017-09-02 built on dhiov23k Windowing system distributor 'The X.Org Foundation', version 11.0.11905000 System Description: Gentoo Base System release 2.4.1 Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/emacs-25.2 --htmldir=/usr/share/doc/emacs-25.2/html --libdir=/usr/lib64 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --with-gameuser=:gamestat --without-compress-install --with-file-notification=inotify --enable-acl --without-dbus --without-modules --without-gpm --without-hesiod --without-kerberos --without-kerberos5 --with-xml2 --without-selinux --with-gnutls --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick --with-xft --without-cairo --without-libotf --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets GENTOO_PACKAGE=app-editors/emacs-25.2 'CFLAGS=-march=ivybridge -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB GTK3 X11 Important settings: value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: Debbugs Minor modes in effect: semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode) S))) recentf-mode: t pdf-occur-global-minor-mode: t helm-top-poll-mode: t dired-async-mode: t helm-mode: t diff-auto-refine-mode: t helm-descbinds-mode: t global-evil-mc-extras-mode: t evil-mc-extras-mode: t global-evil-mc-mode: t evil-mc-mode: t async-bytecomp-package-mode: t global-undo-tree-mode: t undo-tree-mode: t shell-dirtrack-mode: t evil-mode: t evil-local-mode: t show-paren-mode: t savehist-mode: t save-place-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t window-divider-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t size-indication-mode: t line-number-mode: t transient-mark-mode: t From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 13:12:09 2017 Received: (at 28945) by debbugs.gnu.org; 22 Oct 2017 17:12:09 +0000 Received: from localhost ([127.0.0.1]:56145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6JnF-00041o-Et for submit@debbugs.gnu.org; Sun, 22 Oct 2017 13:12:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:32947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6JnD-00041b-JX for 28945@debbugs.gnu.org; Sun, 22 Oct 2017 13:12:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6Jn4-0002zQ-PU for 28945@debbugs.gnu.org; Sun, 22 Oct 2017 13:12:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6Jn4-0002zE-M9; Sun, 22 Oct 2017 13:11:58 -0400 Received: from [176.228.60.248] (port=1697 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e6Jn4-0000nd-1r; Sun, 22 Oct 2017 13:11:58 -0400 Date: Sun, 22 Oct 2017 20:11:53 +0300 Message-Id: <8360b7ayzq.fsf@gnu.org> From: Eli Zaretskii To: Peter Neidhardt In-reply-to: <87k1znuphh.fsf@gmail.com> (message from Peter Neidhardt on Sun, 22 Oct 2017 17:19:07 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Peter Neidhardt > Date: Sun, 22 Oct 2017 17:19:07 +0100 > > Recipe: > > - Add (desktop-save-mode) to your init.el. > > - Start Emacs. Check the value of `window-configuration-change-hook': > the _global_ value should contain `desktop-auto-save-set-timer'. > > - Save the desktop. > > - Quit Emacs. > > - Restart Emacs. > > - Check `window-configuration-change-hook': the timer is gone. Thank you for your report and analysis. I need to read this carefully, so for now just one comment about something that you only touch tangentially: > The actual logic is as follow: > > - On every window configuration change, the timer is _reset_. > > - When idle for `desktop-auto-save-timeout', the desktop is saved. The > timer is run only _once_. > > In practice, this means that the user actually be idle for 30 seconds or > else it won't get saved at all. Does this happen a lot in practice? > I'm don't think so. Considering the timer runs only once per window > conf change, it does not run very often, in particular it runs only once > when nothing is happening. > > So I think it's wiser to set the default to something much lower, say 5 > or 10. IME, that would be a mistake. The problem with your logic is twofold: . "window configuration change" is actually something that happens a lot in a live Emacs session, because any change in windows layout, dimensions, the buffers they display, their values of point, etc. -- all of these constitute such a change. . saving a desktop in a large multi-frame session is expensive. What this boils down to is that every automatic desktop-save produces an annoying "hiccup" in Emacs responsiveness. This is the main reason why I disabled the desktop timer long ago, and save the desktop from a midnight.el hook, once every day. Yes, this means that I can lose some of my configuration due to a crash, but (a) Emacs doesn't crash so frequently, and (b) my sessions are organized in a way that makes sure the loss is minimal, mainly some files that were visited will need to be re-visited manually. So if we are going to discuss the timer, I'd actually recommend making the interval longer, not shorter, if only because auto-saving desktop more often than we auto-save our edits (see auto-save-interval) makes little sense to me. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 13:42:00 2017 Received: (at 28945) by debbugs.gnu.org; 22 Oct 2017 17:42:00 +0000 Received: from localhost ([127.0.0.1]:56158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6KG8-0004mW-6z for submit@debbugs.gnu.org; Sun, 22 Oct 2017 13:42:00 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:49537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6KG7-0004mC-8g for 28945@debbugs.gnu.org; Sun, 22 Oct 2017 13:41:59 -0400 Received: by mail-wm0-f47.google.com with SMTP id b189so5598207wmd.4 for <28945@debbugs.gnu.org>; Sun, 22 Oct 2017 10:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:references:user-agent:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ptdgGJTMfX+SxcAIKkPuMkPnz/XF39nZjiaO8hi804g=; b=rqAWMmUsdFy+ADgbA6tQpangcRrVKe3idi15ugfQLOqi8yREgBClx+YDZ41ovQVSKU AetU6CqyjI1CS2+9F3lSF+Ny4z2ChHp/dpmgwq6bUPzw68rhDrnfDw3e7rtlOonedXLq XRKcw0a+K1tSIVqQg2JhhBKiZbOBF/4ReDtn8Ulb+2A8D98QObIzpZxGZfWyIkZ8CmHa mzw6fgHnWd/hl0HNX42N9svJXyoAEj0J/l7rv4PVcDJXohUz80xer7ac7lFaFyx3EjG6 7EOY3r1Yg5sHXIEXPo4Np2mOJSH2Q1Pb5ZCIwObc6Q9Nyp7vUaD73cZ8jrO1Z7nxww6H COcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:user-agent:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ptdgGJTMfX+SxcAIKkPuMkPnz/XF39nZjiaO8hi804g=; b=epa1dsXMM49IlButzXeWX5P0w5IL7P+eEjxOmWS70OE81O/4XpEoPFgBs17mqxoKni Y8pUL25BWlk1jqm9/pkzO1+uWcyEjZFWYZvtz0VoxJyqBPcyguAAyFgNPvI6xBoXw30G uVom7JdR2KcLhWzavTa8wWCJngOpMI+4gadwYsyR7FKNvryi67EmM/dRlzMvkqRm+h7e 3RbkBhWZOIjsBW+BD/ROJhuiy7wnbCZZlzut9wobdvBgHRDmgqREBEbYn/qS6lFCYPEX AhTyQ7PA0GghgBCw5EcMLah8k4dW7EhxcmiA5hbNN28TVS4nCV+VFOFLiXdc6MSRAmtx uC0A== X-Gm-Message-State: AMCzsaWCfsHybKPbx8v2lKGPzT4/wC7/pFmPGTQG/xWLjoW/OckZDH/I ZZh6UXyroQch2CNOxU9dPjkwmg== X-Google-Smtp-Source: ABhQp+Tyjj1XMSENsHpHP4eEoAd1L4oIoC4bRrTi1ac9743706VePExDJtCi6mO7+6wNMmTf8x5GbQ== X-Received: by 10.28.59.134 with SMTP id i128mr3999494wma.114.1508694113197; Sun, 22 Oct 2017 10:41:53 -0700 (PDT) Received: from dhiov23k ([197.1.53.85]) by smtp.gmail.com with ESMTPSA id g206sm1634753wme.23.2017.10.22.10.41.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Oct 2017 10:41:51 -0700 (PDT) From: Peter Neidhardt X-Google-Original-From: Peter Neidhardt References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 To: Eli Zaretskii Subject: Re: bug#28945: 25.2; desktop auto save timer does not work In-reply-to: <8360b7ayzq.fsf@gnu.org> Date: Sun, 22 Oct 2017 18:41:50 +0100 Message-ID: <87efpvulk1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: > What this boils down to is that every automatic desktop-save produces > an annoying "hiccup" in Emacs responsiveness. It's an idle timer, so if Emacs is idle, i.e. the user does not do > anything, how to you notice the hiccup? -- Peter Neidhardt Rainy days and Mondays always get me down. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 22 13:59:00 2017 Received: (at 28945) by debbugs.gnu.org; 22 Oct 2017 17:59:00 +0000 Received: from localhost ([127.0.0.1]:56165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6KWZ-0005BI-MZ for submit@debbugs.gnu.org; Sun, 22 Oct 2017 13:58:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6KWX-0005B6-Ok for 28945@debbugs.gnu.org; Sun, 22 Oct 2017 13:58:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6KWP-0006Y2-Fj for 28945@debbugs.gnu.org; Sun, 22 Oct 2017 13:58:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6KWP-0006Xw-CO; Sun, 22 Oct 2017 13:58:49 -0400 Received: from [176.228.60.248] (port=1733 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e6KWN-0004A9-QD; Sun, 22 Oct 2017 13:58:49 -0400 Date: Sun, 22 Oct 2017 20:58:39 +0300 Message-Id: <83376bawts.fsf@gnu.org> From: Eli Zaretskii To: Peter Neidhardt In-reply-to: <87efpvulk1.fsf@gmail.com> (message from Peter Neidhardt on Sun, 22 Oct 2017 18:41:50 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Peter Neidhardt > Cc: 28945@debbugs.gnu.org > Date: Sun, 22 Oct 2017 18:41:50 +0100 > > Eli Zaretskii writes: > > > What this boils down to is that every automatic desktop-save produces > > an annoying "hiccup" in Emacs responsiveness. > > It's an idle timer, so if Emacs is idle, i.e. the user does not do > anything, how to you notice the hiccup? I notice it when I resume typing during the time desktop.el auto-saves. The response to my typing is "sluggish", because once the timer function starts running, it runs to completion, before Emacs notices I typed something and responds. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 15:28:47 2017 Received: (at 28945) by debbugs.gnu.org; 23 Oct 2017 19:28:47 +0000 Received: from localhost ([127.0.0.1]:58011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6iP0-0005rj-QJ for submit@debbugs.gnu.org; Mon, 23 Oct 2017 15:28:46 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:56557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6iOy-0005rV-Sg for 28945@debbugs.gnu.org; Mon, 23 Oct 2017 15:28:45 -0400 Received: by mail-wm0-f48.google.com with SMTP id z3so4924839wme.5 for <28945@debbugs.gnu.org>; Mon, 23 Oct 2017 12:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:references:user-agent:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=6QRRDLd07imSF/TgE4/nxKaW6/NIb7m4IvR2zYvu4m8=; b=q5EVAdDCyK+m4XiaFosTmSF5EHb33wQ/+ca/YKNE8L+GobjmZGCzdoKEvvR7Ij67KR 19xuSG2B6sKsZekc8xpDhyFSXLOxVFhAKiHXMEQwehzGr3CH0nFRF+0bjxErE5v1/Qs3 o4cJNtdHYbbqHAfDqtgAJ98u1t53r3104Ilsz/mO2uGXUA6M5ahehq2aobLkki3VUm7X VaqF2Iztf975+F2UC073lPMAP8PEXYB7vEjJyK9uowL1XUwffSNxhu1QvVLce1Gpq706 emHtpvzPi6Mnjp7UHfDNsHg3aK/P04cy4viFxAvKbcPPFtCHf8yuHhEUd7jqo5sfOLGK /EeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:user-agent:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=6QRRDLd07imSF/TgE4/nxKaW6/NIb7m4IvR2zYvu4m8=; b=fD+K4w8lKnH+xLVm8z9dEiJcLuMFwEEbWkLmBpu4wnpRDLYBjLutn1L+SzS1aH3u0A Qi/r78Rpp9cIsCli/RXPYHEggehbwZPJcdFSucLC5gG/jWHyrScFFlZsKRB6uqWU0bcd ZMu7pmyvA/2BRsLwG0YTLscTBq1zjwo3hjwxvDL3V4D5jE8JPYoRHDYHwWvg0H+mGeq5 WW+b0waAsa6XpPg91cd29mcD38Tjw+oaeYz4ITyUNdXchvIYzWRgBcwXd3LnE1gbBiuD /2hNv75QS57dR2R4XW5WoofIvC7b0q7vsQ7i8ZXVa6Zz/iMrL9loaC6anNG6xZGQ+y4k Z8+Q== X-Gm-Message-State: AMCzsaXc1cYHQ1T2t/0B9FYsaVNhejq3IpT8bemjrQQnBKHYzzQhHYw/ NKX3zKCM7wqhB9XGH+9Rnytj/Q== X-Google-Smtp-Source: ABhQp+QNYRY/Wj2M9hc5i5SnJW8EM/qZQoRU8S8amYXgeYoGFU/KRvy5aBRO8GDYnM5nyqhzBb5EKw== X-Received: by 10.28.173.66 with SMTP id w63mr6321467wme.17.1508786918660; Mon, 23 Oct 2017 12:28:38 -0700 (PDT) Received: from dhiov23k ([197.3.130.54]) by smtp.gmail.com with ESMTPSA id 64sm4112422wma.21.2017.10.23.12.28.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2017 12:28:37 -0700 (PDT) From: Peter Neidhardt X-Google-Original-From: Peter Neidhardt References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 To: Eli Zaretskii Subject: Re: bug#28945: 25.2; desktop auto save timer does not work In-reply-to: <83376bawts.fsf@gnu.org> Date: Mon, 23 Oct 2017 20:28:34 +0100 Message-ID: <871slt64v1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Eli Zaretskii writes: >> > What this boils down to is that every automatic desktop-save produces >> > an annoying "hiccup" in Emacs responsiveness. >> >> It's an idle timer, so if Emacs is idle, i.e. the user does not do >> anything, how to you notice the hiccup? > > I notice it when I resume typing during the time desktop.el > auto-saves. The response to my typing is "sluggish", because once the > timer function starts running, it runs to completion, before Emacs > notices I typed something and responds. Correct me if I'm wrong: - If you keep using Emacs for hours (that is "typing/moving the point around") without taking a 30 sec break, then the timer won't trigger the desktop saving. Right? - The sluggishness would only be noticed if you happen to do nothing for more than `desktop-auto-save-timeout' but for less than desktop-auto-save-timeout + "time needed for saving". It seems improbable that this happens _often_. - I've used desktop-mode for years and I've never noticed any sluggishness as it takes less than a fraction of a second to save. I've had crappy computers, but admitedly most of them had an SSD. My current timeout is 5 and I don't see any performance impact even on a bad computer with an even worse HDD. Either way, the default value is not that important since every user is free to change the value. What is more important is to document it properly. Something in the line of: > If you experience any irresponsiveness everytime desktop gets saved, > increase the timeout. > If not, it's safe to have it around 10. What do you think? Cheers! -- Peter Neidhardt The difference between legal separation and divorce is that legal separation gives the man time to hide his money. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 15:36:33 2017 Received: (at 28945) by debbugs.gnu.org; 23 Oct 2017 19:36:33 +0000 Received: from localhost ([127.0.0.1]:58016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6iWX-000642-Je for submit@debbugs.gnu.org; Mon, 23 Oct 2017 15:36:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6iWW-00063q-9k for 28945@debbugs.gnu.org; Mon, 23 Oct 2017 15:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6iWM-0002dn-IL for 28945@debbugs.gnu.org; Mon, 23 Oct 2017 15:36:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6iWM-0002di-E4; Mon, 23 Oct 2017 15:36:22 -0400 Received: from [176.228.60.248] (port=3436 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e6iWJ-00036J-Bq; Mon, 23 Oct 2017 15:36:22 -0400 Date: Mon, 23 Oct 2017 22:35:59 +0300 Message-Id: <83a80hac80.fsf@gnu.org> From: Eli Zaretskii To: Peter Neidhardt In-reply-to: <871slt64v1.fsf@gmail.com> (message from Peter Neidhardt on Mon, 23 Oct 2017 20:28:34 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Peter Neidhardt > Cc: 28945@debbugs.gnu.org > Date: Mon, 23 Oct 2017 20:28:34 +0100 > > > > I notice it when I resume typing during the time desktop.el > > auto-saves. The response to my typing is "sluggish", because once the > > timer function starts running, it runs to completion, before Emacs > > notices I typed something and responds. > > Correct me if I'm wrong: > > - If you keep using Emacs for hours (that is "typing/moving the point > around") without taking a 30 sec break, then the timer won't trigger > the desktop saving. Right? Right. > - The sluggishness would only be noticed if you happen to do nothing for > more than `desktop-auto-save-timeout' but for less than > desktop-auto-save-timeout + "time needed for saving". It seems > improbable that this happens _often_. It happens quite often to me. Believe it or not, I tend to think a lot when I type in Emacs ;-) 30 sec is not such a long period for thinking about your next word or phrase or implementation detail. > - I've used desktop-mode for years and I've never noticed any > sluggishness as it takes less than a fraction of a second to save. > I've had crappy computers, but admitedly most of them had an SSD. My > current timeout is 5 and I don't see any performance impact even on a > bad computer with an even worse HDD. How many frames and how many buffers do you typically have in a session? > Either way, the default value is not that important since every user is free > to change the value. What is more important is to document it > properly. No argument here. > > If you experience any irresponsiveness everytime desktop gets saved, > > increase the timeout. > > If not, it's safe to have it around 10. This kind of advice generally belongs in the manual, not in the doc string, IMO. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 15:57:28 2017 Received: (at 28945) by debbugs.gnu.org; 23 Oct 2017 19:57:28 +0000 Received: from localhost ([127.0.0.1]:58026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6iql-0006eR-TQ for submit@debbugs.gnu.org; Mon, 23 Oct 2017 15:57:28 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:45447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6iqk-0006eF-NP for 28945@debbugs.gnu.org; Mon, 23 Oct 2017 15:57:27 -0400 Received: by mail-wr0-f180.google.com with SMTP id y9so6343924wrb.2 for <28945@debbugs.gnu.org>; Mon, 23 Oct 2017 12:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:references:user-agent:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=S85rsrTWGBW2qAFkujyOjxWpzlvtRzaVsOgmkk0DdnY=; b=GBu+T4lLI82LJVnUwb2m7jCukcvbKvq7Ed8QNDfOhn4NVPMUj+Z4k4wLx7eqRpLq1h cvjhUwqSh1VO4rS831Ysxk/MiUxQdx3NRfDXGSTxerld/sQBIip4fMv+M6eZsTK04Gub +TOmNR/JXeYTz6RixdnXVLCoQtX+C1IyrrSJnHK0CXIOM6lHbRS9De31ThURnowMXyxL 6sAwmkBmhL84rZa69arOPBnZavd66Yrmb9pKoRjAzLIxeGY5QxE7eRHtpaMDBFaMONDd 1HJLGiKZhFPTeXU721g284oupkfmJvP3fnLcOeFsugHssjf9ezchBM0pBzRajKhUY6s9 N1pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:user-agent:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=S85rsrTWGBW2qAFkujyOjxWpzlvtRzaVsOgmkk0DdnY=; b=EljI3LXuZ8FCz0N50f2BR3ab0WfHFGLoxKUxtxoESRbhSwFyPB/dX59cURFh9R4z6G H1XuhaPsvK7qzUS5P+oBCcwtj7mYTMj86+KIExbomKPs3mpyZjZo2Cy/niQcsWn3S5Lx TiLCzNI7P9M7/HJVRuB1lGDtjrHgeovJGgEDFgcHnTqwh1Euin1EKXRRpy0ApSLFGrXL pLoT+tSKDBHSll+GjMuFNu05QDQUdxMuaBYHyUfdQdqSBuf+Of+qxyAh1K6ex75f5dqD BeQqtLKmSQKnCXeRGawmewjZDBIKTOQEi4WiTUPOTcAwqHgFxCIra0479pXpQlajdv/5 i+Sg== X-Gm-Message-State: AMCzsaXJD/cAsfToUac/vcmlmj50YrTf8KdJ9dbptpp3sQwWy48yEgZo iMkAJz/74/1VRbXs5ckPJ+myCw== X-Google-Smtp-Source: ABhQp+T0hLN0C2EmPOjGz3h/p6xISNmWccJGVUYYRG6XAMcSsReDb1iF4SE1AizXeW5UDxCwUu5W3Q== X-Received: by 10.223.170.154 with SMTP id h26mr12080568wrc.87.1508788640643; Mon, 23 Oct 2017 12:57:20 -0700 (PDT) Received: from dhiov23k ([197.3.130.54]) by smtp.gmail.com with ESMTPSA id w79sm9615386wrb.86.2017.10.23.12.57.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2017 12:57:18 -0700 (PDT) From: Peter Neidhardt X-Google-Original-From: Peter Neidhardt References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 To: Eli Zaretskii Subject: Re: bug#28945: 25.2; desktop auto save timer does not work In-reply-to: <83a80hac80.fsf@gnu.org> Date: Mon, 23 Oct 2017 20:57:17 +0100 Message-ID: <87zi8h4oyq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii writes: > How many frames and how many buffers do you typically have in a > session? Only one frame (I use EXWM), but dozens of buffers, typically between 10-50. >> > If you experience any irresponsiveness everytime desktop gets saved, >> > increase the timeout. >> > If not, it's safe to have it around 10. > > This kind of advice generally belongs in the manual, not in the doc > string, IMO. The manual has this: > When ‘desktop-save-mode’ is active and the desktop file exists, Emacs > auto-saves it every ‘desktop-auto-save-timeout’ seconds, if that is > non-‘nil’ and non-zero. It's terribly misleading: it does not mention that it only saves when idle while "every" is wrong here considering that it saves only once until the window configuration gets changed. -- Peter Neidhardt Calm down, it's *____only* ones and zeroes. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 16:02:45 2017 Received: (at 28945) by debbugs.gnu.org; 23 Oct 2017 20:02:45 +0000 Received: from localhost ([127.0.0.1]:58031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6ivp-0006nV-G6 for submit@debbugs.gnu.org; Mon, 23 Oct 2017 16:02:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6ivn-0006nH-RY for 28945@debbugs.gnu.org; Mon, 23 Oct 2017 16:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6ivf-0006xP-Ky for 28945@debbugs.gnu.org; Mon, 23 Oct 2017 16:02:34 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6ivf-0006x8-HB; Mon, 23 Oct 2017 16:02:31 -0400 Received: from [176.228.60.248] (port=3470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e6ive-0003jC-Kt; Mon, 23 Oct 2017 16:02:31 -0400 Date: Mon, 23 Oct 2017 23:02:13 +0300 Message-Id: <838tg1ab0a.fsf@gnu.org> From: Eli Zaretskii To: Peter Neidhardt In-reply-to: <87zi8h4oyq.fsf@gmail.com> (message from Peter Neidhardt on Mon, 23 Oct 2017 20:57:17 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <87zi8h4oyq.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Peter Neidhardt > Cc: 28945@debbugs.gnu.org > Date: Mon, 23 Oct 2017 20:57:17 +0100 > > > How many frames and how many buffers do you typically have in a > > session? > > Only one frame (I use EXWM), but dozens of buffers, typically between 10-50. Well, I typically have around 5 frames, and several hundreds of buffers. > The manual has this: > > > When ‘desktop-save-mode’ is active and the desktop file exists, Emacs > > auto-saves it every ‘desktop-auto-save-timeout’ seconds, if that is > > non-‘nil’ and non-zero. > > It's terribly misleading: it does not mention that it only saves when > idle while "every" is wrong here considering that it saves only once > until the window configuration gets changed. Yes, and your report mentioned it. We'll get to that, my point was just about the suggestion to make the default timeout shorter, not about all the rest of your report. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 17:46:41 2017 Received: (at 28945) by debbugs.gnu.org; 24 Oct 2017 21:46:41 +0000 Received: from localhost ([127.0.0.1]:60345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e771y-0004p5-WE for submit@debbugs.gnu.org; Tue, 24 Oct 2017 17:46:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e771y-0004oq-1j for 28945@debbugs.gnu.org; Tue, 24 Oct 2017 17:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e771s-0003J0-6E for 28945@debbugs.gnu.org; Tue, 24 Oct 2017 17:46:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e771q-0003HN-FQ; Tue, 24 Oct 2017 17:46:30 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1e771p-000510-TR; Tue, 24 Oct 2017 17:46:29 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-reply-to: <83a80hac80.fsf@gnu.org> (message from Eli Zaretskii on Mon, 23 Oct 2017 22:35:59 +0300) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> Message-Id: Date: Tue, 24 Oct 2017 17:46: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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Standard Emacs auto saving used to save every N characters of keyboard input, as well as after a certain amount of idleness. Has this feature been taken out? -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 22:33:22 2017 Received: (at 28945) by debbugs.gnu.org; 25 Oct 2017 02:33:22 +0000 Received: from localhost ([127.0.0.1]:60501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7BVS-0007zy-5f for submit@debbugs.gnu.org; Tue, 24 Oct 2017 22:33:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7BVP-0007zl-Vq for 28945@debbugs.gnu.org; Tue, 24 Oct 2017 22:33:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7BVH-0000bj-Qq for 28945@debbugs.gnu.org; Tue, 24 Oct 2017 22:33:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7BVH-0000bf-N5; Tue, 24 Oct 2017 22:33:11 -0400 Received: from [176.228.60.248] (port=4593 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7BVA-0003qv-EJ; Tue, 24 Oct 2017 22:33:05 -0400 Date: Wed, 25 Oct 2017 05:32:50 +0300 Message-Id: <83vaj47y99.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-reply-to: (message from Richard Stallman on Tue, 24 Oct 2017 17:46:29 -0400) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Stallman > CC: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org > Date: Tue, 24 Oct 2017 17:46:29 -0400 > > Standard Emacs auto saving used to save every N characters of keyboard > input, as well as after a certain amount of idleness. Has this > feature been taken out? No, this is still as it always was. But we are not talking about auto-saving the buffers being edited, we are talking about auto-saving the session via desktop.el. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 25 23:42:18 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 03:42:18 +0000 Received: from localhost ([127.0.0.1]:33796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Z3i-0007z7-17 for submit@debbugs.gnu.org; Wed, 25 Oct 2017 23:42:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Z3g-0007yt-Nf for 28945@debbugs.gnu.org; Wed, 25 Oct 2017 23:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7Z3a-0004B5-8E for 28945@debbugs.gnu.org; Wed, 25 Oct 2017 23:42:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7Z3Y-000488-2U; Wed, 25 Oct 2017 23:42:08 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1e7Z3X-0006Oi-J9; Wed, 25 Oct 2017 23:42:07 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-reply-to: <83vaj47y99.fsf@gnu.org> (message from Eli Zaretskii on Wed, 25 Oct 2017 05:32:50 +0300) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> Message-Id: Date: Wed, 25 Oct 2017 23:42:07 -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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > No, this is still as it always was. But we are not talking about > auto-saving the buffers being edited, we are talking about auto-saving > the session via desktop.el. I see. desktop.el says it saves status when Emacs is killed. For that feature, why does it matter how long you have been editing? Does desktop.el now do more than that? -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 06:02:03 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 10:02:03 +0000 Received: from localhost ([127.0.0.1]:34002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ezD-0000PS-H4 for submit@debbugs.gnu.org; Thu, 26 Oct 2017 06:02:03 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:47724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ezB-0000Oz-Kg for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 06:02:01 -0400 Received: by mail-lf0-f53.google.com with SMTP id k40so3075560lfi.4 for <28945@debbugs.gnu.org>; Thu, 26 Oct 2017 03:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HRPhj5StbkpGXhzCFFVXs4lwD+GI0P8owmtDw7eyFV0=; b=WcjpQDgW7GSXTTZAZPY0rsPiXL7H0q+NgPabqbBMLXHMyC57q4Md5nyN2OO5efifXe ZPtV1uRKNWngwlT2nmt02zj32awlkRs7fP59pw0MdGp/nce0aJU6SElNIWG0Xo9VI5og hR6uKQsBQcKdY6dFLszctqbIp52xJujYdZ89dv0wPehwMkSNgn0VvljEtxUzilXYnNI9 WG8tZaAHEipAhy9q5UNrNCoWysimU6PZRAhKQ4oteAdaWAP2rlr+NwZ7YR95r+CAHQiM fxgztzsq61HhbfYPPmJ69cngBNrr/DU52OR0j5CEkm8OSrVmR0Z9FBWpUSZ8z3RczfDl CG/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HRPhj5StbkpGXhzCFFVXs4lwD+GI0P8owmtDw7eyFV0=; b=qxYe4KG6Rv8AjFH5dKzOiWjYyw2mXAMMrcU5A7aMGf7DLq2TnLmfwMIijInROjGY9N SGyRB/c7vv9HoiMJzcWgH5InFwXBM1ep2oCosgzxu5R8reii+10k+4aWTeoEB47DkJLp HSzQMfaMSIn9r/aMCZAIV1WXSw/sxW+f1bqYA8/BrJ3BKhBIF1hxOA10jUKBLYA84aUu 4Nj93C3B/ZM4gzUA7HJg6TFHFhoVyuLGQZyP/USNjJTgFxntkVRi/WmJ8t0e9kCCHQk7 t+KV48uEhthyv/m/7zSADxVR+WYb/VwPBeM6se9bJWFZC65jwyUqW8alqwbBpsHQeg5P 3+PQ== X-Gm-Message-State: AMCzsaWaRasMRLpiKCC0h4VD4TGRTLEWeMxBKsB41/nAIFXH1xPJDGwl aM8cG0GvH+QSmlBIr4wFOb2714DL27Rxbh1V708= X-Google-Smtp-Source: ABhQp+S9Mk7FQX8i9MnHaw/rcOi/j6QrzD2NEq3ECy/AU2MK8rpD5zm8qhMWpUdRxkg9Esm4MyvGC5ZSuZFzKq/en90= X-Received: by 10.46.127.11 with SMTP id a11mr9024100ljd.48.1509012115674; Thu, 26 Oct 2017 03:01:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.216.148 with HTTP; Thu, 26 Oct 2017 03:01:54 -0700 (PDT) In-Reply-To: References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> From: Pierre Neidhardt Date: Thu, 26 Oct 2017 11:01:54 +0100 Message-ID: Subject: Re: bug#28945: 25.2; desktop auto save timer does not work To: rms@gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28945 Cc: Eli Zaretskii , 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) It saves status when Emacs is killed but also once in a while when a timer expires: this is to have a recent enough save in case of crash and `kill-emacs-hook' is not run. -- Pierre Neidhardt From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 11:53:48 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 15:53:48 +0000 Received: from localhost ([127.0.0.1]:35260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7kTb-0004Nd-FE for submit@debbugs.gnu.org; Thu, 26 Oct 2017 11:53:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7kTZ-0004NQ-Ja for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 11:53:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7kTQ-0001Sx-I3 for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 11:53:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7kTQ-0001Sp-E9; Thu, 26 Oct 2017 11:53:36 -0400 Received: from [176.228.60.248] (port=2112 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7kTJ-0001bA-8S; Thu, 26 Oct 2017 11:53:29 -0400 Date: Thu, 26 Oct 2017 18:53:20 +0300 Message-Id: <838tfx9a8f.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-reply-to: (message from Richard Stallman on Wed, 25 Oct 2017 23:42:07 -0400) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Stallman > CC: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org > Date: Wed, 25 Oct 2017 23:42:07 -0400 > > desktop.el says it saves status when Emacs is killed. > For that feature, why does it matter how long you have been editing? > > Does desktop.el now do more than that? It does. From the doc string: Once a desktop file exists, Emacs will auto-save it according to the option ‘desktop-auto-save-timeout’. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 12:19:23 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 16:19:23 +0000 Received: from localhost ([127.0.0.1]:35322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ksN-000531-8w for submit@debbugs.gnu.org; Thu, 26 Oct 2017 12:19:23 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:45314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ksK-00052n-Bx for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 12:19:21 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9QGJCsC013752 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Oct 2017 16:19:12 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9QGJBgX025006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Oct 2017 16:19:11 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v9QGJBeQ032113; Thu, 26 Oct 2017 16:19:11 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 26 Oct 2017 09:19:10 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , rms@gnu.org Subject: RE: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> <838tfx9a8f.fsf@gnu.org> In-Reply-To: <838tfx9a8f.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > desktop.el says it saves status when Emacs is killed. > > For that feature, why does it matter how long you have been editing? > > > > Does desktop.el now do more than that? >=20 > It does. From the doc string: >=20 > Once a desktop file exists, Emacs will auto-save it according > to the option =E2=80=98desktop-auto-save-timeout=E2=80=99. Why is the default value 30 instead of just nil (OFF)? To be compatible with past behavior the default value would be nil, no? From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 13:11:14 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 17:11:14 +0000 Received: from localhost ([127.0.0.1]:35359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7lgY-0008C0-3b for submit@debbugs.gnu.org; Thu, 26 Oct 2017 13:11:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7lgX-0008Bm-1T for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 13:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7lgN-0005iX-Mu for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 13:11:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7lgN-0005iP-J1; Thu, 26 Oct 2017 13:11:03 -0400 Received: from [176.228.60.248] (port=2261 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7lgF-00087K-Ic; Thu, 26 Oct 2017 13:10:56 -0400 Date: Thu, 26 Oct 2017 20:10:46 +0300 Message-Id: <83tvyl7s2y.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: (message from Drew Adams on Thu, 26 Oct 2017 09:19:10 -0700 (PDT)) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> <838tfx9a8f.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, rms@gnu.org, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Thu, 26 Oct 2017 09:19:10 -0700 (PDT) > From: Drew Adams > Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org > > > Once a desktop file exists, Emacs will auto-save it according > > to the option ‘desktop-auto-save-timeout’. > > Why is the default value 30 instead of just nil (OFF)? I don't know. But this question should have been asked when this feature was introduced during development of Emacs 24.4. Now it's a fait accompli. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 14:28:19 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 18:28:19 +0000 Received: from localhost ([127.0.0.1]:35439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7mt8-0003c0-IY for submit@debbugs.gnu.org; Thu, 26 Oct 2017 14:28:18 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:47630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7mt7-0003bm-1v for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 14:28:17 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9QIS9LH021715 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Oct 2017 18:28:10 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9QIS9SF026109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Oct 2017 18:28:09 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v9QIS916008297; Thu, 26 Oct 2017 18:28:09 GMT MIME-Version: 1.0 Message-ID: <605fd263-28c0-4de6-8f80-5381cef6a16d@default> Date: Thu, 26 Oct 2017 11:28:08 -0700 (PDT) From: Drew Adams To: Eli Zaretskii Subject: RE: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> <838tfx9a8f.fsf@gnu.org> <83tvyl7s2y.fsf@gnu.org> In-Reply-To: <83tvyl7s2y.fsf@gnu.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, rms@gnu.org, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) > > > Once a desktop file exists, Emacs will auto-save it > > > according to the option =E2=80=98desktop-auto-save-timeout=E2=80=99. > > > > Why is the default value 30 instead of just nil (OFF)? >=20 > I don't know. But this question should have been asked when this > feature was introduced during development of Emacs 24.4. Now it's a > fait accompli. I see. I wasn't aware of it back then. Mea culpa. (I don't use desktop in a way that would be affected by this, so I wasn't aware of it until this bug thread. It doesn't affect me directly.) And I didn't realize when I sent my message that this was baked-in way back in 24.4. Too bad. Kinda hard to believe that the default behavior would be changed in an incompatible way like that, but so be it. Also hard to believe, if it was so easy to change the default behavior in 24.4 from a longstanding one, that it is now so hard to change it (e.g. back). Fait accompli, maybe. But once and for all, over and done with? Too bad also, if, as you say, this question should have been asked back then, that it wasn't asked by those who were looking at the possible new feature. (I don't know that it wasn't asked, but you seem to suggest that, by saying that it should have been.) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 14:46:59 2017 Received: (at 28945) by debbugs.gnu.org; 26 Oct 2017 18:46:59 +0000 Received: from localhost ([127.0.0.1]:35465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7nBB-000473-4R for submit@debbugs.gnu.org; Thu, 26 Oct 2017 14:46:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7nB7-00046i-7z for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 14:46:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7nAy-0002HU-76 for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 14:46:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7nAy-0002HQ-38; Thu, 26 Oct 2017 14:46:44 -0400 Received: from [176.228.60.248] (port=2550 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e7nAp-0004EX-Ks; Thu, 26 Oct 2017 14:46:37 -0400 Date: Thu, 26 Oct 2017 21:46:17 +0300 Message-Id: <83she57nnq.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: <605fd263-28c0-4de6-8f80-5381cef6a16d@default> (message from Drew Adams on Thu, 26 Oct 2017 11:28:08 -0700 (PDT)) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> <838tfx9a8f.fsf@gnu.org> <83tvyl7s2y.fsf@gnu.org> <605fd263-28c0-4de6-8f80-5381cef6a16d@default> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, rms@gnu.org, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Thu, 26 Oct 2017 11:28:08 -0700 (PDT) > From: Drew Adams > Cc: rms@gnu.org, pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org > > Fait accompli, maybe. But once and for all, over and > done with? No, of course not. My point was just that the reasons why it was done back then are no longer relevant; we should instead see whether we have sufficient justification to change behavior that is the default for the last 3 years. > Too bad also, if, as you say, this question should have > been asked back then, that it wasn't asked by those who > were looking at the possible new feature. (I don't know > that it wasn't asked, but you seem to suggest that, by > saying that it should have been.) No, I don't know whether it was asked, I didn't do any research about that. I don't remember any discussions, but that doesn't mean there were none. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 22:42:41 2017 Received: (at 28945) by debbugs.gnu.org; 27 Oct 2017 02:42:41 +0000 Received: from localhost ([127.0.0.1]:35845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ubY-0002MI-Ui for submit@debbugs.gnu.org; Thu, 26 Oct 2017 22:42:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ubW-0002M2-Eo for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 22:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7ubQ-0002P8-EV for 28945@debbugs.gnu.org; Thu, 26 Oct 2017 22:42:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7ubO-0002Mq-Dv; Thu, 26 Oct 2017 22:42:30 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1e7ubN-00018q-Sv; Thu, 26 Oct 2017 22:42:29 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Pierre Neidhardt In-reply-to: (message from Pierre Neidhardt on Thu, 26 Oct 2017 11:01:54 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> Message-Id: Date: Thu, 26 Oct 2017 22:42: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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > It saves status when Emacs is killed but also once in a while when a > timer expires: this is to have a recent enough save in case of crash > and `kill-emacs-hook' is not run. Then I think it should save every N characters, too. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 27 05:12:34 2017 Received: (at 28945) by debbugs.gnu.org; 27 Oct 2017 09:12:34 +0000 Received: from localhost ([127.0.0.1]:35946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e80gs-0005Il-KI for submit@debbugs.gnu.org; Fri, 27 Oct 2017 05:12:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e80gq-0005IZ-Re for 28945@debbugs.gnu.org; Fri, 27 Oct 2017 05:12:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e80gh-0008VO-IP for 28945@debbugs.gnu.org; Fri, 27 Oct 2017 05:12:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e80gh-0008Ut-Ef; Fri, 27 Oct 2017 05:12:23 -0400 Received: from [176.228.60.248] (port=3121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e80gY-0005Nj-MF; Fri, 27 Oct 2017 05:12:15 -0400 Date: Fri, 27 Oct 2017 12:12:07 +0300 Message-Id: <83k1zh6jko.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-reply-to: (message from Richard Stallman on Thu, 26 Oct 2017 22:42:29 -0400) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Richard Stallman > Date: Thu, 26 Oct 2017 22:42:29 -0400 > Cc: 28945@debbugs.gnu.org > > > It saves status when Emacs is killed but also once in a while when a > > timer expires: this is to have a recent enough save in case of crash > > and `kill-emacs-hook' is not run. > > Then I think it should save every N characters, too. Maybe, but I'm not sure: the amount of typing doesn't necessarily present evidence of changes to the window configuration, visiting new files or killing buffers, and other changes saved by desktop.el. The correlation between the two does exist, but it is much weaker than in the case of auto-save of buffers. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 28 08:12:29 2017 Received: (at 28945) by debbugs.gnu.org; 28 Oct 2017 12:12:29 +0000 Received: from localhost ([127.0.0.1]:38124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8PyW-00008n-Qq for submit@debbugs.gnu.org; Sat, 28 Oct 2017 08:12:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8PyV-00008b-Du for 28945@debbugs.gnu.org; Sat, 28 Oct 2017 08:12:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8PyN-0000vX-4s for 28945@debbugs.gnu.org; Sat, 28 Oct 2017 08:12:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8PyN-0000vT-1F; Sat, 28 Oct 2017 08:12:19 -0400 Received: from [176.228.60.248] (port=4635 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e8PyM-0007kN-2V; Sat, 28 Oct 2017 08:12:18 -0400 Date: Sat, 28 Oct 2017 15:12:13 +0300 Message-Id: <83k1zf5v4y.fsf@gnu.org> From: Eli Zaretskii To: Peter Neidhardt In-reply-to: <87k1znuphh.fsf@gmail.com> (message from Peter Neidhardt on Sun, 22 Oct 2017 17:19:07 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Peter Neidhardt > Date: Sun, 22 Oct 2017 17:19:07 +0100 > > - Add (desktop-save-mode) to your init.el. > > - Start Emacs. Check the value of `window-configuration-change-hook': > the _global_ value should contain `desktop-auto-save-set-timer'. > > - Save the desktop. > > - Quit Emacs. > > - Restart Emacs. > > - Check `window-configuration-change-hook': the timer is gone. 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. > I've narrowed down the issue to `desktop-read': > > ;; ... > (setq desktop-autosave-was-enabled > (memq 'desktop-auto-save-set-timer 'window-configuration-change-hook)) > (desktop-auto-save-disable) > ;; ... > (if desktop-autosave-was-enabled (desktop-auto-save-enable)) > > The check is done on the _local_ value of > `window-configuration-change-hook', thus `desktop-auto-save-enable' will > never be re-run. Did you somehow make changes to the local value of window-configuration-change-hook? In my case, both the local value and the global value are identical. > While we are at it, we might change the documentation and value of `desktop-auto-save-timeout': > > Number of seconds idle time before auto-save of the desktop. > The idle timer activates auto-saving only when window configuration changes. > > This is terribly confusing, isn't it? One might wonder whether it's a > timer that saves every 30 seconds or the configuration change. > > The actual logic is as follow: > > - On every window configuration change, the timer is _reset_. > > - When idle for `desktop-auto-save-timeout', the desktop is saved. The > timer is run only _once_. I've changed the doc string of desktop-auto-save-timeout as follows: "Number of seconds of idle time before auto-saving the desktop. The desktop will be auto-saved when this amount of idle time have passed after some change in the window configuration. This applies to an existing desktop file when `desktop-save-mode' is enabled. Zero or nil means disable auto-saving due to idleness." And the doc string of desktop-auto-save-set-timer now says this: "Set the desktop auto-save timer. Cancel any previous timer. When `desktop-auto-save-timeout' is a positive integer, start a new idle timer to call `desktop-auto-save' after that many seconds of idle time. This function is called from `window-configuration-change-hook'." OK? > In practice, this means that the user actually be idle for 30 seconds or > else it won't get saved at all. It will be saved when Emacs exits. > 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? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 28 17:49:27 2017 Received: (at 28945) by debbugs.gnu.org; 28 Oct 2017 21:49:27 +0000 Received: from localhost ([127.0.0.1]:39542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8Yys-0008DA-W6 for submit@debbugs.gnu.org; Sat, 28 Oct 2017 17:49:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8Yyr-0008Cx-Kg for 28945@debbugs.gnu.org; Sat, 28 Oct 2017 17:49:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8Yyk-00025g-Nw for 28945@debbugs.gnu.org; Sat, 28 Oct 2017 17:49:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8Yyf-0001y8-PI; Sat, 28 Oct 2017 17:49:13 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1e8Yyf-0001tI-8s; Sat, 28 Oct 2017 17:49:13 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-reply-to: <83k1zh6jko.fsf@gnu.org> (message from Eli Zaretskii on Fri, 27 Oct 2017 12:12:07 +0300) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <8360b7ayzq.fsf@gnu.org> <87efpvulk1.fsf@gmail.com> <83376bawts.fsf@gnu.org> <871slt64v1.fsf@gmail.com> <83a80hac80.fsf@gnu.org> <83vaj47y99.fsf@gnu.org> <83k1zh6jko.fsf@gnu.org> Message-Id: Date: Sat, 28 Oct 2017 17:49:13 -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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945 Cc: pe.neidhardt@googlemail.com, 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Then I think it should save every N characters, too. > Maybe, but I'm not sure: the amount of typing doesn't necessarily > present evidence of changes to the window configuration, visiting new > files or killing buffers, and other changes saved by desktop.el. Does that make a difference? The point is to make sure that the data gets saved every so often if you keep working and are not idle. The precise details are not crucial. This method would do that. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 11:18:19 2017 Received: (at 28945) by debbugs.gnu.org; 5 Nov 2017 16:18:20 +0000 Received: from localhost ([127.0.0.1]:52418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBNcp-0002sE-Kr for submit@debbugs.gnu.org; Sun, 05 Nov 2017 11:18:19 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:54893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBNcn-0002ry-DU for 28945@debbugs.gnu.org; Sun, 05 Nov 2017 11:18:17 -0500 Received: by mail-wm0-f44.google.com with SMTP id r68so9795961wmr.3 for <28945@debbugs.gnu.org>; Sun, 05 Nov 2017 08:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:references:user-agent:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Zj7Fp3hyi39pym1n10XiikPFN4eJO5j6jiluEKoeMTI=; b=VTC1K0ojgWHn/wR30+Jul7HAXLiThche3+5gAFED315cuUM3FIYY2PRtWcYuTrnodc rn9QDEIH27LI9BlShHvObeYr1xnpatixHjmrJT+aiMx9QHalPcC0utSNFh3NZK7IwPN3 z/fr6CgsZInQk6VKoRFhKtOLJPkX/ZVrkCA7d+lZaBhtDS91s0sixZj6SM1n3/Eytxue 22z4IAOQRq7u69zb5HfeVgA9HnQRC7gSHGyB6/r2Rx/PxZ5qPaf80Sr9TQBkdtAARR8V 8MAaVk2KruP0dVnEon0rjq36xMxTMprdZETBLE7ESpiLyjtxDhxymQm6vSKsUSbSDKjP ejDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:user-agent:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Zj7Fp3hyi39pym1n10XiikPFN4eJO5j6jiluEKoeMTI=; b=iUX+vq+z+OsAYV+7kx7i8PMb/wdQxf+FZSyIwqL/qvXc6pamFFVQIzhStipI9Ec+i5 UudNlTv0W0Lm4tJx/B7jF6EDV9lN8cCVL9hYNPUwB9tv8cvRJdoyLSTepO+Lr94uM13W /91Ro/JGhgmY4ZsePCsa2mRBD7zBsEd/+Nu1HaqlvkD8gH2huRXyr82AQwITxVxXjQ9d n9skkFzXEnuLy+4pT/yDpGnLksvkZWB4DqpfQ4Ma5Gu/+H/1YkZ3G6M/NSKd1Ow2UsjN bvRJSx4lkRbYLqEB10Za+iAqmS9mP8Dvu8mlb6HesLwzCRBEt0ztxEt2MjK3EdKWh5zz it2Q== X-Gm-Message-State: AJaThX7q8wBjAeso6Goy1OMHtr5PhaoUSkCwfSznpzUxxc7mX9qvE7RB lMXanlWW8ooVYtETDVILK7VZRg== X-Google-Smtp-Source: ABhQp+Qvy6G933t4SPWUY3eFwRFxizgFDz92DK2gwMu2pAlECVdkPUTWl1QPwPDc/i6Jk2N3OXQrCg== X-Received: by 10.28.87.13 with SMTP id l13mr3430680wmb.45.1509898691004; Sun, 05 Nov 2017 08:18:11 -0800 (PST) Received: from dhiov23k ([197.0.145.22]) by smtp.gmail.com with ESMTPSA id p23sm24729613wrb.76.2017.11.05.08.18.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 Nov 2017 08:18:09 -0800 (PST) From: Peter Neidhardt X-Google-Original-From: Peter Neidhardt References: <87k1znuphh.fsf@gmail.com> <83k1zf5v4y.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 To: Eli Zaretskii Subject: Re: bug#28945: 25.2; desktop auto save timer does not work In-reply-to: <83k1zf5v4y.fsf@gnu.org> Date: Sun, 05 Nov 2017 17:18:07 +0100 Message-ID: <87375sya0w.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28945 Cc: 28945@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Eli Zaretskii writes: >> From: Peter Neidhardt >> Date: Sun, 22 Oct 2017 17:19:07 +0100 >> >> - Add (desktop-save-mode) to your init.el. >> >> - Start Emacs. Check the value of `window-configuration-change-hook': >> the _global_ value should contain `desktop-auto-save-set-timer'. >> >> - Save the desktop. >> >> - Quit Emacs. >> >> - Restart Emacs. >> >> - Check `window-configuration-change-hook': the timer is gone. > > 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) 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. > I've changed the doc string of desktop-auto-save-timeout as follows: > > "Number of seconds of idle time before auto-saving the desktop. > The desktop will be auto-saved when this amount of idle time have > passed after some change in the window configuration. > This applies to an existing desktop file when `desktop-save-mode' is enabled. > Zero or nil means disable auto-saving due to idleness." > > And the doc string of desktop-auto-save-set-timer now says this: > > "Set the desktop auto-save timer. > Cancel any previous timer. When `desktop-auto-save-timeout' is a positive > integer, start a new idle timer to call `desktop-auto-save' after that many > seconds of idle time. > This function is called from `window-configuration-change-hook'." > > OK? OK, thank you. >> 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. -- Peter Neidhardt You can always pick up your needle and move to another groove. -- Tim Leary From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 11 04:58:49 2017 Received: (at 28945-done) by debbugs.gnu.org; 11 Nov 2017 09:58:49 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 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 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 Date: Sat, 11 Nov 2017 11:58:38 +0200 Message-Id: <831sl5p25t.fsf@gnu.org> From: Eli Zaretskii To: Peter Neidhardt In-reply-to: <87375sya0w.fsf@gmail.com> (message from Peter Neidhardt on Sun, 05 Nov 2017 17:18:07 +0100) Subject: Re: bug#28945: 25.2; desktop auto save timer does not work References: <87k1znuphh.fsf@gmail.com> <83k1zf5v4y.fsf@gnu.org> <87375sya0w.fsf@gmail.com> 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-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28945-done Cc: 28945-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 11 06:59:44 2017 Received: (at 28945-done) by debbugs.gnu.org; 11 Nov 2017 11:59:44 +0000 Received: from localhost ([127.0.0.1]:34788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDURs-0002b2-Ej for submit@debbugs.gnu.org; Sat, 11 Nov 2017 06:59:44 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:40842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDURq-0002ao-O3 for 28945-done@debbugs.gnu.org; Sat, 11 Nov 2017 06:59:43 -0500 Received: by mail-wm0-f53.google.com with SMTP id b189so364260wmd.5 for <28945-done@debbugs.gnu.org>; Sat, 11 Nov 2017 03:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:references:user-agent:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=QzPILw2TU3NcobHhahNBIxoKAAui66KEn0IdlN2WfxQ=; b=jaIK7OrVhh6fZmSHGhJPzRYSUJTPB5DQYzLxQwp1/OzUpgUHve47houxGOSMHNj2TE Ya+W35YQnXetFaOz0mTeigHxIAC8nLMOSqu0U2xfxGQKeoPL5HDlqmwnsgr3NAyLdyjn d9hmjrn7cKPoIImF8yKYFsyyWGEpxYaXceevVfHCwrBkICDIab4bvuODwgFYJr2FWyYD 2xMD0bPTDvL7HBYBZKmbKo8EoU+UDZXic0X50mS2/429BqCGwVEHTFAtWz4GXGQV0qjq InIy4hFafcSgWD3UOYda3yUgdRaSbdaKDrkX4NDQEuecQ1WaAgAJBTvUHRIkNN0jFV93 YQrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:user-agent:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=QzPILw2TU3NcobHhahNBIxoKAAui66KEn0IdlN2WfxQ=; b=CeXcjhpA/V+ZZNrzzc2The8OencXRbVuAMHvgne7V0dHXeaPFMQhgyEbmzQxsN8wIT igVVIY93rgc+FtnK8gjpwJ5A+O+kOTx0DUkQQy/jNisYW3vg2QrDfLXxyhc+5AZZutA8 E71Tbms4sTG8ZD45WuMZaP23gR50TzWDAtvaisbwzOmEq7bX147zTp7VnV+VX7FEBoPf OrjaAQNyYeTf8MEaj6KZXXcgL7WeAa1QMJxqKFxWTKuAPUZN1eMpH2KyFslAlGGRFvPM CXkZ30L52u45FyI98LhVse1ZXWAVJtgDrMhuMCGhToby9TzhYLZWAXgo1OTxuAPkW/vI mTfw== X-Gm-Message-State: AJaThX4uTFkePrZ2bVHteZcS4913dt/zqLsdCbdqfwQAbtyUnKxB7ftd nqDApHqcat30pFIgp+PmO5aY+A== X-Google-Smtp-Source: AGs4zMaC5r/qeOG62i+sWcCjBGtUUELZxH6dALWKZVIhaAImPAVviKNNEteuwwUptKCk7pSDyV/qyw== X-Received: by 10.28.109.23 with SMTP id i23mr2371172wmc.32.1510401576409; Sat, 11 Nov 2017 03:59:36 -0800 (PST) Received: from dhiov23k ([197.0.23.250]) by smtp.gmail.com with ESMTPSA id w206sm1683693wmd.36.2017.11.11.03.59.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Nov 2017 03:59:34 -0800 (PST) From: Peter Neidhardt X-Google-Original-From: Peter Neidhardt References: <87k1znuphh.fsf@gmail.com> <83k1zf5v4y.fsf@gnu.org> <87375sya0w.fsf@gmail.com> <831sl5p25t.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 To: Eli Zaretskii Subject: Re: bug#28945: 25.2; desktop auto save timer does not work In-reply-to: <831sl5p25t.fsf@gnu.org> Date: Sat, 11 Nov 2017 12:59:32 +0100 Message-ID: <87y3ndf2l7.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28945-done Cc: 28945-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Eli Zaretskii writes: >> 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. Thank you very much. -- Peter Neidhardt From unknown Sun Jun 22 07:37:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 09 Dec 2017 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator