From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Newsgroups: gmane.emacs.devel Subject: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500) Date: Sat, 10 Nov 2012 00:47:20 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87haoyl4on.fsf@topper.koldfront.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1352504861 5351 80.91.229.3 (9 Nov 2012 23:47:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2012 23:47:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 10 00:47:51 2012 Return-path: Envelope-to: ged-emacs-devel@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 1TWyIg-0000j7-6s for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2012 00:47:50 +0100 Original-Received: from localhost ([::1]:56752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWyIX-0002hg-1Y for ged-emacs-devel@m.gmane.org; Fri, 09 Nov 2012 18:47:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWyIT-0002gk-ND for emacs-devel@gnu.org; Fri, 09 Nov 2012 18:47:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWyIR-0005kA-W3 for emacs-devel@gnu.org; Fri, 09 Nov 2012 18:47:37 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:58225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWyIR-0005k4-Lr for emacs-devel@gnu.org; Fri, 09 Nov 2012 18:47:35 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TWyIY-0000c2-6Z for emacs-devel@gnu.org; Sat, 10 Nov 2012 00:47:42 +0100 Original-Received: from 2505ds5-by.0.fullrate.dk ([89.150.142.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Nov 2012 00:47:42 +0100 Original-Received: from asjo by 2505ds5-by.0.fullrate.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Nov 2012 00:47:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 118 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 2505ds5-by.0.fullrate.dk OpenPGP: id=21BDE416; url=http://asjo.koldfront.dk/gpg.asc X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154777 Archived-At: Hi. I just installed a new emacs-snapshot package=B9, and got an error on startup, from these four lines in my .emacs.d/init.el: (defadvice gnus (before manual-fetch-before activate) (setq asjo-fetch-was-manual t)) (defadvice gnus (after manual-fetch-after activate) (setq asjo-fetch-was-manual nil)) (which is part of a crude homebrewed mechanism to do different things according to whether I manually fetch email/news in Gnus, or it is done automatically by a gnus-demon.) So I checked out the emacs repository and git bisect'ed the problem to: daa84a03e1a35c9d86865a39f7e2a768a1f43873 is the first bad commit commit daa84a03e1a35c9d86865a39f7e2a768a1f43873 Author: Stefan Monnier Date: Thu Nov 8 23:10:16 2012 -0500 New property dynamic-docstring-function for docstrings. * src/doc.c (Fdocumentation): Handle new property dynamic-docstring-function to replace the old ad-advice-info. * lisp/emacs-lisp/advice.el: Use new dynamic docstrings. (ad-make-advised-definition-docstring, ad-advised-definition-p): Use dynamic-docstring-function instead of ad-advice-info. (ad--make-advised-docstring): New function extracted from ad-make-advised-docstring. (ad-make-advised-docstring): Use it. * lisp/progmodes/sql.el (sql--make-help-docstring): New function, ext= racted from sql-help. (sql-help): Use it with dynamic-docstring-function. The error I get on startup when I run ./src/emacs built with that commit is: Warning (initialization): An error occurred while loading `/home/asjo/.em= acs.d/init.el': Wrong type argument: symbolp, #[(&optional arg dont-connect slave) \305.\= 306.\307 ^K^L#\211.)\207 [ad-return-value asjo-fetch-was-manual arg dont-connect s= lave nil t ad-Orig-gnus] 5 Advice doc string P] If I run ./src/emacs --debug-init, I get this backtrace: Debugger entered--Lisp error: (wrong-type-argument symbolp #[(&optional a= rg dont-connect slave) "\305.\306.\307 ^K^L#\211.)\207" [ad-return-value asjo-fetch-was-manual arg dont-connect = slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17 (dynamic-docstring-f= unction ad--make-advised-docstring)) "P"]) ad-real-orig-definition(#[(&optional arg dont-connect slave) "\305.\306= .\307\n^K\f#\211.)\207" [ad-return-value asjo-fetch-was-manual arg dont-con= nect slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17 (dynamic-docstr= ing-function ad--make-advised-docstring)) "P"]) ad--make-advised-docstring(#("Advice doc string" 0 17 (dynamic-docstrin= g-function ad--make-advised-docstring)) #[(&optional arg dont-connect slave= ) "\305.\306.\307\n^K\f#\211.)\207" [ad-return-value asjo-fetch-was-manual = arg dont-connect slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17 (dy= namic-docstring-function ad--make-advised-docstring)) "P"]) ad-real-documentation(#[(&optional arg dont-connect slave) "\305.\306.\= 307\n^K\f#\211.)\207" [ad-return-value asjo-fetch-was-manual arg dont-conne= ct slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17 (dynamic-docstrin= g-function ad--make-advised-docstring)) "P"] t) ad-docstring(#[(&optional arg dont-connect slave) "\305.\306.\307\n^K\f= #\211.)\207" [ad-return-value asjo-fetch-was-manual arg dont-connect slave = nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17 (dynamic-docstring-functio= n ad--make-advised-docstring)) "P"]) ad-advised-definition-p(#[(&optional arg dont-connect slave) "\305.\306= .\307\n^K\f#\211.)\207" [ad-return-value asjo-fetch-was-manual arg dont-con= nect slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17 (dynamic-docstr= ing-function ad--make-advised-docstring)) "P"]) ad-handle-definition(gnus) ad-activate(gnus nil) (progn (ad-add-advice (quote gnus) (quote (manual-fetch-after nil t (ad= vice lambda nil (setq asjo-fetch-was-manual nil)))) (quote after) (quote ni= l)) (ad-activate (quote gnus) nil) (quote gnus)) eval-buffer(# nil "/home/asjo/.emacs.d/init.el" nil t) = ; Reading at buffer position 2546 load-with-code-conversion("/home/asjo/.emacs.d/init.el" "/home/asjo/.em= acs.d/init.el" t t) load("/home/asjo/.emacs.d/init" t t) #[0 "^H\205\262. \306=3D\203.^@\307^H\310Q\202;. \311=3D\204.^@\307^H\3= 12Q\202;.\313\307\314\315#\203*.\316\202;.\313\307\314\317#\203:.\320\nB.\3= 21\202;.\316\322.\323.\322\211#\210^K\322=3D\203a.\324\325\326\307^H\327Q!\= "\323.\322\211#\210^K\322=3D\203`.^A.\210^K\203\243.\330^K!\331\232\203\243= .\332^K!\211\333P\334.!\203}.\211\202\210.\334.!\203\207.^A\202\210.\314\26= 2.^A\203\241.\335.^K\"\203\237.\336\337.^K#\210\340\341!\210.^S\266.\f?\205= \260.\314.\323\342\322\211#)\262.\207" [init-file-user system-type delayed-= warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms= -dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\= .elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' i= nit file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file= -name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" f= ile-name-sans-extension ".el" file-exists-p file-newer-than-file-p message = "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]() command-line() normal-top-level() It's probably something I'm doing wrong with the advice, as the scheme I got going was added by trial-and-error, but I thought I'd report it nonetheless. Best regards, Adam =B9 Graciously built by Julien Danjou at http://emacs.naquadah.org/ --=20 "I threw myself out a 1000 times Adam Sj=F8gren To seperate body from mind asjo@koldfront.dk But you know I didn't give a damn I'm gonna be just who I am"