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: Uday Reddy
Subject: Re: `save-excursion' defeated by `set-buffer'
Date: Sun, 13 Mar 2011 03:00:44 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 3/12/2011 7:56 PM, Drew Adams wrote:

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

I believe I was the one that last raised it in emacs-devel and, after the explanations from Stefan Monnier and Stephen Turnbull, I was satisfied. I told you quite explicitly that I was satisfied.

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

Yes, I agree that this saga will continue for quite some time. But I wouldn't say that the warning has produced all this confusion. The confusion about how to use save-excursion correctly has existed for a long time and continues to exist. The warning is the messenger, not the cause of the confusion.

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!").

This particular warning is in the 'suspicious category. It signals that the code is suspicious. I for one would be very wary of using anybody's code that generates such warnings. The warnings would signal to me that the developers have not taken care to use the programming language correctly. They have produced code that happens to work but could break easily when pulled and stretched.

Cheers,
Uday


reply via email to

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