GNU bug report logs - #56148
[PATCH] New command recentf-open

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Wed, 22 Jun 2022 14:59:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 29.1

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 56148 in the body.
You can then email your comments to 56148 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#56148; Package emacs. (Wed, 22 Jun 2022 14:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Jun 2022 14:59:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] New command recentf-open
Date: Wed, 22 Jun 2022 16:57:43 +0200
[Message part 1 (text/plain, inline)]
Severity: wishlist

In recentf-mode, I think it would be useful to provide a command to
open recent files using the minibuffer.  Please see the attached
patch.
[0001-New-command-recentf-open.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56148; Package emacs. (Wed, 22 Jun 2022 16:06:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 56148 <at> debbugs.gnu.org
Subject: Re: bug#56148: [PATCH] New command recentf-open
Date: Wed, 22 Jun 2022 19:04:52 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Wed, 22 Jun 2022 16:57:43 +0200
> 
> In recentf-mode, I think it would be useful to provide a command to
> open recent files using the minibuffer.  Please see the attached
> patch.

Thanks.

> +(defun recentf-open (file)
> +  "Prompt for FILE in `recentf-list' and visit it.
> +Enable `recentf-mode' if it isn't already."
> +  (interactive
> +   (list
> +    (progn (unless recentf-mode (recentf-mode 1))
> +           (completing-read (format-prompt "Open recent file" nil)
> +                            (mapcar #'abbreviate-file-name recentf-list)

Shouldn't you apply abbreviate-file-name only if recentf-menu-filter
is set to abbreviate them in the menu?

This mode is also described in the user manual; shouldn't this new
command be documented there?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56148; Package emacs. (Thu, 23 Jun 2022 11:20:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56148 <at> debbugs.gnu.org
Subject: Re: bug#56148: [PATCH] New command recentf-open
Date: Thu, 23 Jun 2022 13:19:04 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> > +                            (mapcar #'abbreviate-file-name recentf-list)
>
> Shouldn't you apply abbreviate-file-name only if recentf-menu-filter
> is set to abbreviate them in the menu?

Good question, however this was fixed in a different way in Bug#56123
so this is no longer necessary.  I've removed the mapcar and use
recentf-list directly instead.

> This mode is also described in the user manual; shouldn't this new
> command be documented there?

Yes, I saw a need for a rethink of the documentation, which was very
menu-centric.  So I rewrote it slightly to be less menu-centric; I
hope it now makes more sense.

Please find attached a new patch, and thanks for reviewing.
[0001-New-command-recentf-open.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56148; Package emacs. (Thu, 23 Jun 2022 12:57:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 56148 <at> debbugs.gnu.org
Subject: Re: bug#56148: [PATCH] New command recentf-open
Date: Thu, 23 Jun 2022 15:56:25 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 23 Jun 2022 13:19:04 +0200
> Cc: 56148 <at> debbugs.gnu.org
> 
> +                                               When this mode is
> +enabled, the @samp{File} menu will include a submenu containing a list
> +of recently opened files.

I think this sentence should end with "which you can use to visit one
of these files."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56148; Package emacs. (Sat, 25 Jun 2022 11:02:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56148 <at> debbugs.gnu.org
Subject: Re: bug#56148: [PATCH] New command recentf-open
Date: Sat, 25 Jun 2022 13:01:16 +0200
close 56148 29.1
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

> I think this sentence should end with "which you can use to visit one
> of these files."

Thanks, pushed to master with that change (commit 3d3029353b).




bug marked as fixed in version 29.1, send any further explanations to 56148 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 25 Jun 2022 11:02: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. (Sat, 23 Jul 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 249 days ago.

Previous Next


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