From unknown Fri Sep 05 11:51:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18399 <18399@debbugs.gnu.org> To: bug#18399 <18399@debbugs.gnu.org> Subject: Status: 24.4.50; nadvice :filter-args -vs- interactive Reply-To: bug#18399 <18399@debbugs.gnu.org> Date: Fri, 05 Sep 2025 18:51:58 +0000 retitle 18399 24.4.50; nadvice :filter-args -vs- interactive reassign 18399 emacs submitter 18399 Tom Tromey severity 18399 minor tag 18399 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 16:02:15 2014 Received: (at submit) by debbugs.gnu.org; 3 Sep 2014 20:02:15 +0000 Received: from localhost ([127.0.0.1]:58129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPGkw-0004Nz-14 for submit@debbugs.gnu.org; Wed, 03 Sep 2014 16:02:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35168) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPGkr-0004Nj-GV for submit@debbugs.gnu.org; Wed, 03 Sep 2014 16:02:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPGkd-00051H-Vx for submit@debbugs.gnu.org; Wed, 03 Sep 2014 16:02:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPGkd-00051D-TK for submit@debbugs.gnu.org; Wed, 03 Sep 2014 16:01:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPGkW-0000Ot-OG for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 16:01:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPGkP-0004yd-Fe for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 16:01:48 -0400 Received: from gproxy3-pub.mail.unifiedlayer.com ([69.89.30.42]:44958) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1XPGkP-0004xg-4W for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2014 16:01:41 -0400 Received: (qmail 844 invoked by uid 0); 3 Sep 2014 20:01:31 -0000 Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy3.mail.unifiedlayer.com with SMTP; 3 Sep 2014 20:01:31 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id mk1S1o00c2f2jeq01k1Vvn; Wed, 03 Sep 2014 14:01:30 -0600 X-Authority-Analysis: v=2.1 cv=LbyvtFvi c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=mfR07tOSuTMA:10 a=DC8W8FxcBQUA:10 a=_cZRQKYwz3QA:10 a=zstS-IiYAAAA:8 a=PnD2wP_eR3oA:10 a=oMhZhQ4-4PIA:10 a=S2uJcKl_jxiz2cQt-DgA:9 a=RQwNoSzrWoEnNZIo:21 a=c-a3McZj88emZf5m:21 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=7WaDTBTAvtAhrWZK5EuGfqdkSqOD90diIBNglsnCQVk=; b=H52naJDob3g1ssxmQF4s6pmZAHThtlqEWHYQkYABGEomTNBEZn7pimmMQn1UhSeiXtFwdej+Lh/zVp55fAXSGxF1vx6nTwV30lvfLueoIGflqgh0TPxdfPkUi85aSZOw; Received: from [71.33.141.119] (port=58140 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1XPGk9-00012v-Vp; Wed, 03 Sep 2014 14:01:27 -0600 From: Tom Tromey To: bug-gnu-emacs@gnu.org Subject: 24.4.50; nadvice :filter-args -vs- interactive X-Attribution: Tom Date: Wed, 03 Sep 2014 14:01:21 -0600 Message-ID: <87mwagbhim.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.33.141.119 authed with tom+tromey.com} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I wrote this function to advise vc-dir, to make it default to starting at the project root. It's largely copied from vc-dir, then slightly hacked: (defun tromey-vc-dir (dir &optional backend) (interactive (list ;; When you hit C-x v d in a visited VC file, ;; the *vc-dir* buffer visits the directory under its truename; ;; therefore it makes sense to always do that. ;; Otherwise if you do C-x v d -> C-x C-f -> C-c v d ;; you may get a new *vc-dir* buffer, different from the original (let ((def-dir (or (if (fboundp 'vc-root-dir) (vc-root-dir)) default-directory))) (file-truename (read-directory-name "VC status for directory: " def-dir def-dir t nil))) (if current-prefix-arg (intern (completing-read "Use VC backend: " (mapcar (lambda (b) (list (symbol-name b))) vc-handled-backends) nil t nil nil))))) (list dir backend)) (require 'vc-dir) (advice-add #'vc-dir :filter-args #'tromey-vc-dir) If I now use M-x vc-dir, I get an error: vc-responsible-backend: Wrong type argument: stringp, ("/home/tromey/Emacs/trunk/" nil) However, if I invoke M-x tromey-vc-dir directly (and hack in a little bit of code so I can easily see the result), it works properly. Using that hack and then invoking vc-dir shows that the result of tromey-vc-dir in the advised-and-interactive case is: (("/home/tromey/Emacs/trunk/" nil) nil) ... which is wrong. So I think there must be a bug with how nadvice handles interactive specs, either generally or with :filter-args. In GNU Emacs 24.4.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9) of 2014-08-29 on bapiya Repository revision: 117768 dmantipov@yandex.ru-20140829122330-7g7qcbxsy64afin0 Windowing system distributor `Fedora Project', version 11.0.11404000 Configured using: `configure --prefix=/home/tromey/Emacs/install' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t helm-match-plugin-mode: t helm-occur-match-plugin-mode: t eldoc-mode: t which-function-mode: t global-auto-revert-mode: t erc-services-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t savehist-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t auto-fill-function: do-auto-fill Recent input: - f u n c i t o n SPC ' C-u C-b C-b C-t C-e ) C-j C-x o C-g C-p C-e C-j C-x o C-g C-p C-e C-j C-f C-f C-] C-] C-p C-p C-p C-e C-j C-] C-z n C-x 1 C-s a r i t y C-s C-x C-f t r l i s e m a c s - l i s n a d M-x l g r e p a r i t y C-x o C-x 1 C-u C-u C-n C-u C-n C-u C-n C-c C-c C-x 1 M-< C-x k C-u C-p C-p C-p C-p C-c C-c C-x 1 C-l C-v C-l C-s b y t e - C-w C-w C-r C-r C-r C-a C-u C-u C-n C-l C-z o C-p M-d M-d C-e C-j C-u C-u C-p C-M-f C-M-b M-f C-M-f C-M-f C-M-b C-M-f C-M-f C-M-f C-M-f C-M-b C-M-b C-M-b C-M-b C-M-b C-a C-s i n t e r a c t i v e C-g C-g C-g C-s d i r C-a M-v C-z n C-x b . e m C-x v v C-u C-n C-u C-n M-g d i r d e f - d i r y n n n n n y y q C-u C-p C-u C-p C-p C-p TAB C-n TAB C-n TAB C-n TAB C-x C-s C-x v v r e n a m e SPC v a r i a b l e SPC i n SPC t r o m e y - v - c - d i r C-c C-c C-z n M-x r e p o r t - e m Recent messages: Mark saved where search started Checking out /home/tromey/Emacs/COPY/.emacs...done Mark set Replaced 3 occurrences Saving file /home/tromey/Emacs/COPY/.emacs... Wrote /home/tromey/Emacs/COPY/.emacs Mark set Press C-c C-c when you are done editing. Enter a change comment. Type C-c C-c when done Checking in /home/tromey/Emacs/COPY/.emacs...done Load-path shadows: /home/tromey/.emacs.d/elpa/css-mode-1.0/css-mode hides /home/tromey/Emacs/install/share/emacs/24.4.50/lisp/textmodes/css-mode /home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/24.4.50/lisp/play/bubbles Features: (emacsbug log-edit pcvs-util smerge-mode bug-reference goto-addr image-file dabbrev bbdb-sc supercite regi gnus-draft xscheme unsafep trace testcover shadow scheme re-builder profiler pcase inf-lisp ielm ert debug elp edebug cl-indent checkdoc cus-edit copyright gnus-fun mailalias mail-hist nnir shr-color color diff-mode easy-mmode idutils derived cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds ido helm-mode helm-files rx image-dired tramp tramp-compat tramp-loaddefs trampver shell dired-x dired-aux ffap helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info helm-net helm-plugin bookmark helm-locate helm-help helm-match-plugin helm-grep helm-regexp helm-external helm-utils helm cl-macs eieio-opt speedbar sb-image ezimage dframe strokes help-mode shr flow-fill mm-archive gnus-html browse-url xml url-cache mm-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars bbdb-gui bbdb-hooks mule-util sort smiley gnus-cite gnus-async gnus-bcklg qp gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7 bbdb-gnus bbdb-snarf mail-extr bbdb-com warnings cl gv gnutls network-stream starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-registry registry eieio-base gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo smtpmail sendmail gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message dired rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader mail-utils misearch multi-isearch jka-compr add-log vc-arch vc-mtn vc-hg vc-git vc-bzr vc-sccs vc-svn vc-cvs vc-rcs tcl flyspell ispell eldoc diminish projectile edmacro kmacro pkg-info find-func lisp-mnt epl grep compile dash s appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu minimap autorevert filenotify cus-start cus-load status erc-services erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete erc-track erc-match erc-button wid-edit cl-loaddefs cl-lib erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat format-spec auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache thingatpt pp advice help-fns vc-dir ewoc vc vc-dispatcher cc-styles cc-align cc-engine cc-vars cc-defs bbdb timezone ange-ftp comint ansi-color ring server savehist dwarf-mode-autoloads gdb-shell-autoloads jabber-autoloads lisppaste-autoloads pydoc-info-autoloads info-look info easymenu weblogger-autoloads package bbdb-autoloads time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 765705 79812) (symbols 48 98987 0) (miscs 40 29965 3141) (strings 32 306257 26993) (string-bytes 1 6729704) (vectors 16 94726) (vector-slots 8 2050490 133815) (floats 8 591 1493) (intervals 56 28928 314) (buffers 976 110) (heap 1024 200585 13852)) Tom From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 16:42:19 2014 Received: (at 18399) by debbugs.gnu.org; 3 Sep 2014 20:42:20 +0000 Received: from localhost ([127.0.0.1]:58153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPHNj-0005P4-5G for submit@debbugs.gnu.org; Wed, 03 Sep 2014 16:42:19 -0400 Received: from mout.web.de ([212.227.15.14]:61789) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPHNf-0005Oo-Uh for 18399@debbugs.gnu.org; Wed, 03 Sep 2014 16:42:17 -0400 Received: from drachen.dragon ([90.187.52.95]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0LpOKb-1Y1cLE0ue5-00fFFc; Wed, 03 Sep 2014 22:42:09 +0200 From: Michael Heerdegen To: Tom Tromey Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive References: <87mwagbhim.fsf@tromey.com> Date: Wed, 03 Sep 2014 22:42:04 +0200 In-Reply-To: <87mwagbhim.fsf@tromey.com> (Tom Tromey's message of "Wed, 03 Sep 2014 14:01:21 -0600") Message-ID: <87zjegh1wj.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:ygo/OhHnXaRbwRqGirY7TQrDFllzaPU32RnsGbHGHnq2t8yTqGu nwJMSkE6b2nvhEeFIGUg+qQlLOLyW+wnrEmecKJi26PZnHaw4rZ3A9gtv+xa2REczGRlJsG LGAI4jZgBIHuwko+xV7PSzD17avaCjw8tSIAGBFnk6J6PUn1wIBQUC9oTM9AUBaP5sqY53G tJ03nXyiw7tUR+p9VJBAQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 18399 Cc: 18399@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Tom Tromey writes: > So I think there must be a bug with how nadvice handles interactive > specs, either generally or with :filter-args. According to the doc (of `add-function'), an filter-args advice function has to accept exactly one argument (which is bound to the list of given arguments). So I think what you see is expected. I have stumbled over that behavior several times myself. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 18:27:57 2014 Received: (at 18399) by debbugs.gnu.org; 3 Sep 2014 22:27:57 +0000 Received: from localhost ([127.0.0.1]:58193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPJ1w-0000js-V7 for submit@debbugs.gnu.org; Wed, 03 Sep 2014 18:27:57 -0400 Received: from gproxy2-pub.mail.unifiedlayer.com ([69.89.18.3]:34164) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1XPJ1t-0000jh-Qc for 18399@debbugs.gnu.org; Wed, 03 Sep 2014 18:27:55 -0400 Received: (qmail 4822 invoked by uid 0); 3 Sep 2014 22:27:50 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy2.mail.unifiedlayer.com with SMTP; 3 Sep 2014 22:27:50 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id msTj1o00F2f2jeq01sTmry; Wed, 03 Sep 2014 22:27:49 -0600 X-Authority-Analysis: v=2.1 cv=KvHehwmN c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=4GsTxW34auoA:10 a=McjFgvG-ESsA:10 a=-zKVdEv5C2EA:10 a=_cZRQKYwz3QA:10 a=zstS-IiYAAAA:8 a=PnD2wP_eR3oA:10 a=oMhZhQ4-4PIA:10 a=zkjkiaCmcOamc6iDkfoA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=SfcHfkTF1t/VoGx7EiZdotl3Cr7YV0hPiHt5JsibFlA=; b=TwTMPF2O5Le3NZQUn4JGu1k7hrdQSB4w2mqL8jaTLj4Rlho2M4R72KcMeMYk+zgVcc2q5Yci41BqulWbXl19my3T9Q+Dbw49W1ZRa163V/hJ6p/g7/62PYq9dr81Rjwa; Received: from [71.33.141.119] (port=58231 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1XPJ1k-00010q-9F; Wed, 03 Sep 2014 16:27:44 -0600 From: Tom Tromey To: Michael Heerdegen Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> X-Attribution: Tom Date: Wed, 03 Sep 2014 16:27:39 -0600 In-Reply-To: <87zjegh1wj.fsf@web.de> (Michael Heerdegen's message of "Wed, 03 Sep 2014 22:42:04 +0200") Message-ID: <87iol4baqs.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.33.141.119 authed with tom+tromey.com} X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18399 Cc: 18399@debbugs.gnu.org, Tom Tromey X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Michael> According to the doc (of `add-function'), an filter-args advice Michael> function has to accept exactly one argument (which is bound to Michael> the list of given arguments). So I think what you see is Michael> expected. Michael> I have stumbled over that behavior several times myself. I looked at the docs again and I agree. Sorry about the noise. Perhaps a note and/or a small example here would be nice for future users. If we were both fooled by this then perhaps others will be as well. Tom From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 22:59:22 2014 Received: (at 18399) by debbugs.gnu.org; 4 Sep 2014 02:59:22 +0000 Received: from localhost ([127.0.0.1]:58279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPNGb-0007LI-W3 for submit@debbugs.gnu.org; Wed, 03 Sep 2014 22:59:22 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:48242) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPNGY-0007L9-VV for 18399@debbugs.gnu.org; Wed, 03 Sep 2014 22:59:19 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s842xFFZ003032; Wed, 3 Sep 2014 22:59:16 -0400 Received: by pastel.home (Postfix, from userid 20848) id BE0A86308B; Wed, 3 Sep 2014 22:59:14 -0400 (EDT) From: Stefan Monnier To: Tom Tromey Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive Message-ID: References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> Date: Wed, 03 Sep 2014 22:59:14 -0400 In-Reply-To: <87iol4baqs.fsf@tromey.com> (Tom Tromey's message of "Wed, 03 Sep 2014 16:27:39 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5053=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5053> : inlines <1238> : streams <1280884> : uri <1810074> X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18399 Cc: Michael Heerdegen , 18399@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) Michael> According to the doc (of `add-function'), an filter-args advice Michael> function has to accept exactly one argument (which is bound to Michael> the list of given arguments). So I think what you see is Michael> expected. Michael> I have stumbled over that behavior several times myself. > I looked at the docs again and I agree. Sorry about the noise. Perhaps > a note and/or a small example here would be nice for future users. If > we were both fooled by this then perhaps others will be as well. FWIW, the use of a single formal arg receiving the actual arg-list in :filter-args is based on performance reasons (we have the list anyway, so it's more efficient to pass it to `funcall' than to `apply'). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 09:13:52 2014 Received: (at 18399) by debbugs.gnu.org; 4 Sep 2014 13:13:52 +0000 Received: from localhost ([127.0.0.1]:58499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPWrI-0007sg-G6 for submit@debbugs.gnu.org; Thu, 04 Sep 2014 09:13:52 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53723) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPWrG-0007sX-L8 for 18399@debbugs.gnu.org; Thu, 04 Sep 2014 09:13:51 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s84DDnRu022344; Thu, 4 Sep 2014 09:13:49 -0400 Received: by pastel.home (Postfix, from userid 20848) id DDE146107F; Thu, 4 Sep 2014 09:13:46 -0400 (EDT) From: Stefan Monnier To: Tom Tromey Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive Message-ID: References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> Date: Thu, 04 Sep 2014 09:13:46 -0400 In-Reply-To: (Stefan Monnier's message of "Wed, 03 Sep 2014 22:59:14 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV5053=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5053> : inlines <1239> : streams <1281225> : uri <1810229> X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18399 Cc: Michael Heerdegen , 18399@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > FWIW, the use of a single formal arg receiving the actual arg-list > in :filter-args is based on performance reasons (we have the list > anyway, so it's more efficient to pass it to `funcall' than to `apply'). Oh, and also, this way the function can return the list as-is when the args don't need to be modified. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 11:44:39 2014 Received: (at 18399-done) by debbugs.gnu.org; 4 Sep 2014 15:44:39 +0000 Received: from localhost ([127.0.0.1]:58931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPZDC-0003EH-HW for submit@debbugs.gnu.org; Thu, 04 Sep 2014 11:44:38 -0400 Received: from relais.videotron.ca ([24.201.245.36]:51778) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPZDA-0003E5-BD for 18399-done@debbugs.gnu.org; Thu, 04 Sep 2014 11:44:37 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([24.201.170.218]) by VL-VM-MR007.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0NBD0030OVQ6QT00@VL-VM-MR007.ip.videotron.ca> for 18399-done@debbugs.gnu.org; Thu, 04 Sep 2014 11:44:30 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id 28C79660C4; Thu, 04 Sep 2014 11:44:29 -0400 (EDT) From: Stefan Monnier To: Tom Tromey Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive Message-id: References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> Date: Thu, 04 Sep 2014 11:44:29 -0400 In-reply-to: <87iol4baqs.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18399-done Cc: Michael Heerdegen , 18399-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > I looked at the docs again and I agree. Sorry about the noise. Perhaps > a note and/or a small example here would be nice for future users. If > we were both fooled by this then perhaps others will be as well. I installed the patch below, which I hope will help clear up such confusion. Stefan === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-08-19 18:56:29 +0000 +++ doc/lispref/ChangeLog 2014-09-04 15:42:28 +0000 @@ -1,3 +1,8 @@ +2014-09-04 Stefan Monnier + + * functions.texi (Core Advising Primitives): Add a note about the + confusing treatment of `interactive' for :filter-args (bug#18399). + 2014-08-19 Eli Zaretskii * display.texi (Bidirectional Display): Update the Emacs's class === modified file 'doc/lispref/functions.texi' --- doc/lispref/functions.texi 2014-05-27 01:09:45 +0000 +++ doc/lispref/functions.texi 2014-09-04 15:40:13 +0000 @@ -1220,15 +1220,6 @@ This macro is the handy way to add the advice @var{function} to the function stored in @var{place} (@pxref{Generalized Variables}). -If @var{function} is not interactive, then the combined function will inherit -the interactive spec, if any, of the original function. Else, the combined -function will be interactive and will use the interactive spec of -@var{function}. One exception: if the interactive spec of @var{function} -is a function (rather than an expression or a string), then the interactive -spec of the combined function will be a call to that function with as sole -argument the interactive spec of the original function. To interpret the spec -received as argument, use @code{advice-eval-interactive-spec}. - @var{where} determines how @var{function} is composed with the existing function, e.g. whether @var{function} should be called before, or after the original function. @xref{Advice combinators}, for the list of @@ -1271,6 +1262,21 @@ @code{:override} advice will override not only the original function but all other advices applied to it as well. @end table + +If @var{function} is not interactive, then the combined function will inherit +the interactive spec, if any, of the original function. Else, the combined +function will be interactive and will use the interactive spec of +@var{function}. One exception: if the interactive spec of @var{function} +is a function (rather than an expression or a string), then the interactive +spec of the combined function will be a call to that function with as sole +argument the interactive spec of the original function. To interpret the spec +received as argument, use @code{advice-eval-interactive-spec}. + +Note: The interactive spec of @var{function} will apply to the combined +function and should hence obey the calling convention of the combined function +rather than that of @var{function}. In many cases, it makes no difference +since they are identical, but it does matter for @code{:around}, +@code{:filter-args}, and @code{filter-return}, where @var{function}. @end defmac @defmac remove-function place function From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 19:11:23 2014 Received: (at 18399) by debbugs.gnu.org; 4 Sep 2014 23:11:23 +0000 Received: from localhost ([127.0.0.1]:59143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPgBX-00079Y-9C for submit@debbugs.gnu.org; Thu, 04 Sep 2014 19:11:23 -0400 Received: from mout.web.de ([212.227.17.12]:55364) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPgBU-00079E-Pi for 18399@debbugs.gnu.org; Thu, 04 Sep 2014 19:11:22 -0400 Received: from drachen.dragon ([90.186.74.63]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0M9ojk-1XWFlM0rou-00B86T; Fri, 05 Sep 2014 01:11:08 +0200 From: Michael Heerdegen To: 18399@debbugs.gnu.org Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> Date: Fri, 05 Sep 2014 01:11:04 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 04 Sep 2014 11:44:29 -0400") Message-ID: <8738c7oubb.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:SgqbktQvwVNlCs8wLRHBdIcOAw+rQ9v03ZGG5W8eDq3QnYxx2Ij XG8sHXj/RQc2w0GX1GQ4O6f9vxnLCgFAJTmlpML5btqy7eOsQW5lxK9xEy6KDkSbH5jQvik B0z2DMNcdsyb5WbDy5oYjPCnB9UFPh1hIJ1PcspgUUMMxu3lfhsOPo7k4xMXpcSBmksg9e5 BtE13CMaREyhCzTFKymZw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 18399 Cc: tom@tromey.com, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) Hi Stefan > I installed the patch below, which I hope will help clear up such > confusion. Thanks, a good clarification. But I'm not sure if that covers what Tom meant. I myself was confused by the fact that :filter-args is the only case of all advice types where the advice fun receives the arguments as a list. It's a bit surprising, although the doc is clear and there are good reasons for that "exception". Maybe we could add a sentence to the =E2=80=98:filter-args=E2=80=99 paragraph of (info "(elisp) Advice combinato= rs") like =20 "Note that FUNCTION is called with only one argument, the list of arguments, for this advice type". Although it is redundant, it may be good to emphasize it. Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 21:24:40 2014 Received: (at 18399) by debbugs.gnu.org; 5 Sep 2014 01:24:40 +0000 Received: from localhost ([127.0.0.1]:59185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPiGV-00020S-PA for submit@debbugs.gnu.org; Thu, 04 Sep 2014 21:24:39 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:49802) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPiGU-00020J-Bd for 18399@debbugs.gnu.org; Thu, 04 Sep 2014 21:24:38 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s851ObGk017474; Thu, 4 Sep 2014 21:24:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id E70F560BEC; Thu, 4 Sep 2014 21:24:36 -0400 (EDT) From: Stefan Monnier To: Michael Heerdegen Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive Message-ID: References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> <8738c7oubb.fsf@web.de> Date: Thu, 04 Sep 2014 21:24:36 -0400 In-Reply-To: <8738c7oubb.fsf@web.de> (Michael Heerdegen's message of "Fri, 05 Sep 2014 01:11:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5054=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5054> : inlines <1245> : streams <1281642> : uri <1810413> X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18399 Cc: 18399@debbugs.gnu.org, tom@tromey.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > But I'm not sure if that covers what Tom meant. The fact that we mention the unusual calling convention there does partly cover it. > Although it is redundant, it may be good to emphasize it. As you say, it's a bit redundant there. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 05 12:30:00 2014 Received: (at 18399) by debbugs.gnu.org; 5 Sep 2014 16:30:00 +0000 Received: from localhost ([127.0.0.1]:60006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPwOd-0001xr-Kc for submit@debbugs.gnu.org; Fri, 05 Sep 2014 12:30:00 -0400 Received: from mout.web.de ([212.227.17.12]:51280) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XPwOa-0001xd-IT for 18399@debbugs.gnu.org; Fri, 05 Sep 2014 12:29:57 -0400 Received: from drachen.dragon ([90.186.190.254]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LetUp-1YBMgT1jXL-00qguv; Fri, 05 Sep 2014 18:29:42 +0200 From: Michael Heerdegen To: Stefan Monnier Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> <8738c7oubb.fsf@web.de> Date: Fri, 05 Sep 2014 18:29:39 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 04 Sep 2014 21:24:36 -0400") Message-ID: <87k35ido98.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:uv9Zv4UrYtXMJdX/q/g7gTK3VzwzUmwKjflUpjpHeGp4mtc+Hmg WiObeIMn0+Jp/2FiGPcGmkn/YdYJ42hntUhi1kubytQKEOMlvNOoyz70pzd4i4Qht442UM7 3II4Ps5MZ4tTfVI2Y6J3MVXZcNAJAliB+SV8jxKQ/50cKmBatME4l4zkDizyHmRhPAVO9yR zEubQpuhfgx/lhAgEEa/Q== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 18399 Cc: 18399@debbugs.gnu.org, tom@tromey.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Stefan Monnier writes: > > But I'm not sure if that covers what Tom meant. > > The fact that we mention the unusual calling convention there does > partly cover it. Ok, I agree, let's keep the patch as is, thanks. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 06 01:40:35 2014 Received: (at 18399) by debbugs.gnu.org; 6 Sep 2014 05:40:35 +0000 Received: from localhost ([127.0.0.1]:60143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQ8jj-0006SZ-0m for submit@debbugs.gnu.org; Sat, 06 Sep 2014 01:40:35 -0400 Received: from gproxy6-pub.mail.unifiedlayer.com ([67.222.39.168]:36770) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1XQ8jg-0006SQ-9k for 18399@debbugs.gnu.org; Sat, 06 Sep 2014 01:40:33 -0400 Received: (qmail 8079 invoked by uid 0); 6 Sep 2014 05:40:28 -0000 Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy6.mail.unifiedlayer.com with SMTP; 6 Sep 2014 05:40:28 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id nngN1o0012f2jeq01ngRTG; Sat, 06 Sep 2014 05:40:27 -0600 X-Authority-Analysis: v=2.1 cv=DIUcvU9b c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=4GsTxW34auoA:10 a=McjFgvG-ESsA:10 a=-zKVdEv5C2EA:10 a=_cZRQKYwz3QA:10 a=IkcTkHD0fZMA:10 a=zstS-IiYAAAA:8 a=PnD2wP_eR3oA:10 a=oMhZhQ4-4PIA:10 a=SZpcNan0uUWFKBw0_sQA:9 a=QEXdDO2ut3YA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=j5k41zX9PNGm8azQ3nSpgDcvpiXA6PkkSQ2m+Nd2RI4=; b=KXrhVcwLnY622hybcCJW0X1hA8d/jjLS0ZC4uKsBVmzn5G0pXsg1DjF8xDu42U7dpbgWlJX96QIkYpIJufq432/9wifyD4Ec+v9nnYXTXUuW82FwvKF3uh42Pw36lDmf; Received: from [71.33.141.119] (port=35769 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1XQ8jX-0001xi-1J; Fri, 05 Sep 2014 23:40:23 -0600 From: Tom Tromey To: Michael Heerdegen Subject: Re: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> <8738c7oubb.fsf@web.de> X-Attribution: Tom Date: Fri, 05 Sep 2014 23:40:19 -0600 In-Reply-To: <8738c7oubb.fsf@web.de> (Michael Heerdegen's message of "Fri, 05 Sep 2014 01:11:04 +0200") Message-ID: <87egvp9uik.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.33.141.119 authed with tom+tromey.com} X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18399 Cc: 18399@debbugs.gnu.org, tom@tromey.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Michael> I myself was confused by the fact that :filter-args is the only ca= se of Michael> all advice types where the advice fun receives the arguments as a = list. Michael> It's a bit surprising, although the doc is clear and there are good Michael> reasons for that "exception". Maybe we could add a sentence to the Michael> =E2=80=98:filter-args=E2=80=99 paragraph of (info "(elisp) Advice = combinators") like =20 Michael> "Note that FUNCTION is called with only one argument, the list of Michael> arguments, for this advice type". Yeah, I had the same thought and had written the appended patch. My reason was simply that I had been (mis-)reading the :filter-args text, not the stuff about the (interactive) spec. Tom =3D=3D=3D modified file 'doc/lispref/functions.texi' *** doc/lispref/functions.texi 2014-06-02 00:18:22 +0000 --- doc/lispref/functions.texi 2014-09-06 05:40:02 +0000 *************** *** 1480,1485 **** --- 1480,1488 ---- @example (lambda (&rest r) (apply @var{oldfun} (funcall @var{function} r))) @end example + Note carefully that, unlike with other combinators, in the + @code{:filter-args} case, the original arguments are passed as a + single argument to the advising function. =20=20 @item :filter-return Call the old function first and pass the result to @var{function}. From unknown Fri Sep 05 11:51:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Oct 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator