From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68815: Unexpected behavior with read-file-name and functional REQUIRE-MATCH argument Date: Wed, 31 Jan 2024 08:28:01 -0500 Message-ID: References: <8734ufyxoy.fsf@breatheoutbreathe.in> <87ttmuhvxi.fsf@breatheoutbreathe.in> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32708"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: michael_heerdegen@web.de, Philip Kaludercic , 68815@debbugs.gnu.org, Eli Zaretskii To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 31 14:29:26 2024 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 1rVAec-0008Ke-5Q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Jan 2024 14:29:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVAe8-0005qc-Pc; Wed, 31 Jan 2024 08:28:56 -0500 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 1rVAe5-0005qO-78 for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2024 08:28:53 -0500 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 1rVAe4-0000pY-BQ for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2024 08:28:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rVAeD-0001gt-K6 for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2024 08:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jan 2024 13:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68815 X-GNU-PR-Package: emacs Original-Received: via spool by 68815-submit@debbugs.gnu.org id=B68815.17067077016449 (code B ref 68815); Wed, 31 Jan 2024 13:29:01 +0000 Original-Received: (at 68815) by debbugs.gnu.org; 31 Jan 2024 13:28:21 +0000 Original-Received: from localhost ([127.0.0.1]:37720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVAdZ-0001fx-Ah for submit@debbugs.gnu.org; Wed, 31 Jan 2024 08:28:21 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVAdX-0001fh-5t for 68815@debbugs.gnu.org; Wed, 31 Jan 2024 08:28:19 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8F1BE4415C7; Wed, 31 Jan 2024 08:28:03 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1706707682; bh=XSqWmjeXQEIs19e1JHSo4jsID8mr+ZRtBInlBAkSfFg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZLl7Z/pjvMbeoohoo3jJc86zl1Q01G4HNQKpuiMp7KTlt0GqRXSW6QX5ft3rVLTZk VqXvJyk1ijSmcjS/7AKihReg9MjoFMRVu8Q3jqt5O8s9MOx+5fwxnYKfYIVOcBwiSg 0ntbDPWYpzXbVTsSb6f6BC4UwBEhwW38bK9pKb8PsQfk6LcJfY+moVMwMWtdyT5bZC XwUc+Gx/k+44pjmtq52XGm0krxlUgIYYReL2sge3RGat6rn+f3C+ymxO/VHR1vkw5H s1ivNkRSWbzSg6o+uzWLUP83zeubAVpqSssGeU71bxNXVRrB5rkpNIIy4cPicd/nsA mgoSxmcWSGgMA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5FDD24402EC; Wed, 31 Jan 2024 08:28:02 -0500 (EST) Original-Received: from pastel (104-222-119-131.cpe.teksavvy.com [104.222.119.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2E58F120AA9; Wed, 31 Jan 2024 08:28:02 -0500 (EST) In-Reply-To: <87ttmuhvxi.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Tue, 30 Jan 2024 22:11:37 -0800") 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:279223 Archived-At: >> They should wrap PRED so as to pass the arg through >> `substitute-in-file-name` (or otherwise arrange to make sure PRED is >> called with an unquoted file name). > Thank you for the clear instructions! Does the attached patch do the > right thing? I theory, I think it's correct, yes. Whether the rest of the code handles it correctly OTOH is a different question. E.g. I have the impression that currently the `read-file-name-internal` completion table presumes the PRED argument takes an already-unquoted file name. Also, performance can be a concern (in many cases it makes more sense to make the caller pass the unquoted name rather than force it to quote the name only for PRED to unquote it). IOW, I think we have a bit of a mess in our hands (that's what I was meant by "good old problem" =F0=9F=99=81). > If so, may it be applied to emacs-29? Definitely not material for `emacs-29` I'm afraid. Stefan