GNU bug report logs - #46153
recentf should keep files in most recently used order

Previous Next

Package: emacs;

Reported by: reporter <laszlomail <at> protonmail.com>

Date: Thu, 28 Jan 2021 12:38:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 46153 in the body.
You can then email your comments to 46153 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#46153; Package emacs. (Thu, 28 Jan 2021 12:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to reporter <laszlomail <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 28 Jan 2021 12:38:02 GMT) Full text and rfc822 format available.

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

From: reporter <laszlomail <at> protonmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: recentf should keep files in most recently used order
Date: Thu, 28 Jan 2021 12:37:05 +0000
recentf is very useful for revisiting files, I use it a lot with
completion to reopen files. Completion which puts the most recent
file first.

However, it has a slight problem: it shows the recently opened
files, instead of the recently *used* files.

For example, if I open files a, b, c, d, e in this order and use
them, but in the end I use only files a and b for the last part
of my task and want to revisit this files later then recentf
provides this list (most recent first):

e
d
c
b
a


But I used a and b last a lot, so it's more likely I want to open
those again, so recentf should give me, for example:

b
a
d
e
c


So it should track buffer switches as well and update the recentf
list by moving the file corresponding to the current buffer to
the beginnining of the list (maybe updating the list from an idle
timer if it's costly, there is no need for immediate updates for a
long recentf list, I have 2000 files in it).

This is much more useful than simply tracking file
openings. Other tools also put most recently used files
first. Emacs should do the same.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46153; Package emacs. (Thu, 28 Jan 2021 14:45:01 GMT) Full text and rfc822 format available.

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

From: reporter <laszlomail <at> protonmail.com>
To: "46153 <at> debbugs.gnu.org" <46153 <at> debbugs.gnu.org>
Subject: Re: bug#46153: Acknowledgement (recentf should keep files in most
 recently used order)
Date: Thu, 28 Jan 2021 14:43:51 +0000
Apparently, this is all what's needed:

  (add-hook 'buffer-list-update-hook 'recentf-track-opened-file)


So buffer-list-update-hook should be added to recentf-used-hooks
in recentf.el


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, January 28, 2021 1:38 PM, <help-debbugs <at> gnu.org> wrote:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> bug-gnu-emacs <at> gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 46153 <at> debbugs.gnu.org.
>
> Please do not send mail to help-debbugs <at> gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> 46153: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46153
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46153; Package emacs. (Fri, 29 Jan 2021 05:48:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: reporter <laszlomail <at> protonmail.com>
Cc: "46153 <at> debbugs.gnu.org" <46153 <at> debbugs.gnu.org>
Subject: Re: bug#46153: recentf should keep files in most recently used order
Date: Fri, 29 Jan 2021 06:47:36 +0100
reporter <laszlomail <at> protonmail.com> writes:

> Apparently, this is all what's needed:
>
>   (add-hook 'buffer-list-update-hook 'recentf-track-opened-file)
>
> So buffer-list-update-hook should be added to recentf-used-hooks
> in recentf.el

Some people would want the current behaviour, so I don't think doing
this by default would be the right thing to do, but I can certainly see
people who'd prefer recentf to work in this way.

So I've mentioned doing this `add-hook' in the recentf-mode doc string
in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Jan 2021 05:48:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 46153 <at> debbugs.gnu.org and reporter <laszlomail <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 29 Jan 2021 05:48:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Feb 2021 12:24:12 GMT) Full text and rfc822 format available.

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

Previous Next


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