GNU logs - #52167, boring messages


Message sent to ada-mode-users@HIDDEN, bug-gnu-emacs@HIDDEN, stephen_leake@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#52167: 29.0.50; [ada-mode] Preserve default value of project-read-file-name-function
Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: ada-mode-users@HIDDEN, bug-gnu-emacs@HIDDEN, stephen_leake@HIDDEN
Resent-Date: Sun, 28 Nov 2021 20:40:01 +0000
Resent-Message-ID: <handler.52167.B.163813198713995 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 52167
X-GNU-PR-Package: emacs, ada-mode
X-GNU-PR-Keywords: 
To: 52167 <at> debbugs.gnu.org
Cc: ada-mode-users@HIDDEN
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
X-Debbugs-Original-Xcc: ada-mode-users@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.163813198713995
          (code B ref -1); Sun, 28 Nov 2021 20:40:01 +0000
Received: (at submit) by debbugs.gnu.org; 28 Nov 2021 20:39:47 +0000
Received: from localhost ([127.0.0.1]:36424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrQxe-0003de-BM
	for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 15:39:46 -0500
Received: from lists.gnu.org ([209.51.188.17]:46982)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevin.legouguec@HIDDEN>) id 1mrQxc-0003dW-0t
 for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 15:39:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33294)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>)
 id 1mrQxb-00072R-R2
 for bug-gnu-emacs@HIDDEN; Sun, 28 Nov 2021 15:39:43 -0500
Received: from [2a00:1450:4864:20::335] (port=43771
 helo=mail-wm1-x335.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>)
 id 1mrQxZ-00031C-8V
 for bug-gnu-emacs@HIDDEN; Sun, 28 Nov 2021 15:39:43 -0500
Received: by mail-wm1-x335.google.com with SMTP id
 o19-20020a1c7513000000b0033a93202467so10952922wmc.2
 for <bug-gnu-emacs@HIDDEN>; Sun, 28 Nov 2021 12:39:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:date:message-id:mime-version;
 bh=XnKiUrtOA58/3HT67ij/NS8Ee/KOhyTZduCVRWMbOKI=;
 b=EFatTmRPVK6q70c+LtXjsE37toKHGrsc+N4l8mCJy2gzPYvxYNatc+h8IMV/wic8Z4
 gcVJC+Os8VhWQXM0Lj+D73eA2HxkJzYz0VJjGI880oWAzvsmvE/LGs8yuaFOW752ZMPK
 uO5VjJScvu7EG97jRCkSMha8dYl/E/jE3GXGxNToPMZr4tccfznXAz25KxXtJAGiW283
 vpOBXZ5RWjAtaHIjsCPa1EiQvFle7G6hi6kxntstvD6sPwLHb83GriRXHTA+a/V4aEjL
 Zw5VyH1CXm7b3f/qCz0ilBR2yzeQsGiX/iYOLsk4tjF1+px2ObaV4GSUSawHgvtcWzw8
 z3gA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=XnKiUrtOA58/3HT67ij/NS8Ee/KOhyTZduCVRWMbOKI=;
 b=ZE0TVXxllSy7E63jD+FlKmHt/gXWHbLPZdrxsW+5VWYMrcsZC0mf1eLKLAub0pkV8z
 f4Ey/NRVmfDbe4iLA2NNndQcLyotDrxyRv5q6sSmigYWYXC2JPp+BS3pSCyqeShbTx2z
 sc1exM+U4I8br1MZf6mYhM4/VR/I0cN1MH3zCNdoTFVSoJ0qnBClxfoM1YvB8pinm/RM
 NTp0KP/sxpyO7pO69C7RC3yP9qAqqadMZXMCElcuYk4+ltaAadgvt2f/oyoas/c1RUxQ
 6F45ReV6PgpiepXB98HYSakPJbaE108Gq6SqlOteWJazHgV48xZNLkK41/k/I3rEeOy6
 4Qqw==
X-Gm-Message-State: AOAM531+j1mtfXTQupH7tcAl9WxrkuYgz4nLfgEc9MbECTkX6HlutpkH
 Qh4/7zUc+tAcCuVegDUjTtZRFpoEcxw=
X-Google-Smtp-Source: ABdhPJy/TL5L2idmQlUJxZRzdqwntmTcrJa5mJyLBMagxS6Yhy3VFOyFXNkOiTx2hsIZH+SFx765QA==
X-Received: by 2002:a05:600c:3788:: with SMTP id
 o8mr31051067wmr.82.1638131979473; 
 Sun, 28 Nov 2021 12:39:39 -0800 (PST)
Received: from hirondell ([109.190.253.16])
 by smtp.gmail.com with ESMTPSA id h18sm13029257wre.46.2021.11.28.12.39.37
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 28 Nov 2021 12:39:38 -0800 (PST)
From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 21:39:22 +0100
Message-ID: <871r30ypz9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::335;
 envelope-from=kevin.legouguec@HIDDEN; helo=mail-wm1-x335.google.com
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
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.3 (--)

--=-=-=
Content-Type: text/plain

Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users@HIDDEN

Hello,

ada-mode depends on uniquify-files, which ends with this:

