GNU bug report logs - #58882
ido-everywhere & add-function

Previous Next

Package: emacs;

Reported by: Taylor Grinn <grinntaylor <at> gmail.com>

Date: Sun, 30 Oct 2022 00:30:03 UTC

Severity: normal

To reply to this bug, email your comments to 58882 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#58882; Package emacs. (Sun, 30 Oct 2022 00:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Taylor Grinn <grinntaylor <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Oct 2022 00:30:03 GMT) Full text and rfc822 format available.

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

From: Taylor Grinn <grinntaylor <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: ido-everywhere & add-function
Date: Sat, 29 Oct 2022 17:38:46 -0400
I can modify `read-file-name-function` like so:

  (advice-add read-file-name-function :around #'my/setup-minibuffer)

However, with `ido-everywhere-mode` enabled, I have to do it like this:

  (advice-add 'read-file-name-function :around #'my/setup-minibuffer)

The reason is that ido-everywhere adds a function to the variable
'read-file-name-function, rather than the value of that variable. This
changes the type of 'read-file-name-function from a symbol to a
function. This seems like it might have been a mistake.

Changing all instances of `add-function', which is a macro, to
`advice-add', which is a defun, will allow the variables
'read-file-name-function and 'read-buffer-function and 'ffap-file-finder
to remain unchanged, which I think was the intended effect.

Best,

Taylor







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

Previous Next


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