unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "60470-done@debbugs.gnu.org" <60470-done@debbugs.gnu.org>
Subject: bug#60470: 26.3; Doc string of `recentf-keep'
Date: Sun, 1 Jan 2023 22:31:55 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488EEE62BD88D57676569C5F3F69@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <83pmby2lfd.fsf@gnu.org>

> > Please consider saying in the doc string what it 
> > means to "keep" a file name in the recent list.
> >
> > The doc string goes into what it means to be a
> > predicate, but it says nothing, really, about
> > what this option means/does, because it tells
> > you nothing about what "keeping" amounts to.
> 
> I've rad the doc string, and I see nothing wrong with it.  In
> particular, I did find there the explanation of what "keeping" means.
> 
> So I'm closing this bug.

FWIW, I don't see any such explanation, in any doc string.

Following the code - e.g. the places where `recentf-keep-p'
is used, I can see that the use of `recentf-keep' differs
from the use of `recentf-exclude' (besides filtering in
instead of out) in that `recentf-keep' filtering happens
when you kill a buffer (via `recentf-track-closed-file')
or whether "cleanup" occurs.  That info is missing from
the option doc string.

Other than searching thus in the code, I see no way for a
user to know what "keep" means.  Does it refer to keeping
persistently, i.e., not removing when saving?  Does it
refer to keeping after the buffer for the file is killed?
When a "cleanup" occurs?  "Keep" in what way, wrt what?

I think a user will wonder about this.  And in particular
I don't see anything in the doc string of `recentf-keep'
that speaks to it - nothing that makes you not wonder how
this differs from the use of option `recentf-exclude'
(besides filtering in the opposite sense).

We give users two options for filtering the recentf list.
The doc string of one seems clear enough: it prevents
some file names _from being added_ to the list.  The
other doc string doesn't speak to the presumed _removal_
operations for which it prevents removal.  Its predicates
and regexps prevent removal of certain files - but what
is it that would otherwise cause their removal?

You can figure it out by either (1) looking at the code
or (2) checking _all_ of the doc to get a list of the
possible removal events/operations/occurrences, and
surmising that `recentf-keep' takes effect for all of
them.  But I don't see how you can figure it out just
by looking at the `recentf-keep' doc string.

Would you mind pointing to the part of the doc string
that you think explains what "keeping" means?  I really
don't see it.





  reply	other threads:[~2023-01-01 22:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 16:39 bug#60470: 26.3; Doc string of `recentf-keep' Drew Adams
2023-01-01 17:51 ` Eli Zaretskii
2023-01-01 22:31   ` Drew Adams [this message]
2023-01-02 13:00     ` Eli Zaretskii
2023-01-02 17:48       ` Drew Adams
2023-01-02 17:56         ` Eli Zaretskii

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=SJ0PR10MB5488EEE62BD88D57676569C5F3F69@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=60470-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).