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#66187: read-file-name unexpected behavior when MUSTMATCH is a function Date: Wed, 04 Oct 2023 09:05:29 +0300 Message-ID: <83ttr66hxy.fsf@gnu.org> References: <87r0mni6m1.fsf@breatheoutbreathe.in> <87bkdq3nw6.fsf@web.de> <875y3yx221.fsf@breatheoutbreathe.in> <87pm260wh9.fsf@web.de> <87v8bx48ww.fsf@breatheoutbreathe.in> <87msx8sbpv.fsf@web.de> <87bkdoh1gy.fsf@breatheoutbreathe.in> <83y1gpyysv.fsf@gnu.org> <871qebph9p.fsf@breatheoutbreathe.in> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael_heerdegen@web.de, philipk@posteo.net, 66187@debbugs.gnu.org To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 04 08:06:13 2023 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 1qnv1Q-0000K5-UI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Oct 2023 08:06:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnv11-0005a1-Q9; Wed, 04 Oct 2023 02:05:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnv0z-0005Zq-Lo for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 02:05:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnv0y-0004a1-O1 for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 02:05:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnv1G-0002YJ-9Z for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 02:06: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: Wed, 04 Oct 2023 06:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66187 X-GNU-PR-Package: emacs Original-Received: via spool by 66187-submit@debbugs.gnu.org id=B66187.16963995579799 (code B ref 66187); Wed, 04 Oct 2023 06:06:02 +0000 Original-Received: (at 66187) by debbugs.gnu.org; 4 Oct 2023 06:05:57 +0000 Original-Received: from localhost ([127.0.0.1]:41287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnv1A-0002Xz-Om for submit@debbugs.gnu.org; Wed, 04 Oct 2023 02:05:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnv18-0002Xm-8B for 66187@debbugs.gnu.org; Wed, 04 Oct 2023 02:05:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnv0j-0004WJ-Ak; Wed, 04 Oct 2023 02:05:30 -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=fW8/qECV9qD7q61Jfac5DSJ5MN4ZPCMw6WYxJeGEtIo=; b=WiyLo2rVr5r3 UHdKVvCd3+RWdzZbkL0V1pYlmAaC4WZye5ZJ0TLWJSiTL6f3YFWgwloM1ZB/KkWmB2MlpgIfAnEkx LlKxmWZo4eexqwwCTXtQccaqIN1gTNutCDD9nyIKJ1b6KdPloRP33zT3J9eEZXyLNl9Pr8PCSxeZ+ 3lAXoUoM0DTMgGiz9VQyukqrCmHXQH3sMJ8vBhtozkR8wMJte6GOgH5SICZmjvw6Oyfo3k0fsztFz WS2ya0FOLoE4rPAdzPRdp02n/PetXG1UL9ow7CqqPRy3jmTjfTSP2FC8l22fp68bH1Rv8SX8r3CDX 23vZyZ3MUv+oSKoiWRbvvA==; In-Reply-To: <871qebph9p.fsf@breatheoutbreathe.in> (message from Joseph Turner on Tue, 03 Oct 2023 13:43:56 -0700) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271760 Archived-At: > From: Joseph Turner > Cc: michael_heerdegen@web.de, philipk@posteo.net, 66187@debbugs.gnu.org > Date: Tue, 03 Oct 2023 13:43:56 -0700 > > > Eli Zaretskii writes: > > >> Cc: philipk@posteo.net, 66187@debbugs.gnu.org > >> Date: Tue, 26 Sep 2023 17:55:37 -0700 > >> From: Joseph Turner via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> > Finally, I think the docstring of `read-directory-name' needs to be > >> > updated: it fails to mention that MUSTMATCH can be a function (the > >> > argument is passed directly to `read-file-name'). > >> > >> How about the attached patch? > > > > This is okay, except that we do document the other arguments. So why > > not just copy/paste the description of MUSTMATCH from read-file-name > > to read-directory-name instead? > > The read-file-name docstring for MUSTMATCH is lengthy, and duplicating > it will mean that if read-file-name changes, we'll need to remember to > change the docstring of read-directory-name. That's true, but it doesn't sound like a grave problem to me. We have the same duplication elsewhere, so this isn't a precedent. Moreover, when a doc string is long and complicated, asking the reader to read part of it elsewhere is also quite a hassle. So I still think duplication is the lesser evil here.