all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Drew Adams <drew.adams@oracle.com>,
	Barry Fishman <barry_fishman@acm.org>
Subject: Re: "Warning: `save-excursion' defeated by `set-buffer'" madness
Date: Mon, 15 Feb 2010 16:50:54 +0100	[thread overview]
Message-ID: <20100215155054.GC2289@headley> (raw)
In-Reply-To: <jwv3a12bmqj.fsf-monnier+emacs@gnu.org>

[-- 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")

  parent reply	other threads:[~2010-02-15 15:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12 20:40 "Warning: `save-excursion' defeated by `set-buffer'" madness Štěpán Němec
     [not found] ` <m3zl3c3fl4.fsf@barry_fishman.acm.org>
2010-02-14  0:17   ` Štěpán Němec
     [not found]     ` <jwvfx53n5jm.fsf-monnier+emacs@gnu.org>
2010-02-14 19:38       ` Barry Fishman
2010-02-15 11:19         ` Štěpán Němec
2010-02-15 15:44           ` Drew Adams
     [not found]           ` <jwv3a12bmqj.fsf-monnier+emacs@gnu.org>
2010-02-15 15:50             ` Štěpán Němec [this message]
2010-02-15 17:53               ` Drew Adams
     [not found]               ` <jwvk4ue8e8u.fsf-monnier+emacs@gnu.org>
2010-02-15 21:56                 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100215155054.GC2289@headley \
    --to=stepnem@gmail.com \
    --cc=barry_fishman@acm.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.