[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21007: 25.0.50; Around advice doesn't seem to work

From: Nicolas Richard
Subject: bug#21007: 25.0.50; Around advice doesn't seem to work
Date: Wed, 08 Jul 2015 10:18:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Mark Karpov <address@hidden> writes:
> Reproducible with ‘emacs -Q’:
> (defun mk-anti-ido-advice (func &rest args)
>   "Temporarily disable IDO and call function FUNC with arguments ARGS."
>   (message "Called!")) ;; just for testing
> (defun mk-disable-ido (command)
>   "Disable IDO when command COMMAND is called."
>   (advice-add command :around #'mk-anti-ido-advice))
> (mk-disable-ido 'dired-create-directory)
> Now, in description of ‘dired-create-directory’ one can see that
> ‘:around’ advice is registered. However, when I call
> ‘dired-create-directory’ either via ‘+’ keybinding or via ‘M-x
> dired-create-directory’, old version of the function is called. I don't
> see "Called!" message in the minibuffer. Is it bug or feature?

I see a prompt for a directory, but when I hit RET to confirm, I get a
"Called!" message.

If that's what you see also and you don't want to see the prompt, simply
make mk-anti-ido-advice an (interactive) function (the new interactive
spec will replace the old one).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]