Subject: bug#42590: closed (Fwd: bug#42590: 27.0.91; Advice error for interactive commands)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 29 Jul 2020 19:23:02 +0000

Your bug report

#42590: 27.0.91; Advice error for interactive commands

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42590: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42590
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Fwd: bug#42590: 27.0.91; Advice error for interactive commands
From: Yuan Fu <[email-masked]>
To: [email-masked]
Date: Wed, 29 Jul 2020 15:22:36 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> Begin forwarded message:
> 
> From: Yuan Fu <[email-masked]>
> 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 <[email-masked]>
> Cc: [email-masked]
> 
> 
> 
>> On Jul 29, 2020, at 1:41 PM, Michael Heerdegen <[email-masked]> wrote:
>> 
>> Yuan Fu <[email-masked]> 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

Subject: 27.0.91; Advice error for interactive commands
From: Yuan Fu <[email-masked]>
To: Bug Report Emacs <[email-masked]>
Date: Tue, 28 Jul 2020 21:58:25 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

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))