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


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

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 1 (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 6 (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 359 days ago.

Previous Next


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