* save-excursion defeated by set-buffer
@ 2009-11-29 10:37 Thierry Volpiatto
2009-11-29 15:31 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Volpiatto @ 2009-11-29 10:37 UTC (permalink / raw)
To: emacs-devel
Hi,
in last CVS version, when i start emacs, i have a compile log writing
"save-excursion defeated by set-buffer".
The reason is that many package use:
,----
| (save-excursion
| (set-buffer foo)
| do something)
`----
instead of using with-current-buffer.
But why the compile buffer show up on start of emacs instead of only
showing the warning when compiling?
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: save-excursion defeated by set-buffer
2009-11-29 10:37 save-excursion defeated by set-buffer Thierry Volpiatto
@ 2009-11-29 15:31 ` Stefan Monnier
2009-11-29 17:29 ` Thierry Volpiatto
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2009-11-29 15:31 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: emacs-devel
> But why the compile buffer show up on start of emacs instead of only
> showing the warning when compiling?
I do not know. Try to
(require 'bytecomp)
(debug-on-entry 'byte-compile-form)
early in your .emacs and hope that it catches the cuprit?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: save-excursion defeated by set-buffer
2009-11-29 15:31 ` Stefan Monnier
@ 2009-11-29 17:29 ` Thierry Volpiatto
2009-11-29 18:24 ` Thierry Volpiatto
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Volpiatto @ 2009-11-29 17:29 UTC (permalink / raw)
To: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> But why the compile buffer show up on start of emacs instead of only
>> showing the warning when compiling?
>
> I do not know. Try to
>
> (require 'bytecomp)
> (debug-on-entry 'byte-compile-form)
>
> early in your .emacs and hope that it catches the cuprit?
Thanks Stefan.
After loading .emacs step by step, i found the problem:
It comes from bbdb.
I have a compile log buffer with:
Warning: `save-excursion' defeated by `set-buffer'.
On startup.
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: save-excursion defeated by set-buffer
2009-11-29 17:29 ` Thierry Volpiatto
@ 2009-11-29 18:24 ` Thierry Volpiatto
0 siblings, 0 replies; 4+ messages in thread
From: Thierry Volpiatto @ 2009-11-29 18:24 UTC (permalink / raw)
To: emacs-devel
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> But why the compile buffer show up on start of emacs instead of only
>>> showing the warning when compiling?
>>
>> I do not know. Try to
>>
>> (require 'bytecomp)
>> (debug-on-entry 'byte-compile-form)
>>
>> early in your .emacs and hope that it catches the cuprit?
> Thanks Stefan.
>
> After loading .emacs step by step, i found the problem:
> It comes from bbdb.
More exactly from files bbdb-gui.el, bbdb-com.el.
After replacing all occurence of "(save-excursion (set-buffer foo) ...)"
by "(with-current-buffer foo", all work fine again.
An exception that is a little different: (in bbdb-finger)
,----[ Replace ]
| (save-excursion
| (with-output-to-temp-buffer bbdb-finger-buffer-name
| (set-buffer bbdb-finger-buffer-name)
`----
,----[ By ]
| (with-current-buffer (get-buffer-create bbdb-finger-buffer-name)
| (with-output-to-temp-buffer bbdb-finger-buffer-name
`----
> I have a compile log buffer with:
>
> Warning: `save-excursion' defeated by `set-buffer'.
>
> On startup.
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-29 18:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-29 10:37 save-excursion defeated by set-buffer Thierry Volpiatto
2009-11-29 15:31 ` Stefan Monnier
2009-11-29 17:29 ` Thierry Volpiatto
2009-11-29 18:24 ` Thierry Volpiatto
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).