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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Daniel Mendler <mail@HIDDEN>; dated Mon, 24 May 2021 13:53:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 May 2021 13:52:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 24 09:52:54 2021
Received: from localhost ([127.0.0.1]:42593 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1llB0o-0003hg-GI
	for submit <at> debbugs.gnu.org; Mon, 24 May 2021 09:52:54 -0400
Received: from lists.gnu.org ([209.51.188.17]:54570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1llB0m-0003hZ-Fc
 for submit <at> debbugs.gnu.org; Mon, 24 May 2021 09:52:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33554)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1llB0l-0005ue-TO
 for bug-gnu-emacs@HIDDEN; Mon, 24 May 2021 09:52:52 -0400
Received: from server.qxqx.de ([2a01:4f8:121:346::180]:59297 helo=mail.qxqx.de)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>)
 id 1llB0j-0005PX-Pm
 for bug-gnu-emacs@HIDDEN; Mon, 24 May 2021 09:52:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de;
 s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:
 Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=jE25cIvrGykeslGLd223ln9FpX4fxzh19LLsrpXr0jw=; b=tqe7Xt146yr65BByFUXzC1oTT9
 YGE5V2a18XET0CfXu6awETurXRMyeOD/+GzQA338aVSoXI5qrglk6Zn0pWJUEcLUjUry/fYPXg27K
 tMYJUu2/OMHYH5UjjA+2mLhNQIXNI4PyQnUL5zYmJ/304LucB76+r7AnMwwVitSajwAs=;
To: bug-gnu-emacs@HIDDEN
From: Daniel Mendler <mail@HIDDEN>
Subject: 28.0.50; UI inconsistency in `find-file-at-point` with respect to
 `ffap-newfile-prompt`
Message-ID: <29ef6330-da22-fcea-590d-b35231a41a07@HIDDEN>
Date: Mon, 24 May 2021 15:52:45 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=2a01:4f8:121:346::180;
 envelope-from=mail@HIDDEN; helo=mail.qxqx.de
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

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)




Acknowledgement sent to Daniel Mendler <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48621; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 24 Oct 2021 07:15:01 UTC

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