GNU bug report logs - #52167
29.0.50; [ada-mode] Preserve default value of project-read-file-name-function

Previous Next

Packages: ada-mode, emacs;

Reported by: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>

Date: Sun, 28 Nov 2021 20:40:01 UTC

Severity: normal

Tags: patch

Fixed in version 29.0.50

Done: Stephen Leake <stephen_leake <at> stephe-leake.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Subject: bug#52167: closed (29.0.50; [ada-mode] Preserve default value of
 project-read-file-name-function)
Date: Sat, 28 May 2022 11:17:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#52167: 29.0.50; [ada-mode] Preserve default value of project-read-file-name-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.

-- 
52167: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52167
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stephen Leake <stephen_leake <at> stephe-leake.org>
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
Closed by ada-mode version 7.2.1, uniquify-files version 1.0.4.
-- 
-- Stephe

[Message part 3 (message/rfc822, inline)]
From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
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 part 4 (text/plain, inline)]
Package: emacs, ada-mode
X-Debbugs-CC: ada-mode-users <at> nongnu.org

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.


[0001-Preserve-default-value-of-project-read-file-name-fun.patch (text/x-diff, attachment)]
[0001-Explicitly-bind-project-read-file-name-function.patch (text/x-diff, attachment)]
[0002-ada-mode.el-ada-mode-menu-Prefer-ada-find-file.patch (text/x-diff, attachment)]
[0003-ada-mode.el-ada-find-file-Support-future-Emacs-versi.patch (text/x-diff, attachment)]
[Message part 9 (text/plain, inline)]
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

This bug report was last modified 2 years and 358 days ago.

Previous Next


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