GNU bug report logs - #48621
28.0.50; UI inconsistency in `find-file-at-point` with respect to `ffap-newfile-prompt`

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Mon, 24 May 2021 13:53:02 UTC

Severity: minor

Found in version 28.0.50

To reply to this bug, email your comments to 48621 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#48621; Package emacs. (Mon, 24 May 2021 13:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Mendler <mail <at> daniel-mendler.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 24 May 2021 13:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; UI inconsistency in `find-file-at-point` with respect to
 `ffap-newfile-prompt`
Date: Mon, 24 May 2021 15:52:45 +0200
I am using the following configuration for `find-file-at-point`, where I
am request confirmation for new files, for both ffap and plain
`find-file` by setting `ffap-require-prefix=t` and
`confirm-nonexistant-file-or-buffer=t`.

(global-set-key "\C-x\C-f" #'find-file-at-point)
(setq ffap-newfile-prompt t
      confirm-nonexistant-file-or-buffer t)

There is a minor UI inconsistency using this setting:

(1) Press "C-u C-x C-f" (find-file is used) and enter a non-existing
file name. The confirmation mechanism of `completing-read` is used and
shows the message "[Confirm]".
(2) Press "C-u C-x C-f" (find-file-at-point is used) and enter a
non-existing file name. Ffap uses its own confirmation mechanism showing
the message "File does not exist, create buffer?".

In case (2) ffap should also use the confirmation mechanism of
`completing-read` for consistency. This requires setting the MUSTMATCH
argument to 'confirm in the call to `read-file-name` if
`ffap-newfile-prompt` is set and otherwise use the return value of
`(confirm-nonexistant-file-or-buffer)`.

Then the additional `y-or-n-p` prompt implemented in
`find-file-at-point` can be removed. Furthermore the variable
`ffap-newfile-prompt` should be deprecated given the existence of
`confirm-nonexistant-file-or-buffer`. I assume `ffap-newfile-prompt`
predates the introduction of `confirm-nonexistant-file-or-buffer`?

In GNU Emacs 28.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version
3.24.5, cairo version 1.16.0)
 of 2021-05-23 built on projects
Repository revision: 04e7c6da34df6b60e253a35b9baa3eba4062617f
Repository branch: icomplete-affixate
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)




Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 24 Oct 2021 07:12:03 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 234 days ago.

Previous Next


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