unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 56148@debbugs.gnu.org
Subject: bug#56148: [PATCH] New command recentf-open
Date: Wed, 22 Jun 2022 19:04:52 +0300	[thread overview]
Message-ID: <83wnd8it0b.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkmnnS7jga9Ezg7cPWCkrPydq8Fm=rCwKmX-p+gBG-M=9fQ@mail.gmail.com> (message from Stefan Kangas on Wed, 22 Jun 2022 16:57:43 +0200)

> From: Stefan Kangas <stefan@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?





  reply	other threads:[~2022-06-22 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 14:57 bug#56148: [PATCH] New command recentf-open Stefan Kangas
2022-06-22 16:04 ` Eli Zaretskii [this message]
2022-06-23 11:19   ` Stefan Kangas
2022-06-23 12:56     ` Eli Zaretskii
2022-06-25 11:01       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wnd8it0b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=56148@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).