[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16
From: |
Adam Sjøgren |
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 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) |
Hi.
I just installed a new emacs-snapshot package¹, 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 <address@hidden>
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,
extracted
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/.emacs.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 slave
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 arg
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-function 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-connect slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17
(dynamic-docstring-function ad--make-advised-docstring)) "P"])
ad--make-advised-docstring(#("Advice doc string" 0 17
(dynamic-docstring-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 (dynamic-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-connect slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17
(dynamic-docstring-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-function 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-connect slave nil t ad-Orig-gnus] 5 #("Advice doc string" 0 17
(dynamic-docstring-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 (advice
lambda nil (setq asjo-fetch-was-manual nil)))) (quote after) (quote nil))
(ad-activate (quote gnus) nil) (quote gnus))
eval-buffer(#<buffer *load*> 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/.emacs.d/init.el" t t)
load("/home/asjo/.emacs.d/init" t t)
#[0 "^H\205\262. address@hidden;.
address@hidden;.\313\307\314\315#\203*.\316\202;.\313\307\314\317#\203:.\320\nB.\321\202;.\316\322.\323.\322\211#\210^K\322=\203a.\324\325\326\307^H\327Q!\"\323.\322\211#\210^K\322=\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\262.^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' init file is deprecated,
please use `.emacs'") "~/_emacs" t load expand-file-name "init"
file-name-as-directory "/.emacs.d" file-name-extension "elc"
file-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
¹ Graciously built by Julien Danjou at http://emacs.naquadah.org/
--
"I threw myself out a 1000 times Adam Sjøgren
To seperate body from mind address@hidden
But you know I didn't give a damn
I'm gonna be just who I am"
- Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500),
Adam Sjøgren <=
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Stefan Monnier, 2012/11/09
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Ivan Kanis, 2012/11/12
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Katsumi Yamaoka, 2012/11/13
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Stefan Monnier, 2012/11/13
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Katsumi Yamaoka, 2012/11/13
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Juanma Barranquero, 2012/11/14
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Katsumi Yamaoka, 2012/11/14
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Stefan Monnier, 2012/11/14
- Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500), Ivan Kanis, 2012/11/15