help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: `save-excursion' defeated by `set-buffer'


From: Drew Adams
Subject: RE: `save-excursion' defeated by `set-buffer'
Date: Sat, 12 Mar 2011 11:56:23 -0800

> Seems all what's neccessary to know about save-excursion already is 
> expressed in it's docstring.
> 
> If people don't want the buffer restored alongside with point 
> and mark, they should not use this form.
> 
> As I used it, compiler may assume I wanted that. No reason 
> for a warning if used as provided.
> 
> OTOH we need compiler warnings for serious things.
> 
> So my suggestion is simply to drop that warning.

1+

But this has already been expressed (by several people), and rejected, in
various discussions in emacs-devel@gnu.org.

IMO, this warning has produced _far_ more confusion than it has eliminated.  And
that will no doubt continue to be the case going forward.

The mere fact that Eli Z and David K have very different interpretations of the
potential problem(s) that this warning hopes to avoid should be demonstration
enough that the warning is not helpful.  Emacs development contributors (and
users) do not come much more experienced than Eli and David (modulo RMS).

And no, the message should not simply be improved/clarified.  It should be
eliminated, just as Andreas suggested.

FWIW, I also agree with Andreas that a "warning" is for something serious.  A
warning is not the same thing as in informative message.  A warning _warns_ you
about potential danger/damage.  Alarmism eventually results in the Chicken
Little effect (aka Boy Cries "Wolf!").





reply via email to

[Prev in Thread] Current Thread [Next in Thread]