GNU bug report logs - #15262
24.3.50; desktop does not save buffer-display-time

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Tue, 3 Sep 2013 19:11:01 UTC

Severity: wishlist

Found in version 24.3.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15262 in the body.
You can then email your comments to 15262 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 19:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sds <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 03 Sep 2013 19:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sam Steingold <sds <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 03 Sep 2013 15:09:33 -0400
desktop saves the buffers, but not their buffer-display-time.
i.e., when Emacs is started and desktop loads all the old buffers,
their buffer-display-time is set to the Emacs start time.
this leads to ancient buffers not being cleaned up by clean-buffer-list.


In GNU Emacs 24.3.50.12 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4)
 of 2013-09-03 on t520sds
Bzr revision: 114115 dmantipov <at> yandex.ru-20130903124135-n1l2ri1aroxpa9pa
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
System Description:	Ubuntu 13.04

Configured using:
 `configure --with-wide-int'

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: C
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-undo-mode: t
  diff-auto-refine-mode: t
  rcirc-track-minor-mode: t
  global-edit-server-edit-mode: t
  which-function-mode: t
  url-handler-mode: t
  show-paren-mode: t
  desktop-save-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t

Features:
(shadow bbdb-message mailalias cookie1 nnir emacsbug sendmail url-http
url-gw url-auth sort gnus-cite smiley url-queue url-cache url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util shr mm-archive gnus-async gnus-bcklg gnus-dup qp mail-extr
gnus-ml disp-table spam spam-stat gnus-uu yenc nndraft nnmh gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg utf-7 nnimap utf7
nnfolder parse-time gnus-cache bbdb-gnus gnus-art mm-uu mml2015
epg-config mm-view mml-smime smime dig mailcap gnus-sum netrc gnutls
network-stream starttls tls nntp gnus-group gnus-undo nnmail mail-source
nnoo tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs trampver
gnus-start gnus-spec gnus-int gnus-range message rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums gmm-utils mailheader gnus-win skeleton cal-move cal-x view
cal-china cal-bahai cal-islam cal-julian holidays hol-loaddefs cal-iso
cal-hebrew lunar solar cal-dst appt diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs debug whitespace diff-mode warnings time-stamp
cl-indent dabbrev edebug misearch multi-isearch find-func help-mode
mule-util remember bug-reference add-log sgml-mode nxml-uchnm rng-xsd
xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok cl-macs
cc-langs jde derived jde-annotations jde-open-source semantic/senator
semantic/decorate pulse jde-bsh jde-parse-expr etags jde-class
jde-parse-class jde-import jde-java-font-lock jde-which-method
jde-java-grammar jde-wiz jde-complete semantic/idle jde-plugins jde-gen
tempo jde-run jde-jdb jde-bug jde-dbs jde-dbo regress jde-db jde-parse
sregex jde-imenu semantic/imenu semantic/db-file data-debug cedet-files
semantic/db gv eieio-base semantic/java semantic/doc avl-tree
semantic/sb speedbar sb-image dframe semantic/sort semantic/format
ezimage semantic/tag-ls semantic/find semantic/ctxt jde-compile cus-edit
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet jde-help jde-widgets tree-widget beanshell
lmenu jde-custom jde-project-file jde-util arc-mode archive-mode efc
jde-autoload cperl-mode make-mode js2-mode js json cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine vc-git noutline
outline easy-mmode vc-bzr sh-script smie vc-dir ewoc vc vc-dispatcher
dired-aux doc-view jka-compr image-mode vc-hg auto-complete edmacro
kmacro popup info package vlf dired midnight autoloads gnus gnus-ems
nnheader mail-utils wid-edit bbdb-mua bbdb-com mailabbrev bbdb-loaddefs
bbdb timezone rcirc edit-server server uniquify which-func imenu
url-handlers url-parse auth-source eieio byte-opt bytecomp byte-compile
cconv eieio-core gnus-util mm-util mail-prsvr password-cache url-vars
paren help-at-pt desktop frameset cus-start cus-load ido ess-toolbar
ess-mouse mouseme thingatpt browse-url ess-menu ess-swv ess-noweb
ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d ess-sas-l
ess-sas-a shell pcomplete ess-sta-d ess-sta-l cc-vars cc-defs
make-regexp ess-sp6-d ess-sp3-d ess-julia ess-r-d compile ess-tracebug
format-spec ess-roxy advice hideshow ess-help ess-developer ess-r-args
eldoc help-fns ess-s-l ess ess-inf comint ansi-color ring ess-mode
ess-noweb-mode ess-utils ess-custom executable easymenu ess-compat
ess-site cl cl-loaddefs cl-lib time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 13.04 (raring) X 11.0.11303000
http://www.childpsy.net/ http://jihadwatch.org http://dhimmi.com http://ffii.org
http://honestreporting.com http://openvotingconsortium.org
I'd give my right arm to be ambidextrous.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 19:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: sds <at> gnu.org
Cc: 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 03 Sep 2013 15:26:07 -0400
Sam Steingold wrote:

> desktop saves the buffers, but not their buffer-display-time.
> i.e., when Emacs is started and desktop loads all the old buffers,
> their buffer-display-time is set to the Emacs start time.

So add buffer-display-time to your value of desktop-locals-to-save.

> this leads to ancient buffers not being cleaned up by clean-buffer-list.

It's not obvious to me that everyone will want the same behaviour as
you do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 19:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Sam Steingold <sds <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 3 Sep 2013 15:46:26 -0400
On Tue, Sep 3, 2013 at 3:26 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Sam Steingold wrote:
>
>> desktop saves the buffers, but not their buffer-display-time.
>> i.e., when Emacs is started and desktop loads all the old buffers,
>> their buffer-display-time is set to the Emacs start time.
>
> So add buffer-display-time to your value of desktop-locals-to-save.

thanks!
Alas, there is no interface for pushing values to custom variables...
I would have to do either
(custom-set-variables
 '(desktop-locals-to-save (cons 'buffer-display-time desktop-locals-to-save)
   nil (desktop)))
or
(eval-after-load "desktop"
 '(add-to-list 'desktop-locals-to-save 'buffer-display-time))
neither of which is perfect.
(the first can push repeatedly and the second bypasses the custom system)

>> this leads to ancient buffers not being cleaned up by clean-buffer-list.
>
> It's not obvious to me that everyone will want the same behaviour as
> you do.

Can you describe a situation when the current behavior is more useful
than the proposed one?
thanks.

-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 19:53:02 GMT) Full text and rfc822 format available.

Message #14 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 03 Sep 2013 15:51:58 -0400
Sam Steingold wrote:

> Alas, there is no interface for pushing values to custom variables...

Still waiting for someone to implement the "diff-list" custom type.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7812#26

> Can you describe a situation when the current behavior is more useful
> than the proposed one?

Maybe someone wants starting a new Emacs to reset the clocks on all
their buffers, so none are considered "old".
(I've never used clean-buffer-list.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 20:05:02 GMT) Full text and rfc822 format available.

Message #17 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Sam Steingold <sds <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 3 Sep 2013 16:04:08 -0400
On Tue, Sep 3, 2013 at 3:51 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Sam Steingold wrote:
>
>> Alas, there is no interface for pushing values to custom variables...
>
> Still waiting for someone to implement the "diff-list" custom type.
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7812#26

thanks for the link, see also http://thread.gmane.org/gmane.emacs.help/86660

>> Can you describe a situation when the current behavior is more useful
>> than the proposed one?
>
> Maybe someone wants starting a new Emacs to reset the clocks on all
> their buffers, so none are considered "old".

why would one want to do that?

> (I've never used clean-buffer-list.)

it's in midnight.el

-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 20:31:01 GMT) Full text and rfc822 format available.

Message #20 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 03 Sep 2013 16:30:14 -0400
Sam Steingold wrote:

>> Maybe someone wants starting a new Emacs to reset the clocks on all
>> their buffers, so none are considered "old".
>
> why would one want to do that?

You don't think there's anyone alive who would think it weird to start
an Emacs at 11.59pm, then have a bunch of buffers killed 1 minute later
as "too old"?

(Make whatever change you like to the default value, I don't care.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 20:40:05 GMT) Full text and rfc822 format available.

Message #23 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Sam Steingold <sds <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 3 Sep 2013 16:39:26 -0400
On Tue, Sep 3, 2013 at 4:30 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Sam Steingold wrote:
>
>>> Maybe someone wants starting a new Emacs to reset the clocks on all
>>> their buffers, so none are considered "old".
>>
>> why would one want to do that?
>
> You don't think there's anyone alive who would think it weird to start
> an Emacs at 11.59pm, then have a bunch of buffers killed 1 minute later
> as "too old"?

well, let's see: the last time the user saw the buffers was 3 days ago.
and he explicitly (by enabling midnight) requested that they are purged.
what's weird?
ah, I see! suppose the user have not used emacs for a week.
then all buffers will be killed.
maybe it would make sense to advance the saved buffer-display-time
by the period while emacs was inactive.
wdyt?

> (Make whatever change you like to the default value, I don't care.)

thanks.

-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Tue, 03 Sep 2013 23:36:02 GMT) Full text and rfc822 format available.

Message #26 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sam Steingold <sds <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Tue, 03 Sep 2013 18:55:41 -0400
> maybe it would make sense to advance the saved buffer-display-time
> by the period while emacs was inactive.

IOW save the "inactive time" rather than the "last display time".
That would make sense and would be OK for the default.


        Stefan




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Sun, 18 Aug 2019 17:27:01 GMT) Full text and rfc822 format available.

Notification sent to sds <at> gnu.org:
bug acknowledged by developer. (Sun, 18 Aug 2019 17:27:02 GMT) Full text and rfc822 format available.

Message #31 received at 15262-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Sam Steingold <sds <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 15262-done <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Sun, 18 Aug 2019 19:26:25 +0200
Sam Steingold <sds <at> gnu.org> writes:

> On Tue, Sep 3, 2013 at 4:30 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>> Sam Steingold wrote:
>>
>>>> Maybe someone wants starting a new Emacs to reset the clocks on all
>>>> their buffers, so none are considered "old".
>>>
>>> why would one want to do that?
>>
>> You don't think there's anyone alive who would think it weird to start
>> an Emacs at 11.59pm, then have a bunch of buffers killed 1 minute later
>> as "too old"?
>
> well, let's see: the last time the user saw the buffers was 3 days ago.
> and he explicitly (by enabling midnight) requested that they are purged.
> what's weird?
> ah, I see! suppose the user have not used emacs for a week.
> then all buffers will be killed.
> maybe it would make sense to advance the saved buffer-display-time
> by the period while emacs was inactive.

The changes suggested by Sam Steingold above is now on master, and I'm
therefore closing this bug report.

commit cd726ef68ece4fff6772bd08c0051c294e925505
Author: Sam Steingold <sds <at> gnu.org>
Date:   Sat Oct 15 23:14:48 2016 -0400

    Save and restore buffer-display-time

    * desktop.el (desktop-locals-to-save): Add `buffer-display-time'
    (desktop-read): Set `desktop-file-modtime' before loading the desktop file
    (desktop-create-buffer): Adjust `buffer-display-time' for the
    downtime

