* Re: "Warning: `save-excursion' defeated by `set-buffer'" madness
[not found] ` <jwv3a12bmqj.fsf-monnier+emacs@gnu.org>
@ 2010-02-15 15:50 ` Štěpán Němec
2010-02-15 17:53 ` Drew Adams
[not found] ` <jwvk4ue8e8u.fsf-monnier+emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Štěpán Němec @ 2010-02-15 15:50 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel, Drew Adams, Barry Fishman
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
On Mon, Feb 15, 2010 at 09:40:58AM -0500, Stefan Monnier wrote:
> > -- it appears when invoking `ibuffer', for instance, but not with
> > emacs -q; and I have no customization of ibuffer whatsoever, so I have
> > no idea what could be the issue there.
>
> Can you reproduce it at will?
> If so, can you M-x debug-on-entry RET byte-compile-warn RET, then
> reproduce it and then show us the backtrace (and maybe also the result
> of "e form RET" since `form' may be truncated in the backtrace).
Yes, please see the attached file.
[`form' evaluates to
(save-excursion (set-buffer (car bbdb-complete-name-callback-data))
(apply (quote delete-region) (cdr bbdb-complete-name-callback-data))),
but it's visible from the backtrace just fine]
So it's BBDB-related again, but really Icicles-initiated in this case. I
didn't suspect Icicles originally, as I had it off when invoking
`ibuffer', but now that I tried not even requiring Icicles in my init file,
the problem goes away. Also, even with Icicles loaded, it only happens
the first time `ibuffer' is invoked; so it's probably related to all
those re-initializations Icicles is doing; I'm cc-ing Drew in case he
was interested (icicles.el is Update #: 22624).
Thanks,
Štěpán
[-- Attachment #2: ibufferbacktrace --]
[-- Type: text/plain, Size: 10186 bytes --]
Debugger entered--entering a function:
* byte-compile-warn("`save-excursion' defeated by `set-buffer'")
byte-compile-save-excursion((save-excursion (set-buffer (car bbdb-complete-name-callback-data)) (apply (quote delete-region) (cdr bbdb-complete-name-callback-data))))
byte-compile-form((save-excursion (set-buffer (car bbdb-complete-name-callback-data)) (apply (quote delete-region) (cdr bbdb-complete-name-callback-data))) t)
byte-compile-if((if bbdb-complete-name-callback-data (save-excursion (set-buffer ...) (apply ... ...))))
byte-compile-form((if bbdb-complete-name-callback-data (save-excursion (set-buffer ...) (apply ... ...))) t)
byte-compile-body(((if bbdb-complete-name-callback-data (save-excursion ... ...)) (setq ad-return-value (ad-Orig-choose-completion-string choice buffer base-size)) ad-return-value) nil)
byte-compile-let((let (ad-return-value) (if bbdb-complete-name-callback-data (save-excursion ... ...)) (setq ad-return-value (ad-Orig-choose-completion-string choice buffer base-size)) ad-return-value))
byte-compile-form((let (ad-return-value) (if bbdb-complete-name-callback-data (save-excursion ... ...)) (setq ad-return-value (ad-Orig-choose-completion-string choice buffer base-size)) ad-return-value) nil)
byte-compile-top-level((progn (let (ad-return-value) (when bbdb-complete-name-callback-data ...) (setq ad-return-value ...) ad-return-value)) nil lambda)
byte-compile-lambda((lambda (choice &optional buffer base-size) #("Advice doc string" 0 17 (ad-advice-info choose-completion-string)) (let (ad-return-value) (when bbdb-complete-name-callback-data ...) (setq ad-return-value ...) ad-return-value)))
#[nil "\306\b!\307\211\211\211\211 \n\v\f\r\x1d\x1c^[\x1a\x19\x1e\r\x1e\x0e\x1e\x0f\x1e\x10\x1e\x11\x1e\x12\x0e\x139\2031\0\310\x0e\x13!\2053\0\x0e\x13K\2023\0\x0e\x13\211\x1e\x14\242\311=\211\x1e \203D\0\x0e\x14A\x16\x14\x0e\x14\242\312=\205q\0\x0e \203Z\0\311\313\x0e\x14!B\202^\0\313\x0e\x14!\x16\x14\x0e\x139\203o\0\314\x0e\x13\x0e\x14\"\202q\0\x0e\x14.\r\207" [byte-compile-initial-macro-environment byte-compile-verbose byte-optimize byte-compile-dynamic byte-compile-dynamic-docstrings byte-compile-warnings copy-alist nil fboundp macro lambda byte-compile-lambda defalias byte-compile-free-assignments byte-compile-free-references byte-compile-const-variables byte-compile-bound-variables byte-compile-function-environment byte-compile-macro-environment form fun] 12]()
funcall(#[nil "\306\b!\307\211\211\211\211 \n\v\f\r\x1d\x1c^[\x1a\x19\x1e\r\x1e\x0e\x1e\x0f\x1e\x10\x1e\x11\x1e\x12\x0e\x139\2031\0\310\x0e\x13!\2053\0\x0e\x13K\2023\0\x0e\x13\211\x1e\x14\242\311=\211\x1e \203D\0\x0e\x14A\x16\x14\x0e\x14\242\312=\205q\0\x0e \203Z\0\311\313\x0e\x14!B\202^\0\313\x0e\x14!\x16\x14\x0e\x139\203o\0\314\x0e\x13\x0e\x14\"\202q\0\x0e\x14.\r\207" [byte-compile-initial-macro-environment byte-compile-verbose byte-optimize byte-compile-dynamic byte-compile-dynamic-docstrings byte-compile-warnings copy-alist nil fboundp macro lambda byte-compile-lambda defalias byte-compile-free-assignments byte-compile-free-references byte-compile-const-variables byte-compile-bound-variables byte-compile-function-environment byte-compile-macro-environment form fun] 12])
byte-compile(advice-compilation)
ad-compile-function(choose-completion-string)
ad-activate-advised-definition(choose-completion-string nil)
ad-activate-internal(choose-completion-string nil)
defalias(choose-completion-string icicle-choose-completion-string)
icicle-redefine-std-completion-fns()
(cond (icicle-mode (icicle-define-icicle-maps) (icicle-bind-other-keymap-keys) (add-hook ... ...) (add-hook ... ...) (add-hook ... ...) (add-hook ... ...) (add-hook ... ... ...) (add-hook ... ... ...) (when icicle-customize-save-flag ...) (add-hook ... ...) (add-hook ... ...) (add-hook ... ...) (add-hook ... ...) (icicle-undo-std-completion-faces) (icicle-redefine-std-completion-fns) (icicle-redefine-standard-commands) (icicle-redefine-standard-options) (when ... ...) (when ... ...) (if icicle-menu-items-to-history-flag ... ...) (when ... ... ...)) (t (makunbound ...) (icicle-restore-other-keymap-keys) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ... t) (remove-hook ... ... t) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... ...) (icicle-restore-std-completion-fns) (icicle-restore-standard-commands) (icicle-restore-standard-options) (when ... ...) (when ... ...) (remove-hook ... ...) (when ... ... ...)))
(let ((last-message ...)) (setq icicle-mode (cond ... ... ...)) (cond (icicle-mode ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (t ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)) (unless (eq icicle-guess-commands-in-path ...) (setq icicle-shell-command-candidates-cache nil)) (message "Turning %s Icicle mode..." (if icicle-mode "ON" "OFF")) (icicle-define-minibuffer-maps icicle-mode) (run-hooks (quote icicle-mode-hook)) (message "Turning %s Icicle mode...done" (if icicle-mode "ON" "OFF")) (run-hooks (quote icicle-mode-hook) (if icicle-mode ... ...)) (if (called-interactively-p ...) (progn ... ...)))
icy-mode(1)
icicle-toggle-icicle-mode-twice()
eval((icicle-toggle-icicle-mode-twice))
mapc(eval ((icicle-toggle-icicle-mode-twice)))
#[(a-l-element) "\b@;\205\x1d\0\b@ \306\x1a^[\x1c\307\x1d\310\f\v\n#,\205\x1d\0\311\312\bA\"\207" [a-l-element abs-file start string regexp inhibit-changing-match-data nil t string-match mapc eval] 4](("\\(\\`\\|/\\)ibuffer\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)))
mapc(#[(a-l-element) "\b@;\205\x1d\0\b@ \306\x1a^[\x1c\307\x1d\310\f\v\n#,\205\x1d\0\311\312\bA\"\207" [a-l-element abs-file start string regexp inhibit-changing-match-data nil t string-match mapc eval] 4] ((geiser-mode (progn ... ...)) ("\\(\\`\\|/\\)scheme\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (add-hook ... ...)) (scheme (progn ...)) (yaoddmuse (progn ... ...)) (w3m (progn ...)) ("\\(\\`\\|/\\)thingatpt\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (require ...)) (sunrise (progn ... ... ... ... ... ...)) ("\\(\\`\\|/\\)session\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (add-to-list ... ...)) ("\\(\\`\\|/\\)ecb\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice ecb-method-clicked ... "Make hierarchy visible when jumping into location from ECB tree buffer." ...)) ("\\(\\`\\|/\\)saveplace\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice save-place-find-file-hook ... "Make the position visible." ...)) ("\\(\\`\\|/\\)bookmark\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (if ... ... ...)) ("\\(\\`\\|/\\)speedbar\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ... ... ... ... ...)) ("\\(\\`\\|/\\)imenu\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ...)) ("\\(\\`\\|/\\)org-exp\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (add-hook ... ...)) ("\\(\\`\\|/\\)calendar\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ... ...)) ("\\(\\`\\|/\\)tcl\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)sh-script\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)shell\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)rlogin\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)net-utils\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)info\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)ielm\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)idlw-shell\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)ibuffer\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)recentf\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...)) ("\\(\\`\\|/\\)dired-aux\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...)) ("\\(\\`\\|/\\)dired-x\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ... ...)) ("\\(\\`\\|/\\)bbdb-com\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...)) ("\\(\\`\\|/\\)gud\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...) (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)ess-site\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...) (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)comint\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ... ...)) (filesets (defun filesets-get-filelist ... "Get all files for fileset ENTRY.\nAssume MODE (see `filesets-entry-mode'), if provided." ...)) ("\\(\\`\\|/\\)crm\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ... ... ... ... ... ... ... ...)) ("\\(\\`\\|/\\)eev-all\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ...)) (diff-mode (progn ... ...)) ("\\(\\`\\|/\\)sendmail\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ...)) ("\\(\\`\\|/\\)tar-mode\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ...)) (eldoc (let ... ...)) (help-mode (when vimpulse-want-vi-keys-in-help ... ... ...)) (info (when vimpulse-want-vi-keys-in-Info ... ... ... ... ... ... ...)) (dired (when vimpulse-want-vi-keys-in-dired ... ... ...)) ("\\(\\`\\|/\\)buff-menu\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (when vimpulse-want-vi-keys-in-buffmenu ... ... ...)) ("\\(\\`\\|/\\)mule-cmds\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ...) (defadvice toggle-input-method ... "Adjust input-method toggling in vi-state." ...)) ("\\(\\`\\|/\\)iso-acc\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice iso-accents-mode ... "Set viper-automatic-iso-accents to iso-accents-mode." ...)) ("\\(\\`\\|/\\)rmailedit\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice rmail-cease-edit ... "Switch to Emacs state when done editing message." ...)) ("\\(\\`\\|/\\)passwd\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice read-passwd-1 ... "Switch to Emacs state while reading password." ...)) ("\\(\\`\\|/\\)emerge\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice emerge-quit ... "Run `viper-change-state-to-vi' after quitting emerge." ...)) ("\\(\\`\\|/\\)flyspell\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (viper-normalize-minor-mode-map-alist)) ("\\(\\`\\|/\\)reftex\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (viper-normalize-minor-mode-map-alist)) ("\\(\\`\\|/\\)view\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (viper-normalize-minor-mode-map-alist)) ...))
do-after-load-evaluation("/usr/local/share/emacs/23.1.91/lisp/ibuffer.elc")
^ permalink raw reply [flat|nested] 8+ messages in thread