> ;;;###autoload
> (setq-default project-read-file-name-function #'uniq-file-read)

This unconditionally changes the prompt for project-find-file at
startup.  I think this is a bit of an overreach: users who install
ada-mode are not necessarily looking for a new project-find-file prompt
for *all* their projects, including those unrelated to Ada.

I'm attaching

- a patch for uniquify-files to remove the above snippet, and add a bit
  of commentary explaining how to opt in to uniq-file-read,

- a patch for ada-mode to explicitly let-bind
  project-read-file-name-function before calling project-find-file,

- two more patches for ada-mode, which I didn't squash with the first
  one because I'm not 100% sure they are desirable: one to make
  ada-find-file support future Emacs versions; another to use
  ada-find-file in ada-mode-menu.

Let me know if this needs more work; thanks for your time.



--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Preserve-default-value-of-project-read-file-name-fun.patch

From 38a1d0ae71b13b7676ea0ede0a605ff6f23aceed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sat, 27 Nov 2021 23:52:50 +0100
Subject: [PATCH] Preserve default value of project-read-file-name-function

This package can be pulled as a dependency (e.g. of ada-mode),
unbeknownst to the user who might not expect nor desire this setting.

* uniquify-files.el: Do not unconditionally change
project-read-file-name-function; expand commentary to let users know
how to opt in.
---
 uniquify-files.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/uniquify-files.el b/uniquify-files.el
index d9430539fe..a314d001fc 100644
--- a/uniquify-files.el
+++ b/uniquify-files.el
@@ -33,6 +33,11 @@
 ;; We accomplish this by preprocessing the list of absolute file names
 ;; to be in that style, in an alist with the original absolute file
 ;; names, and do completion on that alist.
+;;
+;; To use it with `project-find-file', customize
+;; `project-read-file-name-function':
+;;
+;; (setq project-read-file-name-function 'uniq-file-read)
 
 (require 'cl-lib)
 (require 'files)
@@ -317,8 +322,5 @@ done on UNIQIFIED-NAME, PRED is called with ABS-NAME."
                  prompt table predicate hist default)))
     (cdr (assoc found alist))))
 
