From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66187: read-file-name unexpected behavior when MUSTMATCH is a function Date: Sun, 24 Sep 2023 14:31:28 -0700 Message-ID: <87r0mni6m1.fsf@breatheoutbreathe.in> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20385"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic (Emacs) To: 66187@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 23:51: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 1qkX0R-00050t-JH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 23:51:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkX08-0001zU-Se; Sun, 24 Sep 2023 17:50:52 -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 1qkX07-0001yv-0F for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 17:50:51 -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 1qkX06-0002F4-Og for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 17:50:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkX0I-0003mE-CZ; Sun, 24 Sep 2023 17:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: philipk@posteo.net, bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 21:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66187 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bugs Mailing List X-Debbugs-Original-Xcc: Philip Kaludercic (Emacs) Original-Received: via spool by submit@debbugs.gnu.org id=B.169559223514479 (code B ref -1); Sun, 24 Sep 2023 21:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2023 21:50:35 +0000 Original-Received: from localhost ([127.0.0.1]:43703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkWzr-0003lT-FG for submit@debbugs.gnu.org; Sun, 24 Sep 2023 17:50:35 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:40856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkWzm-0003lA-F3 for submit@debbugs.gnu.org; Sun, 24 Sep 2023 17:50:34 -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 1qkWzU-0001dC-Ao for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 17:50:12 -0400 Original-Received: from out-190.mta1.migadu.com ([2001:41d0:203:375::be]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkWzR-0002Bg-NG for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 17:50:12 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1695592205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Ai+TW9gua7Qt5eTa1GJ1RKnGlxO/L5A2fm4IhT70MuU=; b=BwhT+K4S5q58vuesIg7Af5IiZsUvAvLqFgP0IHCVWAhUTteLtSK392wVHZRBDHSV/9LZi/ UEYIPGm2tAnsSMDW3Y5G9d3zs3k/Agonpx8f3ZjswJD9NwafnxAOSdgZO72jSAirdpYshL Z8b+yokbgf3BvdoSLuuI2LIVsQbh1r4= X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::be; envelope-from=joseph@breatheoutbreathe.in; helo=out-190.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:271276 Archived-At: Hello! When the MUSTMATCH argument to read-file-name is a function, I'd expect to see a message like "[Match required]" when the function returns nil. For example, I'd expect the following to never match: (read-file-name "Prompt: " nil nil #'ignore) The behavior of read-file-name is unspecified when a MUSTMATCH function returns nil: - a function, which will be called with the input as the argument. If the function returns a non-nil value, the minibuffer is exited with that argument as the value. Would someone kindly explain the intended behavior here? This issue originally came up in this thread about package-vc-checkout: https://yhetil.org/emacs-bugs/87v8bzi7iz.fsf@breatheoutbreathe.in/T/#m224de986dcc97f23e17386fb0dd2db4a513726bf Thanks! Joseph