GNU bug report logs - #78926
30.1; find-file-read-only require-match inconsistency

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Mon, 30 Jun 2025 10:38:02 UTC

Severity: wishlist

Found in version 30.1

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thierry Volpiatto <thievol <at> posteo.net>, 78926 <at> debbugs.gnu.org
Subject: bug#78926: 30.1; find-file-read-only require-match inconsistency
Date: Tue, 01 Jul 2025 15:13:48 +0000
[Message part 1 (text/plain, inline)]
I modified `completion--complete-and-exit` so that the REQUIRE-MATCH
argument used with a function as value allows this function to exit with
'confirm in addition of nil/non-nil.

I then modified find-file-read-only so that it takes advantage of this:
- If you enter a wilcard you are now asked for confirm.
- If you enter a non existing filename you can't exit ([nomatch].

Note:
Of course the current behavior of find-file-read-only is fine, maybe a
little confusing but it's ok, this patch is just a proof of concept for
REQUIRE-MATCH used as a function with this new behavior.

The patches need to be reworked, didn't fully test the non interactive
usage and nothing is documented, particularly REQUIRE-MATCH in
completing-read, need also you commentaries because I guess not all the
corner cases are completed.

Thanks.

-- 
Thierry
[0001-Allow-require-match-as-a-function-to-return-confirm.patch (text/x-diff, attachment)]
[0002-Make-find-file-read-only-ask-for-confirmation-or.patch (text/x-diff, attachment)]

This bug report was last modified 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.