Thanks,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Sun, 18 Aug 2019 21:11:01 GMT) Full text and rfc822 format available.

Message #34 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: 15262 <at> debbugs.gnu.org
Cc: sds <at> gnu.org, stefan <at> marxist.se
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Sun, 18 Aug 2019 23:58:02 +0300
>>>>> Maybe someone wants starting a new Emacs to reset the clocks on all
>>>>> their buffers, so none are considered "old".
>>>>
>>>> why would one want to do that?
>>>
>>> You don't think there's anyone alive who would think it weird to start
>>> an Emacs at 11.59pm, then have a bunch of buffers killed 1 minute later
>>> as "too old"?
>>
>> well, let's see: the last time the user saw the buffers was 3 days ago.
>> and he explicitly (by enabling midnight) requested that they are purged.
>> what's weird?
>> ah, I see! suppose the user have not used emacs for a week.
>> then all buffers will be killed.
>> maybe it would make sense to advance the saved buffer-display-time
>> by the period while emacs was inactive.
>
> The changes suggested by Sam Steingold above is now on master, and I'm
> therefore closing this bug report.
>
> commit cd726ef68ece4fff6772bd08c0051c294e925505
> Author: Sam Steingold <sds <at> gnu.org>
> Date:   Sat Oct 15 23:14:48 2016 -0400
>
>     Save and restore buffer-display-time
>
>     * desktop.el (desktop-locals-to-save): Add `buffer-display-time'
>     (desktop-read): Set `desktop-file-modtime' before loading the desktop file
>     (desktop-create-buffer): Adjust `buffer-display-time' for the
>     downtime

I used to show buffer-display-time in the customized buffer list.
After that change buffer-display-time displayed weird times,
so I had to replace buffer-display-time with visited-file-modtime
instead.  But I think this issue has a minuscule importance,
so unless somebody wants to add a new attribute inactive-time,
it was ok to close this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Wed, 21 Aug 2019 21:12:02 GMT) Full text and rfc822 format available.

Message #37 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: Sam Steingold <sds <at> gnu.org>, 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Wed, 21 Aug 2019 23:10:55 +0200
Juri Linkov <juri <at> linkov.net> writes:

> > commit cd726ef68ece4fff6772bd08c0051c294e925505
> > Author: Sam Steingold <sds <at> gnu.org>
> > Date:   Sat Oct 15 23:14:48 2016 -0400
> >
> >     Save and restore buffer-display-time
> >
> >     * desktop.el (desktop-locals-to-save): Add `buffer-display-time'
> >     (desktop-read): Set `desktop-file-modtime' before loading the desktop file
> >     (desktop-create-buffer): Adjust `buffer-display-time' for the
> >     downtime
>
> I used to show buffer-display-time in the customized buffer list.
> After that change buffer-display-time displayed weird times,
> so I had to replace buffer-display-time with visited-file-modtime
> instead.  But I think this issue has a minuscule importance,
> so unless somebody wants to add a new attribute inactive-time,
> it was ok to close this.

Thanks for that.  What does "customized buffer list" mean here more
exactly?  And does this suggest that there is a bug in the above
commit?

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15262; Package emacs. (Wed, 21 Aug 2019 22:47:01 GMT) Full text and rfc822 format available.

Message #40 received at 15262 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Sam Steingold <sds <at> gnu.org>, 15262 <at> debbugs.gnu.org
Subject: Re: bug#15262: 24.3.50; desktop does not save buffer-display-time
Date: Thu, 22 Aug 2019 01:28:43 +0300
>> I used to show buffer-display-time in the customized buffer list.
>> After that change buffer-display-time displayed weird times,
>> so I had to replace buffer-display-time with visited-file-modtime
>> instead.  But I think this issue has a minuscule importance,
>> so unless somebody wants to add a new attribute inactive-time,
>> it was ok to close this.
>
> Thanks for that.  What does "customized buffer list" mean here more
> exactly?  And does this suggest that there is a bug in the above
> commit?

This is from an external package, so no core Emacs packages are affected.
I'm not sure if it could be called a bug, maybe just a misfeature.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 19 Sep 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.