From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Newsgroups: gmane.emacs.devel Subject: Re: "Warning: `save-excursion' defeated by `set-buffer'" madness Date: Mon, 15 Feb 2010 16:50:54 +0100 Message-ID: <20100215155054.GC2289@headley> References: <20100212204057.GG27521@headley> <20100214001755.GA2289@headley> <20100215111948.GB2289@headley> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="envbJBWh7q8WU6mo" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1266248830 5962 80.91.229.12 (15 Feb 2010 15:47:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Feb 2010 15:47:10 +0000 (UTC) Cc: emacs-devel@gnu.org, Drew Adams , Barry Fishman To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 15 16:47:07 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nh3A8-0003Gq-D6 for ged-emacs-devel@m.gmane.org; Mon, 15 Feb 2010 16:47:05 +0100 Original-Received: from localhost ([127.0.0.1]:56732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh3A7-0005WA-QF for ged-emacs-devel@m.gmane.org; Mon, 15 Feb 2010 10:47:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nh3A2-0005VQ-4j for emacs-devel@gnu.org; Mon, 15 Feb 2010 10:46:58 -0500 Original-Received: from [140.186.70.92] (port=34866 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nh3A1-0005V0-0w for emacs-devel@gnu.org; Mon, 15 Feb 2010 10:46:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nh39z-0004o8-FQ for emacs-devel@gnu.org; Mon, 15 Feb 2010 10:46:56 -0500 Original-Received: from mail-bw0-f209.google.com ([209.85.218.209]:49575) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nh39z-0004nu-6k for emacs-devel@gnu.org; Mon, 15 Feb 2010 10:46:55 -0500 Original-Received: by bwz1 with SMTP id 1so3926830bwz.32 for ; Mon, 15 Feb 2010 07:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=s8ZuUMg+8z1rw2AXN0/8+/xdvEMgu0zPpQBSo6w8HIU=; b=JnbIWf2jgwrofesRY7H7UwDvz4gAzMh2xhLTF/0IjzaCCZ4SVS9dKYbN8mtzz217Pk RNNsjmM9extqwJqn0v/l4CMdioWRobz4gZVHoFlR+Y9s0QvihDNFxYNnnTMDJfUz35Qy EA64vMg7JtGtXWaQEAFPEy8gCQ4Ibkdj+0sfc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=ghzpDFAl2U8pRIFWoXNGy1D/KlvlOHnMI0t+M6jMaajs32Xx8TgYEM7WKddRvAcfea cHHakgWisQw1SoubwFzCWUMirX8kB6QrlakdDy0rb3K3vPOyiyzprJoQC3oeH6d1BBhw +Xx3uwIyctDVAzaTzSuFQWwwrkndckkOUllz4= Original-Received: by 10.102.235.36 with SMTP id i36mr3982385muh.56.1266248813660; Mon, 15 Feb 2010 07:46:53 -0800 (PST) Original-Received: from localhost ([88.103.132.186]) by mx.google.com with ESMTPS id e9sm34137263muf.43.2010.02.15.07.46.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Feb 2010 07:46:52 -0800 (PST) Mail-Followup-To: Stefan Monnier , Barry Fishman , emacs-devel@gnu.org, Drew Adams Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-27) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121131 Archived-At: --envbJBWh7q8WU6mo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=ibufferbacktrace Content-Transfer-Encoding: quoted-printable Debugger entered--entering a function: * byte-compile-warn("`save-excursion' defeated by `set-buffer'") byte-compile-save-excursion((save-excursion (set-buffer (car bbdb-complet= e-name-callback-data)) (apply (quote delete-region) (cdr bbdb-complete-name= -callback-data)))) byte-compile-form((save-excursion (set-buffer (car bbdb-complete-name-cal= lback-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 (s= et-buffer ...) (apply ... ...))) t) byte-compile-body(((if bbdb-complete-name-callback-data (save-excursion .= =2E. ...)) (setq ad-return-value (ad-Orig-choose-completion-string choice b= uffer base-size)) ad-return-value) nil) byte-compile-let((let (ad-return-value) (if bbdb-complete-name-callback-d= ata (save-excursion ... ...)) (setq ad-return-value (ad-Orig-choose-complet= ion-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-comple= tion-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 la= mbda) byte-compile-lambda((lambda (choice &optional buffer base-size) #("Advice= doc string" 0 17 (ad-advice-info choose-completion-string)) (let (ad-retur= n-value) (when bbdb-complete-name-callback-data ...) (setq ad-return-value = =2E..) ad-return-value))) #[nil "\306=08!\307\211\211\211\211 \n=0B\f=0D=1D=1C=1B=1A=19=1E=0D=1E=0E= =1E=0F=1E=10=1E=11=1E=12=0E=139\2031=00\310=0E=13!\2053=00=0E=13K\2023=00= =0E=13\211=1E=14\242\311=3D\211=1E \203D=00=0E=14A=16=14=0E=14\242\312=3D\2= 05q=00=0E \203Z=00\311\313=0E=14!B\202^=00\313=0E=14!=16=14=0E=139\203o=00\= 314=0E=13=0E=14\"\202q=00=0E=14.=0D\207" [byte-compile-initial-macro-enviro= nment byte-compile-verbose byte-optimize byte-compile-dynamic byte-compile-= dynamic-docstrings byte-compile-warnings copy-alist nil fboundp macro lambd= a byte-compile-lambda defalias byte-compile-free-assignments byte-compile-f= ree-references byte-compile-const-variables byte-compile-bound-variables by= te-compile-function-environment byte-compile-macro-environment form fun] 12= ]() funcall(#[nil "\306=08!\307\211\211\211\211 \n=0B\f=0D=1D=1C=1B=1A=19=1E= =0D=1E=0E=1E=0F=1E=10=1E=11=1E=12=0E=139\2031=00\310=0E=13!\2053=00=0E=13K\= 2023=00=0E=13\211=1E=14\242\311=3D\211=1E \203D=00=0E=14A=16=14=0E=14\242\3= 12=3D\205q=00=0E \203Z=00\311\313=0E=14!B\202^=00\313=0E=14!=16=14=0E=139\2= 03o=00\314=0E=13=0E=14\"\202q=00=0E=14.=0D\207" [byte-compile-initial-macro= -environment byte-compile-verbose byte-optimize byte-compile-dynamic byte-c= ompile-dynamic-docstrings byte-compile-warnings copy-alist nil fboundp macr= o lambda byte-compile-lambda defalias byte-compile-free-assignments byte-co= mpile-free-references byte-compile-const-variables byte-compile-bound-varia= bles 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 ..= =2E ...) (add-hook ... ... ...) (add-hook ... ... ...) (when icicle-customi= ze-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-standa= rd-options) (when ... ...) (when ... ...) (if icicle-menu-items-to-history-= flag ... ...) (when ... ... ...)) (t (makunbound ...) (icicle-restore-other= -keymap-keys) (remove-hook ... ...) (remove-hook ... ...) (remove-hook ... = =2E..) (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-h= ook ... ...) (when ... ... ...))) (let ((last-message ...)) (setq icicle-mode (cond ... ... ...)) (cond (ic= icle-mode ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... .= =2E. ... ... ... ...) (t ... ... ... ... ... ... ... ... ... ... ... ... ..= =2E ... ... ... ... ... ... ... ... ...)) (unless (eq icicle-guess-commands= -in-path ...) (setq icicle-shell-command-candidates-cache nil)) (message "T= urning %s Icicle mode..." (if icicle-mode "ON" "OFF")) (icicle-define-minib= uffer-maps icicle-mode) (run-hooks (quote icicle-mode-hook)) (message "Turn= ing %s Icicle mode...done" (if icicle-mode "ON" "OFF")) (run-hooks (quote i= cicle-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) "=08@;\205=1D=00=08@ \306=1A=1B=1C\307=1D\310\f=0B\n#,\20= 5=1D=00\311\312=08A\"\207" [a-l-element abs-file start string regexp inhibi= t-changing-match-data nil t string-match mapc eval] 4](("\\(\\`\\|/\\)ibuff= er\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (icicle-toggle-icicle-mode-twice))) mapc(#[(a-l-element) "=08@;\205=1D=00=08@ \306=1A=1B=1C\307=1D\310\f=0B\n= #,\205=1D=00\311\312=08A\"\207" [a-l-element abs-file start string regexp i= nhibit-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 ... ... ... ... ... ...)) ("\\(\\`\\|/\\)sess= ion\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (add-to-list ... ...)) ("\\(\\`\\|= /\\)ecb\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice ecb-method-clicked = =2E.. "Make hierarchy visible when jumping into location from ECB tree buff= er." ...)) ("\\(\\`\\|/\\)saveplace\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (d= efadvice save-place-find-file-hook ... "Make the position visible." ...)) (= "\\(\\`\\|/\\)bookmark\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (if ... ... ...= )) ("\\(\\`\\|/\\)speedbar\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... = =2E.. ... ... ... ...)) ("\\(\\`\\|/\\)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\\)?\\'" (ic= icle-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)) ("\\(\\`\\|/\\)rece= ntf\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...)) ("\\(\\`\\|= /\\)dired-aux\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...)) (= "\\(\\`\\|/\\)dired-x\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ...= ... ...)) ("\\(\\`\\|/\\)bbdb-com\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (le= t ... ... ... ...)) ("\\(\\`\\|/\\)gud\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'"= (let ... ... ... ...) (icicle-toggle-icicle-mode-twice)) ("\\(\\`\\|/\\)es= s-site\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (let ... ... ... ...) (icicle-t= oggle-icicle-mode-twice)) ("\\(\\`\\|/\\)comint\\(\\.elc\\|\\.el\\)?\\(\\.g= z\\)?\\'" (let ... ... ... ... ...)) (filesets (defun filesets-get-filelist= ... "Get all files for fileset ENTRY.\nAssume MODE (see `filesets-entry-mo= de'), if provided." ...)) ("\\(\\`\\|/\\)crm\\(\\.elc\\|\\.el\\)?\\(\\.gz\\= )?\\'" (progn ... ... ... ... ... ... ... ... ...)) ("\\(\\`\\|/\\)eev-all\= \(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ...)) (diff-mode (progn ... ...= )) ("\\(\\`\\|/\\)sendmail\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... = =2E..)) ("\\(\\`\\|/\\)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 ... ... ... ..= =2E ... ... ...)) (dired (when vimpulse-want-vi-keys-in-dired ... ... ...))= ("\\(\\`\\|/\\)buff-menu\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (when vimpul= se-want-vi-keys-in-buffmenu ... ... ...)) ("\\(\\`\\|/\\)mule-cmds\\(\\.elc= \\|\\.el\\)?\\(\\.gz\\)?\\'" (progn ... ...) (defadvice toggle-input-method= ... "Adjust input-method toggling in vi-state." ...)) ("\\(\\`\\|/\\)iso-a= cc\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice iso-accents-mode ... "Se= t viper-automatic-iso-accents to iso-accents-mode." ...)) ("\\(\\`\\|/\\)rm= ailedit\\(\\.elc\\|\\.el\\)?\\(\\.gz\\)?\\'" (defadvice rmail-cease-edit ..= =2E "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-normali= ze-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= ") --envbJBWh7q8WU6mo--