-;;;###autoload
-(setq-default project-read-file-name-function #'uniq-file-read)
-
 (provide 'uniquify-files)
 ;;; uniquify-files.el ends here
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Explicitly-bind-project-read-file-name-function.patch

From 5ee3ab88fb9c439165a23fad03468c62e2f3ce4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:19:20 +0100
Subject: [PATCH 1/3] Explicitly bind project-read-file-name-function

* ada-mode.el (ada-find-file): let-bind
project-read-file-name-function.
* NEWS: announce the change.
---
 NEWS        | 13 +++++++++++++
 ada-mode.el |  9 +++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index fe3e518f11..ff64186a13 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,19 @@ Please send ada-mode bug reports to bug-gnu-emacs@HIDDEN, with
 'ada-mode' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* Ada Mode x.x.x
+xx Xxx xxxx
+
+** Adapt to change in uniquify-files.
+   uniquify-files no longer sets project-read-file-name-function by
+   default.  ada-find-file (C-c C-t) will still use this package's
+   completion style, but project-find-file (C-x p f) will not by
+   default.
+
+   Set project-read-file-name-function to uniq-file-read if you would
+   like to keep using uniquify-files's completion style outside of
+   ada-find-file.
+
 * Ada Mode 7.2.0
 21 Nov 2021
 
diff --git a/ada-mode.el b/ada-mode.el
index a65c7b47da..9997f35c99 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1462,12 +1462,13 @@ For `wisi-indent-calculate-functions'.
   "Find a file in the current project.
 Prompts with completion, defaults to filename at point."
   (interactive)
-  ;; In emacs 27, we can just call 'project-find-file;
-  ;; project-read-file-name-function handles the uniquify-files alist
-  ;; completion table. In emacs 26, we must do that ourselves.
+  ;; In emacs 27, we can just set project-read-file-name-function to
+  ;; tell 'project-find-file to use the uniquify-files alist
+  ;; completion table.  In emacs 26, we must do that ourselves.
   (cl-ecase emacs-major-version
     (27
-     (project-find-file))
+     (let ((project-read-file-name-function #'uniq-file-read))
+       (project-find-file)))
 
     (26
      (let* ((def (thing-at-point 'filename))
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0002-ada-mode.el-ada-mode-menu-Prefer-ada-find-file.patch

From a221c350e7697c6000c1b0030d964501426a1b2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:46:48 +0100
Subject: [PATCH 2/3] * ada-mode.el (ada-mode-menu): Prefer ada-find-file

---
 ada-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ada-mode.el b/ada-mode.el
index 9997f35c99..fa2c4a4f7a 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -246,7 +246,7 @@ nil, only the file name."
      )
     ("Navigate"
      ["Other file"                    ada-find-other-file          t]
-     ["Find file in project"          project-find-file            t]
+     ["Find file in project"          ada-find-file                t]
      ["Goto declaration/body"         wisi-goto-spec/body          t]
      ["Goto next statement keyword"   forward-sexp   t]
      ["Goto prev statement keyword"   backward-sexp   t]
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0003-ada-mode.el-ada-find-file-Support-future-Emacs-versi.patch

From b0bd0e796333f80a21c5d73d2cde97d7cf18b095 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:48:35 +0100
Subject: [PATCH 3/3] * ada-mode.el (ada-find-file): Support future Emacs
 versions

---
 ada-mode.el | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/ada-mode.el b/ada-mode.el
index fa2c4a4f7a..980fcb081e 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1465,23 +1465,20 @@ Prompts with completion, defaults to filename at point."
   ;; In emacs 27, we can just set project-read-file-name-function to
   ;; tell 'project-find-file to use the uniquify-files alist
   ;; completion table.  In emacs 26, we must do that ourselves.
-  (cl-ecase emacs-major-version
-    (27
-     (let ((project-read-file-name-function #'uniq-file-read))
-       (project-find-file)))
-
-    (26
-     (let* ((def (thing-at-point 'filename))
-	    (project (project-current))
-	    (all-files (project-files project nil))
-	    (alist (uniq-file-uniquify all-files))
-	    (table (apply-partially #'uniq-file-completion-table alist))
-            (file (project--completing-read-strict
-                   "Find file" table nil nil def)))
-       (if (string= file "")
-           (user-error "You didn't specify the file")
-	 (find-file (cdr (assoc file alist))))))
-    ))
+  (require 'project)
+  (if (boundp 'project-read-file-name-function)
+      (let ((project-read-file-name-function #'uniq-file-read))
+        (project-find-file))
+    (let* ((def (thing-at-point 'filename))
+	   (project (project-current))
+	   (all-files (project-files project nil))
+	   (alist (uniq-file-uniquify all-files))
+	   (table (apply-partially #'uniq-file-completion-table alist))
+           (file (project--completing-read-strict
+                  "Find file" table nil nil def)))
+      (if (string= file "")
+          (user-error "You didn't specify the file")
+	(find-file (cdr (assoc file alist)))))))
 
 ;;;; compatibility with previous ada-mode versions
 
-- 
2.34.0


--=-=-=
Content-Type: text/plain


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-11-26 built on hirondell
Repository revision: 11860f89a593a8cfe7efb94e86370bbbe4318fba
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-xwidgets --with-cairo --with-gconf --with-xinput2'

Configured features:
ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN>
Subject: bug#52167: Acknowledgement (29.0.50; [ada-mode] Preserve default
 value of project-read-file-name-function)
Message-ID: <handler.52167.B.163813198713995.ack <at> debbugs.gnu.org>
References: <871r30ypz9.fsf@HIDDEN>
X-Gnu-PR-Message: ack 52167
X-Gnu-PR-Package: emacs, ada-mode
Reply-To: 52167 <at> debbugs.gnu.org
Date: Sun, 28 Nov 2021 20:40:01 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  ada-mode-users@HIDDEN
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN
 stephen_leake@HIDDEN

If you wish to submit further information on this problem, please
send it to 52167 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
52167: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D52167
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


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


Received: (at control) by debbugs.gnu.org; 29 Nov 2021 15:28:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 10:28:50 2021
Received: from localhost ([127.0.0.1]:38913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mriaI-0006TW-4H
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 10:28:50 -0500
Received: from quimby.gnus.org ([95.216.78.240]:58978)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mriaF-0006TE-Nb
 for control <at> debbugs.gnu.org; Mon, 29 Nov 2021 10:28:48 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding: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=l8radoqYlbRS3uuSin2+DoNyn7/cSv2QNSFCXLHjuWs=; b=kRA5pVKmq4l2Gt9dEzwFw6N0ei
 L9S5Ijrkegn6c+mG9pwdigtzZ/YdG2CBWZgT3W2zINGlZ4OGl7kY6xeUgjfDRinZ5MhLvTontUxJH
 4cvVHMV1+cZRvLC2w9vVykM5zOng2TVTpIEXEFjlrU5yk20TR1jyCoE+9uLbeCpAQZ2c=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1mria7-0005bB-Pl
 for control <at> debbugs.gnu.org; Mon, 29 Nov 2021 16:28:42 +0100
Date: Mon, 29 Nov 2021 16:28:38 +0100
Message-Id: <87r1azvv4p.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #52167
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  tags 52167 + patch quit 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
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: -3.3 (---)

tags 52167 + patch
quit





Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Stephen Leake <stephen_leake@HIDDEN>
Subject: bug#52167: closed (29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function)
CC: tracker <at> debbugs.gnu.org
Message-ID: <handler.52167.D52167.165373657319320.ackdone <at> debbugs.gnu.org>
References: <86pmjx9ac2.fsf@HIDDEN> <871r30ypz9.fsf@HIDDEN>
X-Gnu-PR-Message: closed 52167
X-Gnu-PR-Package: emacs, ada-mode
X-Gnu-PR-Keywords: patch
Date: Sat, 28 May 2022 11:17:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1653736622-19379-0"

This is a multi-part message in MIME format...

------------=_1653736622-19379-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

Your message dated Sat, 28 May 2022 04:15:57 -0700
with message-id <86pmjx9ac2.fsf@HIDDEN>
and subject line 29.0.50; [ada-mode] Preserve default value of project-read=
-file-name-function
has caused the debbugs.gnu.org bug report #52167,
regarding 29.0.50; [ada-mode] Preserve default value of project-read-file-n=
ame-function
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@HIDDEN)


--=20
52167: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D52167
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1653736622-19379-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 28 Nov 2021 20:39:47 +0000
Received: from localhost ([127.0.0.1]:36424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrQxe-0003de-BM
	for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 15:39:46 -0500
Received: from lists.gnu.org ([209.51.188.17]:46982)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevin.legouguec@HIDDEN>) id 1mrQxc-0003dW-0t
 for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 15:39:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33294)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>)
 id 1mrQxb-00072R-R2
 for bug-gnu-emacs@HIDDEN; Sun, 28 Nov 2021 15:39:43 -0500
Received: from [2a00:1450:4864:20::335] (port=43771
 helo=mail-wm1-x335.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>)
 id 1mrQxZ-00031C-8V
 for bug-gnu-emacs@HIDDEN; Sun, 28 Nov 2021 15:39:43 -0500
Received: by mail-wm1-x335.google.com with SMTP id
 o19-20020a1c7513000000b0033a93202467so10952922wmc.2
 for <bug-gnu-emacs@HIDDEN>; Sun, 28 Nov 2021 12:39:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:date:message-id:mime-version;
 bh=XnKiUrtOA58/3HT67ij/NS8Ee/KOhyTZduCVRWMbOKI=;
 b=EFatTmRPVK6q70c+LtXjsE37toKHGrsc+N4l8mCJy2gzPYvxYNatc+h8IMV/wic8Z4
 gcVJC+Os8VhWQXM0Lj+D73eA2HxkJzYz0VJjGI880oWAzvsmvE/LGs8yuaFOW752ZMPK
 uO5VjJScvu7EG97jRCkSMha8dYl/E/jE3GXGxNToPMZr4tccfznXAz25KxXtJAGiW283
 vpOBXZ5RWjAtaHIjsCPa1EiQvFle7G6hi6kxntstvD6sPwLHb83GriRXHTA+a/V4aEjL
 Zw5VyH1CXm7b3f/qCz0ilBR2yzeQsGiX/iYOLsk4tjF1+px2ObaV4GSUSawHgvtcWzw8
 z3gA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=XnKiUrtOA58/3HT67ij/NS8Ee/KOhyTZduCVRWMbOKI=;
 b=ZE0TVXxllSy7E63jD+FlKmHt/gXWHbLPZdrxsW+5VWYMrcsZC0mf1eLKLAub0pkV8z
 f4Ey/NRVmfDbe4iLA2NNndQcLyotDrxyRv5q6sSmigYWYXC2JPp+BS3pSCyqeShbTx2z
 sc1exM+U4I8br1MZf6mYhM4/VR/I0cN1MH3zCNdoTFVSoJ0qnBClxfoM1YvB8pinm/RM
 NTp0KP/sxpyO7pO69C7RC3yP9qAqqadMZXMCElcuYk4+ltaAadgvt2f/oyoas/c1RUxQ
 6F45ReV6PgpiepXB98HYSakPJbaE108Gq6SqlOteWJazHgV48xZNLkK41/k/I3rEeOy6
 4Qqw==
X-Gm-Message-State: AOAM531+j1mtfXTQupH7tcAl9WxrkuYgz4nLfgEc9MbECTkX6HlutpkH
 Qh4/7zUc+tAcCuVegDUjTtZRFpoEcxw=
X-Google-Smtp-Source: ABdhPJy/TL5L2idmQlUJxZRzdqwntmTcrJa5mJyLBMagxS6Yhy3VFOyFXNkOiTx2hsIZH+SFx765QA==
X-Received: by 2002:a05:600c:3788:: with SMTP id
 o8mr31051067wmr.82.1638131979473; 
 Sun, 28 Nov 2021 12:39:39 -0800 (PST)
Received: from hirondell ([109.190.253.16])
 by smtp.gmail.com with ESMTPSA id h18sm13029257wre.46.2021.11.28.12.39.37
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 28 Nov 2021 12:39:38 -0800 (PST)
From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function
Date: Sun, 28 Nov 2021 21:39:22 +0100
Message-ID: <871r30ypz9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::335;
 envelope-from=kevin.legouguec@HIDDEN; helo=mail-wm1-x335.google.com
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
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.3 (--)

--=-=-=
Content-Type: text/plain

Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users@HIDDEN

Hello,

ada-mode depends on uniquify-files, which ends with this:

> ;;;###autoload
> (setq-default project-read-file-name-function #'uniq-file-read)

This unconditionally changes the prompt for project-find-file at
startup.  I think this is a bit of an overreach: users who install
ada-mode are not necessarily looking for a new project-find-file prompt
for *all* their projects, including those unrelated to Ada.

I'm attaching

- a patch for uniquify-files to remove the above snippet, and add a bit
  of commentary explaining how to opt in to uniq-file-read,

- a patch for ada-mode to explicitly let-bind
  project-read-file-name-function before calling project-find-file,

- two more patches for ada-mode, which I didn't squash with the first
  one because I'm not 100% sure they are desirable: one to make
  ada-find-file support future Emacs versions; another to use
  ada-find-file in ada-mode-menu.

Let me know if this needs more work; thanks for your time.



--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Preserve-default-value-of-project-read-file-name-fun.patch

From 38a1d0ae71b13b7676ea0ede0a605ff6f23aceed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sat, 27 Nov 2021 23:52:50 +0100
Subject: [PATCH] Preserve default value of project-read-file-name-function

This package can be pulled as a dependency (e.g. of ada-mode),
unbeknownst to the user who might not expect nor desire this setting.

* uniquify-files.el: Do not unconditionally change
project-read-file-name-function; expand commentary to let users know
how to opt in.
---
 uniquify-files.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/uniquify-files.el b/uniquify-files.el
index d9430539fe..a314d001fc 100644
--- a/uniquify-files.el
+++ b/uniquify-files.el
@@ -33,6 +33,11 @@
 ;; We accomplish this by preprocessing the list of absolute file names
 ;; to be in that style, in an alist with the original absolute file
 ;; names, and do completion on that alist.
+;;
+;; To use it with `project-find-file', customize
+;; `project-read-file-name-function':
+;;
+;; (setq project-read-file-name-function 'uniq-file-read)
 
 (require 'cl-lib)
 (require 'files)
@@ -317,8 +322,5 @@ done on UNIQIFIED-NAME, PRED is called with ABS-NAME."
                  prompt table predicate hist default)))
     (cdr (assoc found alist))))
 
-;;;###autoload
-(setq-default project-read-file-name-function #'uniq-file-read)
-
 (provide 'uniquify-files)
 ;;; uniquify-files.el ends here
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Explicitly-bind-project-read-file-name-function.patch

From 5ee3ab88fb9c439165a23fad03468c62e2f3ce4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:19:20 +0100
Subject: [PATCH 1/3] Explicitly bind project-read-file-name-function

* ada-mode.el (ada-find-file): let-bind
project-read-file-name-function.
* NEWS: announce the change.
---
 NEWS        | 13 +++++++++++++
 ada-mode.el |  9 +++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index fe3e518f11..ff64186a13 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,19 @@ Please send ada-mode bug reports to bug-gnu-emacs@HIDDEN, with
 'ada-mode' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* Ada Mode x.x.x
+xx Xxx xxxx
+
+** Adapt to change in uniquify-files.
+   uniquify-files no longer sets project-read-file-name-function by
+   default.  ada-find-file (C-c C-t) will still use this package's
+   completion style, but project-find-file (C-x p f) will not by
+   default.
+
+   Set project-read-file-name-function to uniq-file-read if you would
+   like to keep using uniquify-files's completion style outside of
+   ada-find-file.
+
 * Ada Mode 7.2.0
 21 Nov 2021
 
diff --git a/ada-mode.el b/ada-mode.el
index a65c7b47da..9997f35c99 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1462,12 +1462,13 @@ For `wisi-indent-calculate-functions'.
   "Find a file in the current project.
 Prompts with completion, defaults to filename at point."
   (interactive)
-  ;; In emacs 27, we can just call 'project-find-file;
-  ;; project-read-file-name-function handles the uniquify-files alist
-  ;; completion table. In emacs 26, we must do that ourselves.
+  ;; In emacs 27, we can just set project-read-file-name-function to
+  ;; tell 'project-find-file to use the uniquify-files alist
+  ;; completion table.  In emacs 26, we must do that ourselves.
   (cl-ecase emacs-major-version
     (27
-     (project-find-file))
+     (let ((project-read-file-name-function #'uniq-file-read))
+       (project-find-file)))
 
     (26
      (let* ((def (thing-at-point 'filename))
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0002-ada-mode.el-ada-mode-menu-Prefer-ada-find-file.patch

From a221c350e7697c6000c1b0030d964501426a1b2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:46:48 +0100
Subject: [PATCH 2/3] * ada-mode.el (ada-mode-menu): Prefer ada-find-file

---
 ada-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ada-mode.el b/ada-mode.el
index 9997f35c99..fa2c4a4f7a 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -246,7 +246,7 @@ nil, only the file name."
      )
     ("Navigate"
      ["Other file"                    ada-find-other-file          t]
-     ["Find file in project"          project-find-file            t]
+     ["Find file in project"          ada-find-file                t]
      ["Goto declaration/body"         wisi-goto-spec/body          t]
      ["Goto next statement keyword"   forward-sexp   t]
      ["Goto prev statement keyword"   backward-sexp   t]
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0003-ada-mode.el-ada-find-file-Support-future-Emacs-versi.patch

From b0bd0e796333f80a21c5d73d2cde97d7cf18b095 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:48:35 +0100
Subject: [PATCH 3/3] * ada-mode.el (ada-find-file): Support future Emacs
 versions

---
 ada-mode.el | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/ada-mode.el b/ada-mode.el
index fa2c4a4f7a..980fcb081e 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1465,23 +1465,20 @@ Prompts with completion, defaults to filename at point."
   ;; In emacs 27, we can just set project-read-file-name-function to
   ;; tell 'project-find-file to use the uniquify-files alist
   ;; completion table.  In emacs 26, we must do that ourselves.
-  (cl-ecase emacs-major-version
-    (27
-     (let ((project-read-file-name-function #'uniq-file-read))
-       (project-find-file)))
-
-    (26
-     (let* ((def (thing-at-point 'filename))
-	    (project (project-current))
-	    (all-files (project-files project nil))
-	    (alist (uniq-file-uniquify all-files))
-	    (table (apply-partially #'uniq-file-completion-table alist))
-            (file (project--completing-read-strict
-                   "Find file" table nil nil def)))
-       (if (string= file "")
-           (user-error "You didn't specify the file")
-	 (find-file (cdr (assoc file alist))))))
-    ))
+  (require 'project)
+  (if (boundp 'project-read-file-name-function)
+      (let ((project-read-file-name-function #'uniq-file-read))
+        (project-find-file))
+    (let* ((def (thing-at-point 'filename))
+	   (project (project-current))
+	   (all-files (project-files project nil))
+	   (alist (uniq-file-uniquify all-files))
+	   (table (apply-partially #'uniq-file-completion-table alist))
+           (file (project--completing-read-strict
+                  "Find file" table nil nil def)))
+      (if (string= file "")
+          (user-error "You didn't specify the file")
+	(find-file (cdr (assoc file alist)))))))
 
 ;;;; compatibility with previous ada-mode versions
 
-- 
2.34.0


--=-=-=
Content-Type: text/plain


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-11-26 built on hirondell
Repository revision: 11860f89a593a8cfe7efb94e86370bbbe4318fba
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-xwidgets --with-cairo --with-gconf --with-xinput2'

Configured features:
ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

--=-=-=--



------------=_1653736622-19379-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 52167-close) by debbugs.gnu.org; 28 May 2022 11:16:13 +0000
Received: from localhost ([127.0.0.1]:36538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nuuQX-00051Y-Dv
	for submit <at> debbugs.gnu.org; Sat, 28 May 2022 07:16:13 -0400
Received: from outbound-ss-761.bluehost.com ([74.220.211.250]:54604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen_leake@HIDDEN>) id 1nuuQR-00050w-IQ
 for 52167-close <at> debbugs.gnu.org; Sat, 28 May 2022 07:16:11 -0400
Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126])
 by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id C4941100425CE
 for <52167-close <at> debbugs.gnu.org>; Sat, 28 May 2022 11:16:01 +0000 (UTC)
Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP
 id uuQLnXyMDj8kTuuQLnaotw; Sat, 28 May 2022 11:16:01 +0000
X-Authority-Reason: nr=8
X-Authority-Analysis: v=2.4 cv=MbSpB7zf c=1 sm=1 tr=0 ts=62920471
 a=dWLzHQi6WpdymmZIwiVdBw==:117 a=HlCpoMJyzbfmKqni6+j5Yg==:17
 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=oZkIemNP1mAA:10:nop_rcvd_month_year
 a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=hTPRg2HmpeZaUMmqjWEA:9
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date:
 Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: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=e4ClwcZ9yAlQyauxZO/s6k03+zCTJZGlZSkM0kpXaJg=; b=SIOBdiL6rKgmdGW2nnmf9kc8X1
 Q6jreRF07OF4nc8/RYUOZ+t2uEZpkB0ANT1cCHgFIUCxb9J4NBMS6eDsS+Qc/ocCDkhvcogLY2aBa
 5WybGi5WjlWaWbFRt3DC4flmg99iyGHu39OI3Q+uw3skCyVksbkxYj4BX8Qp2HPIbrguiFcjYenrM
 RXonHIVa8FpO4tB4SO4K7FLREqGKhy0ZiBOUfDEatDzXJccitIqfDtjujSYPr7Wy76cGz/KsxdEcK
 lW6YSLlFf7ipKmjReXqGhzLyGjAvc58G77YilmeTGxBhyHsWVwdxxvb/LOPwXCFfFSFA/544YhAJi
 +O/T/CfQ==;
Received: from 192-184-171-126.fiber.dynamic.sonic.net
 ([192.184.171.126]:50212 helo=Takver4)
 by host2007.hostmonster.com with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2)
 (envelope-from <stephen_leake@HIDDEN>) id 1nuuQL-001oEc-Er
 for 52167-close <at> debbugs.gnu.org; Sat, 28 May 2022 05:16:01 -0600
From: Stephen Leake <stephen_leake@HIDDEN>
To: 52167-close <at> debbugs.gnu.org
Subject: 29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function
Date: Sat, 28 May 2022 04:15:57 -0700
Message-ID: <86pmjx9ac2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - host2007.hostmonster.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - stephe-leake.org
X-BWhitelist: no
X-Source-IP: 192.184.171.126
X-Source-L: No
X-Exim-ID: 1nuuQL-001oEc-Er
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: 192-184-171-126.fiber.dynamic.sonic.net (Takver4)
 [192.184.171.126]:50212
X-Source-Auth: stephen_leake@HIDDEN
X-Email-Count: 1
X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t
X-Local-Domain: yes
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 52167-close
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: -1.0 (-)

Closed by ada-mode version 7.2.1, uniquify-files version 1.0.4.
-- 
-- Stephe


------------=_1653736622-19379-0--


Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec <kevin.legouguec@HIDDEN>
Subject: bug#52167: closed (29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function)
Message-ID: <handler.52167.D52167.165373657319320.notifdone <at> debbugs.gnu.org>
References: <86pmjx9ac2.fsf@HIDDEN> <871r30ypz9.fsf@HIDDEN>
X-Gnu-PR-Message: they-closed 52167
X-Gnu-PR-Package: emacs, ada-mode
X-Gnu-PR-Keywords: patch
Reply-To: 52167 <at> debbugs.gnu.org
Date: Sat, 28 May 2022 11:17:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1653736622-19379-1"

This is a multi-part message in MIME format...

------------=_1653736622-19379-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your bug report

#52167: 29.0.50; [ada-mode] Preserve default value of project-read-file-nam=
e-function

which was filed against the emacs, ada-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 52167 <at> debbugs.gnu.org.

--=20
52167: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D52167
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1653736622-19379-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 52167-close) by debbugs.gnu.org; 28 May 2022 11:16:13 +0000
Received: from localhost ([127.0.0.1]:36538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nuuQX-00051Y-Dv
	for submit <at> debbugs.gnu.org; Sat, 28 May 2022 07:16:13 -0400
Received: from outbound-ss-761.bluehost.com ([74.220.211.250]:54604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen_leake@HIDDEN>) id 1nuuQR-00050w-IQ
 for 52167-close <at> debbugs.gnu.org; Sat, 28 May 2022 07:16:11 -0400
Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126])
 by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id C4941100425CE
 for <52167-close <at> debbugs.gnu.org>; Sat, 28 May 2022 11:16:01 +0000 (UTC)
Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP
 id uuQLnXyMDj8kTuuQLnaotw; Sat, 28 May 2022 11:16:01 +0000
X-Authority-Reason: nr=8
X-Authority-Analysis: v=2.4 cv=MbSpB7zf c=1 sm=1 tr=0 ts=62920471
 a=dWLzHQi6WpdymmZIwiVdBw==:117 a=HlCpoMJyzbfmKqni6+j5Yg==:17
 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=oZkIemNP1mAA:10:nop_rcvd_month_year
 a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=hTPRg2HmpeZaUMmqjWEA:9
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date:
 Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: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=e4ClwcZ9yAlQyauxZO/s6k03+zCTJZGlZSkM0kpXaJg=; b=SIOBdiL6rKgmdGW2nnmf9kc8X1
 Q6jreRF07OF4nc8/RYUOZ+t2uEZpkB0ANT1cCHgFIUCxb9J4NBMS6eDsS+Qc/ocCDkhvcogLY2aBa
 5WybGi5WjlWaWbFRt3DC4flmg99iyGHu39OI3Q+uw3skCyVksbkxYj4BX8Qp2HPIbrguiFcjYenrM
 RXonHIVa8FpO4tB4SO4K7FLREqGKhy0ZiBOUfDEatDzXJccitIqfDtjujSYPr7Wy76cGz/KsxdEcK
 lW6YSLlFf7ipKmjReXqGhzLyGjAvc58G77YilmeTGxBhyHsWVwdxxvb/LOPwXCFfFSFA/544YhAJi
 +O/T/CfQ==;
Received: from 192-184-171-126.fiber.dynamic.sonic.net
 ([192.184.171.126]:50212 helo=Takver4)
 by host2007.hostmonster.com with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2)
 (envelope-from <stephen_leake@HIDDEN>) id 1nuuQL-001oEc-Er
 for 52167-close <at> debbugs.gnu.org; Sat, 28 May 2022 05:16:01 -0600
From: Stephen Leake <stephen_leake@HIDDEN>
To: 52167-close <at> debbugs.gnu.org
Subject: 29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function
Date: Sat, 28 May 2022 04:15:57 -0700
Message-ID: <86pmjx9ac2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - host2007.hostmonster.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - stephe-leake.org
X-BWhitelist: no
X-Source-IP: 192.184.171.126
X-Source-L: No
X-Exim-ID: 1nuuQL-001oEc-Er
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: 192-184-171-126.fiber.dynamic.sonic.net (Takver4)
 [192.184.171.126]:50212
X-Source-Auth: stephen_leake@HIDDEN
X-Email-Count: 1
X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t
X-Local-Domain: yes
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 52167-close
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: -1.0 (-)

Closed by ada-mode version 7.2.1, uniquify-files version 1.0.4.
-- 
-- Stephe


------------=_1653736622-19379-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 28 Nov 2021 20:39:47 +0000
Received: from localhost ([127.0.0.1]:36424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrQxe-0003de-BM
	for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 15:39:46 -0500
Received: from lists.gnu.org ([209.51.188.17]:46982)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevin.legouguec@HIDDEN>) id 1mrQxc-0003dW-0t
 for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 15:39:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33294)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>)
 id 1mrQxb-00072R-R2
 for bug-gnu-emacs@HIDDEN; Sun, 28 Nov 2021 15:39:43 -0500
Received: from [2a00:1450:4864:20::335] (port=43771
 helo=mail-wm1-x335.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <kevin.legouguec@HIDDEN>)
 id 1mrQxZ-00031C-8V
 for bug-gnu-emacs@HIDDEN; Sun, 28 Nov 2021 15:39:43 -0500
Received: by mail-wm1-x335.google.com with SMTP id
 o19-20020a1c7513000000b0033a93202467so10952922wmc.2
 for <bug-gnu-emacs@HIDDEN>; Sun, 28 Nov 2021 12:39:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:date:message-id:mime-version;
 bh=XnKiUrtOA58/3HT67ij/NS8Ee/KOhyTZduCVRWMbOKI=;
 b=EFatTmRPVK6q70c+LtXjsE37toKHGrsc+N4l8mCJy2gzPYvxYNatc+h8IMV/wic8Z4
 gcVJC+Os8VhWQXM0Lj+D73eA2HxkJzYz0VJjGI880oWAzvsmvE/LGs8yuaFOW752ZMPK
 uO5VjJScvu7EG97jRCkSMha8dYl/E/jE3GXGxNToPMZr4tccfznXAz25KxXtJAGiW283
 vpOBXZ5RWjAtaHIjsCPa1EiQvFle7G6hi6kxntstvD6sPwLHb83GriRXHTA+a/V4aEjL
 Zw5VyH1CXm7b3f/qCz0ilBR2yzeQsGiX/iYOLsk4tjF1+px2ObaV4GSUSawHgvtcWzw8
 z3gA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=XnKiUrtOA58/3HT67ij/NS8Ee/KOhyTZduCVRWMbOKI=;
 b=ZE0TVXxllSy7E63jD+FlKmHt/gXWHbLPZdrxsW+5VWYMrcsZC0mf1eLKLAub0pkV8z
 f4Ey/NRVmfDbe4iLA2NNndQcLyotDrxyRv5q6sSmigYWYXC2JPp+BS3pSCyqeShbTx2z
 sc1exM+U4I8br1MZf6mYhM4/VR/I0cN1MH3zCNdoTFVSoJ0qnBClxfoM1YvB8pinm/RM
 NTp0KP/sxpyO7pO69C7RC3yP9qAqqadMZXMCElcuYk4+ltaAadgvt2f/oyoas/c1RUxQ
 6F45ReV6PgpiepXB98HYSakPJbaE108Gq6SqlOteWJazHgV48xZNLkK41/k/I3rEeOy6
 4Qqw==
X-Gm-Message-State: AOAM531+j1mtfXTQupH7tcAl9WxrkuYgz4nLfgEc9MbECTkX6HlutpkH
 Qh4/7zUc+tAcCuVegDUjTtZRFpoEcxw=
X-Google-Smtp-Source: ABdhPJy/TL5L2idmQlUJxZRzdqwntmTcrJa5mJyLBMagxS6Yhy3VFOyFXNkOiTx2hsIZH+SFx765QA==
X-Received: by 2002:a05:600c:3788:: with SMTP id
 o8mr31051067wmr.82.1638131979473; 
 Sun, 28 Nov 2021 12:39:39 -0800 (PST)
Received: from hirondell ([109.190.253.16])
 by smtp.gmail.com with ESMTPSA id h18sm13029257wre.46.2021.11.28.12.39.37
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 28 Nov 2021 12:39:38 -0800 (PST)
From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= <kevin.legouguec@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function
Date: Sun, 28 Nov 2021 21:39:22 +0100
Message-ID: <871r30ypz9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::335;
 envelope-from=kevin.legouguec@HIDDEN; helo=mail-wm1-x335.google.com
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
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.3 (--)

--=-=-=
Content-Type: text/plain

Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users@HIDDEN

Hello,

ada-mode depends on uniquify-files, which ends with this:

> ;;;###autoload
> (setq-default project-read-file-name-function #'uniq-file-read)

This unconditionally changes the prompt for project-find-file at
startup.  I think this is a bit of an overreach: users who install
ada-mode are not necessarily looking for a new project-find-file prompt
for *all* their projects, including those unrelated to Ada.

I'm attaching

- a patch for uniquify-files to remove the above snippet, and add a bit
  of commentary explaining how to opt in to uniq-file-read,

- a patch for ada-mode to explicitly let-bind
  project-read-file-name-function before calling project-find-file,

- two more patches for ada-mode, which I didn't squash with the first
  one because I'm not 100% sure they are desirable: one to make
  ada-find-file support future Emacs versions; another to use
  ada-find-file in ada-mode-menu.

Let me know if this needs more work; thanks for your time.



--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Preserve-default-value-of-project-read-file-name-fun.patch

From 38a1d0ae71b13b7676ea0ede0a605ff6f23aceed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sat, 27 Nov 2021 23:52:50 +0100
Subject: [PATCH] Preserve default value of project-read-file-name-function

This package can be pulled as a dependency (e.g. of ada-mode),
unbeknownst to the user who might not expect nor desire this setting.

* uniquify-files.el: Do not unconditionally change
project-read-file-name-function; expand commentary to let users know
how to opt in.
---
 uniquify-files.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/uniquify-files.el b/uniquify-files.el
index d9430539fe..a314d001fc 100644
--- a/uniquify-files.el
+++ b/uniquify-files.el
@@ -33,6 +33,11 @@
 ;; We accomplish this by preprocessing the list of absolute file names
 ;; to be in that style, in an alist with the original absolute file
 ;; names, and do completion on that alist.
+;;
+;; To use it with `project-find-file', customize
+;; `project-read-file-name-function':
+;;
+;; (setq project-read-file-name-function 'uniq-file-read)
 
 (require 'cl-lib)
 (require 'files)
@@ -317,8 +322,5 @@ done on UNIQIFIED-NAME, PRED is called with ABS-NAME."
                  prompt table predicate hist default)))
     (cdr (assoc found alist))))
 
-;;;###autoload
-(setq-default project-read-file-name-function #'uniq-file-read)
-
 (provide 'uniquify-files)
 ;;; uniquify-files.el ends here
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Explicitly-bind-project-read-file-name-function.patch

From 5ee3ab88fb9c439165a23fad03468c62e2f3ce4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:19:20 +0100
Subject: [PATCH 1/3] Explicitly bind project-read-file-name-function

* ada-mode.el (ada-find-file): let-bind
project-read-file-name-function.
* NEWS: announce the change.
---
 NEWS        | 13 +++++++++++++
 ada-mode.el |  9 +++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index fe3e518f11..ff64186a13 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,19 @@ Please send ada-mode bug reports to bug-gnu-emacs@HIDDEN, with
 'ada-mode' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* Ada Mode x.x.x
+xx Xxx xxxx
+
+** Adapt to change in uniquify-files.
+   uniquify-files no longer sets project-read-file-name-function by
+   default.  ada-find-file (C-c C-t) will still use this package's
+   completion style, but project-find-file (C-x p f) will not by
+   default.
+
+   Set project-read-file-name-function to uniq-file-read if you would
+   like to keep using uniquify-files's completion style outside of
+   ada-find-file.
+
 * Ada Mode 7.2.0
 21 Nov 2021
 
diff --git a/ada-mode.el b/ada-mode.el
index a65c7b47da..9997f35c99 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1462,12 +1462,13 @@ For `wisi-indent-calculate-functions'.
   "Find a file in the current project.
 Prompts with completion, defaults to filename at point."
   (interactive)
-  ;; In emacs 27, we can just call 'project-find-file;
-  ;; project-read-file-name-function handles the uniquify-files alist
-  ;; completion table. In emacs 26, we must do that ourselves.
+  ;; In emacs 27, we can just set project-read-file-name-function to
+  ;; tell 'project-find-file to use the uniquify-files alist
+  ;; completion table.  In emacs 26, we must do that ourselves.
   (cl-ecase emacs-major-version
     (27
-     (project-find-file))
+     (let ((project-read-file-name-function #'uniq-file-read))
+       (project-find-file)))
 
     (26
      (let* ((def (thing-at-point 'filename))
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0002-ada-mode.el-ada-mode-menu-Prefer-ada-find-file.patch

From a221c350e7697c6000c1b0030d964501426a1b2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:46:48 +0100
Subject: [PATCH 2/3] * ada-mode.el (ada-mode-menu): Prefer ada-find-file

---
 ada-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ada-mode.el b/ada-mode.el
index 9997f35c99..fa2c4a4f7a 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -246,7 +246,7 @@ nil, only the file name."
      )
     ("Navigate"
      ["Other file"                    ada-find-other-file          t]
-     ["Find file in project"          project-find-file            t]
+     ["Find file in project"          ada-find-file                t]
      ["Goto declaration/body"         wisi-goto-spec/body          t]
      ["Goto next statement keyword"   forward-sexp   t]
      ["Goto prev statement keyword"   backward-sexp   t]
-- 
2.34.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0003-ada-mode.el-ada-find-file-Support-future-Emacs-versi.patch

From b0bd0e796333f80a21c5d73d2cde97d7cf18b095 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= <kevin.legouguec@HIDDEN>
Date: Sun, 28 Nov 2021 00:48:35 +0100
Subject: [PATCH 3/3] * ada-mode.el (ada-find-file): Support future Emacs
 versions

---
 ada-mode.el | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/ada-mode.el b/ada-mode.el
index fa2c4a4f7a..980fcb081e 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1465,23 +1465,20 @@ Prompts with completion, defaults to filename at point."
   ;; In emacs 27, we can just set project-read-file-name-function to
   ;; tell 'project-find-file to use the uniquify-files alist
   ;; completion table.  In emacs 26, we must do that ourselves.
-  (cl-ecase emacs-major-version
-    (27
-     (let ((project-read-file-name-function #'uniq-file-read))
-       (project-find-file)))
-
-    (26
-     (let* ((def (thing-at-point 'filename))
-	    (project (project-current))
-	    (all-files (project-files project nil))
-	    (alist (uniq-file-uniquify all-files))
-	    (table (apply-partially #'uniq-file-completion-table alist))
-            (file (project--completing-read-strict
-                   "Find file" table nil nil def)))
-       (if (string= file "")
-           (user-error "You didn't specify the file")
-	 (find-file (cdr (assoc file alist))))))
-    ))
+  (require 'project)
+  (if (boundp 'project-read-file-name-function)
+      (let ((project-read-file-name-function #'uniq-file-read))
+        (project-find-file))
+    (let* ((def (thing-at-point 'filename))
+	   (project (project-current))
+	   (all-files (project-files project nil))
+	   (alist (uniq-file-uniquify all-files))
+	   (table (apply-partially #'uniq-file-completion-table alist))
+           (file (project--completing-read-strict
+                  "Find file" table nil nil def)))
+      (if (string= file "")
+          (user-error "You didn't specify the file")
+	(find-file (cdr (assoc file alist)))))))
 
 ;;;; compatibility with previous ada-mode versions
 
-- 
2.34.0


--=-=-=
Content-Type: text/plain


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2021-11-26 built on hirondell
Repository revision: 11860f89a593a8cfe7efb94e86370bbbe4318fba
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-xwidgets --with-cairo --with-gconf --with-xinput2'

Configured features:
ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

--=-=-=--



------------=_1653736622-19379-1--



Last modified: Sat, 28 May 2022 11:30:02 UTC

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