From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#18399: 24.4.50; nadvice :filter-args -vs- interactive Date: Fri, 05 Sep 2014 23:40:19 -0600 Message-ID: <87egvp9uik.fsf@tromey.com> References: <87mwagbhim.fsf@tromey.com> <87zjegh1wj.fsf@web.de> <87iol4baqs.fsf@tromey.com> <8738c7oubb.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409982089 5437 80.91.229.3 (6 Sep 2014 05:41:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2014 05:41:29 +0000 (UTC) Cc: 18399@debbugs.gnu.org, tom@tromey.com To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 06 07:41:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQ8kS-0003hJ-4M for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Sep 2014 07:41:20 +0200 Original-Received: from localhost ([::1]:32954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ8kR-0000g3-JM for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Sep 2014 01:41:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ8kH-0000f7-Qh for bug-gnu-emacs@gnu.org; Sat, 06 Sep 2014 01:41:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQ8kA-0000aB-PX for bug-gnu-emacs@gnu.org; Sat, 06 Sep 2014 01:41:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ8kA-0000a7-Ii for bug-gnu-emacs@gnu.org; Sat, 06 Sep 2014 01:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XQ8k9-0006Tc-VO for bug-gnu-emacs@gnu.org; Sat, 06 Sep 2014 01:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Sep 2014 05:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 18399-submit@debbugs.gnu.org id=B18399.140998203524839 (code B ref 18399); Sat, 06 Sep 2014 05:41:01 +0000 Original-Received: (at 18399) by debbugs.gnu.org; 6 Sep 2014 05:40:35 +0000 Original-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 Original-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 Original-Received: (qmail 8079 invoked by uid 0); 6 Sep 2014 05:40:28 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy6.mail.unifiedlayer.com with SMTP; 6 Sep 2014 05:40:28 -0000 Original-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; Original-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 X-Attribution: Tom 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) X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.33.141.119 authed with tom+tromey.com} X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93086 Archived-At: 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}.