unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: 58364@debbugs.gnu.org
Subject: bug#58364: [PATCH] Add new function 'file-name-parent-p'
Date: Sat, 08 Oct 2022 13:10:18 +0300	[thread overview]
Message-ID: <83czb2lj79.fsf@gnu.org> (raw)
In-Reply-To: <87h70ehdnn.fsf@posteo.net> (message from Philip Kaludercic on Sat, 08 Oct 2022 09:23:40 +0000)

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: 58364@debbugs.gnu.org
> Date: Sat, 08 Oct 2022 09:23:40 +0000
> 
> > But perhaps our take from this is that file-in-directory-p is not
> > discoverable enough?  Can you describe how and where you looked for
> > this functionality?  Maybe if we know that, we could make some changes
> > to have this function pop up in similar searches.
> 
> I used M-x apropos-command "file parent" tried to find something in
> (elisp) File Names.  I now see that the function is documented under
> (elisp) Truenames, which appears unintuitive to me.  My guess is that
> had I seen the function name mentioned somewhere, I would have read over
> it since it sounds like a function that checks for "direct entries" in a
> directory.

I think a better place is in "Contents of Directories", since
locate-dominating-file is already there.  More importantly, what index
entries should we have for this function to make its discovery easier?
Something like "@cindex parent directory of file", perhaps?

For apropos, how about changing the doc string to say this instead:

  Return non-nil if DIR is a parent directory of FILE.

  Value is non-nil if FILE is inside DIR or inside a subdirectory of
  DIR.  A directory is considered to be a "parent" of itself.

  Dir must be an existing directory, otherwise the function returns
  nil.





  reply	other threads:[~2022-10-08 10:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07 20:23 bug#58364: [PATCH] Add new function 'file-name-parent-p' Philip Kaludercic
     [not found] ` <handler.58364.B.16651742163752.ack@debbugs.gnu.org>
2022-10-07 20:46   ` bug#58364: Acknowledgement ([PATCH] Add new function 'file-name-parent-p') Philip Kaludercic
2022-10-07 21:10 ` bug#58364: [PATCH] Add new function 'file-name-parent-p' Drew Adams
2022-10-08  6:17 ` Eli Zaretskii
2022-10-08  7:21   ` Philip Kaludercic
2022-10-08  8:01     ` Eli Zaretskii
2022-10-08  9:23       ` Philip Kaludercic
2022-10-08 10:10         ` Eli Zaretskii [this message]
2022-10-08 10:29           ` Philip Kaludercic
2022-10-08 11:16             ` Eli Zaretskii
2022-10-08 17:20           ` Drew Adams

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=83czb2lj79.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58364@debbugs.gnu.org \
    --cc=philipk@posteo.net \
    /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).