From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58364: [PATCH] Add new function 'file-name-parent-p' Date: Sat, 08 Oct 2022 14:16:07 +0300 Message-ID: <838rlqlg5k.fsf@gnu.org> References: <87h70f758g.fsf@posteo.net> <831qrin8jc.fsf@gnu.org> <87sfjy93xe.fsf@posteo.net> <83fsfylp57.fsf@gnu.org> <87h70ehdnn.fsf@posteo.net> <83czb2lj79.fsf@gnu.org> <877d1aham4.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26868"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58364@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 08 13:17:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oh7pp-0006lW-3S for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Oct 2022 13:17:37 +0200 Original-Received: from localhost ([::1]:41188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oh7pn-0006AE-KS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Oct 2022 07:17:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh7pH-0005vH-22 for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2022 07:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oh7pG-0004Il-OY for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2022 07:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oh7pG-0005QS-JY for bug-gnu-emacs@gnu.org; Sat, 08 Oct 2022 07:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Oct 2022 11:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58364 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58364-submit@debbugs.gnu.org id=B58364.166522777420788 (code B ref 58364); Sat, 08 Oct 2022 11:17:02 +0000 Original-Received: (at 58364) by debbugs.gnu.org; 8 Oct 2022 11:16:14 +0000 Original-Received: from localhost ([127.0.0.1]:38428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oh7oT-0005PE-TQ for submit@debbugs.gnu.org; Sat, 08 Oct 2022 07:16:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oh7oR-0005Oz-Ds for 58364@debbugs.gnu.org; Sat, 08 Oct 2022 07:16:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh7oM-000453-6u; Sat, 08 Oct 2022 07:16:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+XvKHYXUU+14+rt8B4ofMnl2Y8VP4WP4jYCqKj8sCbc=; b=I164mfWGlR7A cUEir5q7lEOYKR9BPvasO1LDKyx9ZvrgFUBv2dfk9/LMXDsh4lswZxfGHqYAjUJiriboBeknb/il/ R0BVWhvbm6jA0pxGvXlW6T+lF6CqtNcU8LSxM0vUPFrDWfPhYPK6fTfyW7hHKZnr/yFKwIQ/HdSZ9 8GN5dsYje7chL5pgu2N5BShqHiwa0To9nLqQE5DnnsVCYhVcX3Si0DkS+o+577sHaIl1fZZCGLft2 PTCaKrvD0+71Gu7+w+0yeAOKA7f1hvCLN86JSM5Lf+05tAdRg/yEPYYAVsKV9roMSwJlTN+ZBE0jB 66+OjBmQrFTwRn4wzG/78Q==; Original-Received: from [87.69.77.57] (port=2124 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oh7oL-0002PI-K5; Sat, 08 Oct 2022 07:16:06 -0400 In-Reply-To: <877d1aham4.fsf@posteo.net> (message from Philip Kaludercic on Sat, 08 Oct 2022 10:29:23 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244884 Archived-At: > From: Philip Kaludercic > Cc: 58364@debbugs.gnu.org > Date: Sat, 08 Oct 2022 10:29:23 +0000 > > > I think a better place is in "Contents of Directories", since > > locate-dominating-file is already there. > > I agree, sounds good. > > > More importantly, what index > > entries should we have for this function to make its discovery easier? > > Something like "@cindex parent directory of file", perhaps? > > Drew brought up the word "ancestor", which might also be a word that > people would use to find such a function. I added both. > > 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 > ^ > shouldn't this be "DIR"? Yes, of course. Done on the release branch.