GNU bug report logs - #42590
27.0.91; Advice error for interactive commands

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Wed, 29 Jul 2020 01:59:01 UTC

Severity: normal

Found in version 27.0.91

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42590 in the body.
You can then email your comments to 42590 AT debbugs.gnu.org in the normal way.

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#42590; Package emacs. (Wed, 29 Jul 2020 01:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yuan Fu <casouri <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 29 Jul 2020 01:59:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Bug Report Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 27.0.91; Advice error for interactive commands
Date: Tue, 28 Jul 2020 21:58:25 -0400
To reproduce the issue, evaluate

(advice-add 'backward-delete-char-untabify :after 'ignore)

and hit backspace (which should call backward-delete-char-untabify), and
an error occurs: apply: Wrong number of arguments: (1 . 2), 0

Backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 2) 0)
  #f(compiled-function (arg &optional killp) "Delete characters backward, changing tabs into spaces.\nThe exact behavior depends on `backward-delete-char-untabify-method'.\nDelete ARG chars, and kill (save in kill ring) if KILLP is non-nil.\nInteractively, ARG is the prefix arg (default 1)\nand KILLP is t if a prefix arg was specified." (interactive "*p\nP") #<bytecode 0x1ffc4145c759>)()
  apply(#f(compiled-function (arg &optional killp) "Delete characters backward, changing tabs into spaces.\nThe exact behavior depends on `backward-delete-char-untabify-method'.\nDelete ARG chars, and kill (save in kill ring) if KILLP is non-nil.\nInteractively, ARG is the prefix arg (default 1)\nand KILLP is t if a prefix arg was specified." (interactive "*p\nP") #<bytecode 0x1ffc4145c759>) nil)
  backward-delete-char-untabify()
  funcall-interactively(backward-delete-char-untabify)
  call-interactively(backward-delete-char-untabify nil nil)
  command-execute(backward-delete-char-untabify)



In GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin19.5.0, NS appkit-1894.50 Version 10.15.5 (Build 19F101))
of 2020-07-28 built on Brown
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.5

Recent messages:
Loading uniquify...done
Loading electric...done
Loading emacs-lisp/eldoc...done
Loading cus-start...done
Loading tooltip...done
Loading /Applications/Emacs.app/Contents/Resources/lisp/leim/leim-list.el (source)...done
Finding pointers to doc strings...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading loadup.el (source)...done
Mark set [2 times]
apply: Wrong number of arguments: (1 . 2), 0
Configured using:
'configure --with-modules --with-pdumper=yes
--oldincludedir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2/
--with-ns
PKG_CONFIG_PATH=/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig'

Configured features:
RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
XIM NS MODULES THREADS JSON PDUMPER LCMS2

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

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Applications/Emacs.app/Contents/Resources/lisp/mail/metamail hides /Applications/Emacs.app/Contents/Resources/lisp/obsolete/metamail
/Applications/Emacs.app/Contents/Resources/lisp/sb-image hides /Applications/Emacs.app/Contents/Resources/lisp/obsolete/sb-image

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip cus-start eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind kqueue cocoa ns lcms2 multi-tty
make-network-process emacs)

Memory information:
((conses 16 269358 17394)
(symbols 48 20582 1)
(strings 32 55830 2233)
(string-bytes 1 2366984)
(vectors 16 51368)
(vector-slots 8 1408784 68426)
(floats 8 184 73)
(intervals 56 234 0)
(buffers 1000 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42590; Package emacs. (Wed, 29 Jul 2020 17:42:01 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 42590 <at> debbugs.gnu.org
Subject: Re: bug#42590: 27.0.91; Advice error for interactive commands
Date: Wed, 29 Jul 2020 19:41:35 +0200
Yuan Fu <casouri <at> gmail.com> writes:

> To reproduce the issue, evaluate
>
> (advice-add 'backward-delete-char-untabify :after 'ignore)
>
> and hit backspace (which should call backward-delete-char-untabify), and
> an error occurs: apply: Wrong number of arguments: (1 . 2), 0

Had to think about it.  But it's expected I think: `ignore' is
interactive, and as documented, its interactive spec overwrites the
interactive spec of the original function.  And it doesn't fit.

So everything behaves as documented, it's your specified after advice
that causes the problem.  Right?

Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42590; Package emacs. (Wed, 29 Jul 2020 19:22:02 GMT) Full text and rfc822 format available.

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

From: Yuan Fu <casouri <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 42590 <at> debbugs.gnu.org
Subject: Re: bug#42590: 27.0.91; Advice error for interactive commands
Date: Wed, 29 Jul 2020 15:21:52 -0400

> On Jul 29, 2020, at 1:41 PM, Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> 
> Yuan Fu <casouri <at> gmail.com> writes:
> 
>> To reproduce the issue, evaluate
>> 
>> (advice-add 'backward-delete-char-untabify :after 'ignore)
>> 
>> and hit backspace (which should call backward-delete-char-untabify), and
>> an error occurs: apply: Wrong number of arguments: (1 . 2), 0
> 
> Had to think about it.  But it's expected I think: `ignore' is
> interactive, and as documented, its interactive spec overwrites the
> interactive spec of the original function.  And it doesn't fit.
> 
> So everything behaves as documented, it's your specified after advice
> that causes the problem.  Right?
> 
> Michael.

Thanks. I first advised with another interactive function and found this problem. Ignore is just an example. Once I remove the advice the problem went away. I’ll close this report now. 

Yuan



Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Wed, 29 Jul 2020 19:23:02 GMT) Full text and rfc822 format available.

Notification sent to Yuan Fu <casouri <at> gmail.com>:
bug acknowledged by developer. (Wed, 29 Jul 2020 19:23:02 GMT) Full text and rfc822 format available.

Message #16 received at 42590-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: 42590-done <at> debbugs.gnu.org
Subject: Fwd: bug#42590: 27.0.91; Advice error for interactive commands
Date: Wed, 29 Jul 2020 15:22:36 -0400
[Message part 1 (text/plain, inline)]

> Begin forwarded message:
> 
> From: Yuan Fu <casouri <at> gmail.com>
> Subject: Re: bug#42590: 27.0.91; Advice error for interactive commands
> Date: July 29, 2020 at 3:21:52 PM GMT-4
> To: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 42590 <at> debbugs.gnu.org
> 
> 
> 
>> On Jul 29, 2020, at 1:41 PM, Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
>> 
>> Yuan Fu <casouri <at> gmail.com> writes:
>> 
>>> To reproduce the issue, evaluate
>>> 
>>> (advice-add 'backward-delete-char-untabify :after 'ignore)
>>> 
>>> and hit backspace (which should call backward-delete-char-untabify), and
>>> an error occurs: apply: Wrong number of arguments: (1 . 2), 0
>> 
>> Had to think about it.  But it's expected I think: `ignore' is
>> interactive, and as documented, its interactive spec overwrites the
>> interactive spec of the original function.  And it doesn't fit.
>> 
>> So everything behaves as documented, it's your specified after advice
>> that causes the problem.  Right?
>> 
>> Michael.
> 
> Thanks. I first advised with another interactive function and found this problem. Ignore is just an example. Once I remove the advice the problem went away. I’ll close this report now. 
> 
> Yuan

[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Aug 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 236 days ago.

Previous Next


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