From unknown Sun Jun 15 09:00:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#48621: 28.0.50; UI inconsistency in `find-file-at-point` with respect to `ffap-newfile-prompt` Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 May 2021 13:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48621 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 48621@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162186437414245 (code B ref -1); Mon, 24 May 2021 13:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2021 13:52:54 +0000 Received: from localhost ([127.0.0.1]:42593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llB0o-0003hg-GI for submit@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 ) id 1llB0m-0003hZ-Fc for submit@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 ) id 1llB0l-0005ue-TO for bug-gnu-emacs@gnu.org; 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 ) id 1llB0j-0005PX-Pm for bug-gnu-emacs@gnu.org; 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=; From: Daniel Mendler Message-ID: <29ef6330-da22-fcea-590d-b35231a41a07@daniel-mendler.de> 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@daniel-mendler.de; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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) From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 03:11:51 2021 Received: (at control) by debbugs.gnu.org; 24 Oct 2021 07:11:51 +0000 Received: from localhost ([127.0.0.1]:37779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meXfb-0004lS-Km for submit@debbugs.gnu.org; Sun, 24 Oct 2021 03:11:51 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:33425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meXfZ-0004lF-KR for control@debbugs.gnu.org; Sun, 24 Oct 2021 03:11:50 -0400 Received: by mail-pg1-f176.google.com with SMTP id r28so3324851pga.0 for ; Sun, 24 Oct 2021 00:11:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=Tkdol0Q0tO1WxjGZLlHCmP52tD2qS73bsNZgyo576Pc=; b=fHGUQR+/ymltZbdVokhDx24iXcqzt1w2lbHVjeyNgSSoXV6EKNwesAiU6pq4RJ5fhW bvKEptACdtE3zr2J2Sc5JFZE6oHHuAZTS5MlrMUjsMGmQBWYkVj9HVoYJzKhQqm8Yeba PogI4ag9FJbIFNy9r7bABUSy3ZwQQqCSOS16JiiciYBm3DEdj1kRHTyY0vsuuKHbthmL P2ILMHbISuBCGctB6165YWMVDECLqU5048LJpSvpP7Ygm6foj0tzUdZYCwyN/DYVFmGh t7hyuQTv2nlC+A0+cQAVirXC5EnrA6nAnrUMOaZakPs/PxM5gtmMDaDIney708t8Zwea osYQ== X-Gm-Message-State: AOAM532zXHc/xfeXShvweZj2B8N+MybkFsn/5ad/FGkYMXL2qJgpp/4P dU/1sr3habWYUwEzGHp4mi6XYYYsKK7xaMoFYZ3AkJL3 X-Google-Smtp-Source: ABdhPJyitW3bfAr6XczPy33ZNsW2kGWOoijuEYaLL2e51RuoNUcdv1rVLZWqvI/IddBP06NXwMwCG48Xk3vUmNOx2d4= X-Received: by 2002:aa7:99c3:0:b0:47b:e21d:7315 with SMTP id v3-20020aa799c3000000b0047be21d7315mr3098552pfi.35.1635059504050; Sun, 24 Oct 2021 00:11:44 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 24 Oct 2021 00:11:43 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 24 Oct 2021 00:11:43 -0700 Message-ID: Subject: control message for bug #48621 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) severity 48621 minor quit