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: Tue, 03 Oct 2023 22:22:05 -0700 Message-ID: <877co33qf9.fsf@breatheoutbreathe.in> 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> <87h6ngs85e.fsf@web.de> <87ttr7nzyj.fsf@breatheoutbreathe.in> <87jzs33vqs.fsf@web.de> 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="29497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66187@debbugs.gnu.org, philipk@posteo.net To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 04 07:31:02 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 1qnuTN-0007Jv-Dy for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Oct 2023 07:31:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnuT9-0007YA-Fv; Wed, 04 Oct 2023 01:30: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 1qnuT7-0007XA-2F for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 01:30:45 -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 1qnuT6-0006dC-QY for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 01:30:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnuTO-0001UZ-Bj for bug-gnu-emacs@gnu.org; Wed, 04 Oct 2023 01:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Oct 2023 05:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66187 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: "Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors" , philipk@posteo.net, 66187@debbugs.gnu.org Original-Received: via spool by 66187-submit@debbugs.gnu.org id=B66187.16963974615724 (code B ref 66187); Wed, 04 Oct 2023 05:31:02 +0000 Original-Received: (at 66187) by debbugs.gnu.org; 4 Oct 2023 05:31:01 +0000 Original-Received: from localhost ([127.0.0.1]:41245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnuTM-0001UG-Jg for submit@debbugs.gnu.org; Wed, 04 Oct 2023 01:31:00 -0400 Original-Received: from out-205.mta0.migadu.com ([91.218.175.205]:59814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnuTJ-0001U6-N3 for 66187@debbugs.gnu.org; Wed, 04 Oct 2023 01:30:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1696397438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vjSB4OubI2HvszkOMdeDHXJdRuLMfKJ2IOskfqO38gU=; b=hyQILJjfgAraDCDYXsotQ5FaCV1CUW1xC/avbhZKBpMdvKLF/lO9JpbxoQOlXSsAQwBeS5 rwpzsLuw1W5zcUkKf3p7PmAw42bCePuvYDN0gLexY5EhgPJ1tKyYGELn95YVTFNJyPOa/Q /pudy5d4RaQ1+tD+Zy9sreeUG7m3elw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87jzs33vqs.fsf@web.de> X-Migadu-Flow: FLOW_OUT 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:271757 Archived-At: Michael Heerdegen writes: > Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > >> Since completing-read is such a fundamental part of Emacs, I doubt it >> will be possible to change this behavior. > > This is only about `read-file-name' - and MUST-MATCH being allowed to be > a function is quite new (June 2022). If we have good reasons to change > the behavior because we find that the case when both MUST-MATCH and > PREDICATE are specified does not work intuitively I think it would still > be possible to tune it a bit. > > But we have to know which behavior is more expected than what we > currently have. My original expectations: - PREDICATE narrows the list of completion candidates - MUST-MATCH function determines whether to accept the input I had thought that the two arguments would work independently of one another. IOW, the return value of MUST-MATCH would be the only factor that determines whether input is accepted. If MUST-MATCH returns non-nil, the input is unconditionally accepted, and vice versa. > This is only about `read-file-name' Doesn't the unexpected behavior originate in completing-read? Joseph