emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch for fields of `struct buffer'


From: Lennart Borgman
Subject: Re: Patch for fields of `struct buffer'
Date: Mon, 14 Feb 2011 20:34:59 +0100

On Mon, Feb 14, 2011 at 6:47 PM, Stefan Monnier
<address@hidden> wrote:
>>     I also expect some really nasty cases showing up when you try to rewind
>>     a thread's bindings.  E.g. if a let-binding that was originally applied
>>     to a global variable has to be rewound (i.e. re-applied) to a variable
>>     that has become buffer-local in the mean time.
>
>> This issue arises now within the single Emacs thread, and we already
>> handle it.
>
> Not really, because we never rewind, we only unwind.  We do have to
> solve related problems when unwinding, and indeed it is tricky and has
> suffered from very long standing bugs.
>
>> I don't recall just how we do, but we hardly ever get a complaint
>> about it.
>
> Gerd fixed in Emacs-21 a bug that was known for a long time (when you
> sometimes had to do (let (blbla) (save-current-buffer ...)) to make sure
> that the unwinding would take place in the same buffer as when the vars
> were bound).  Since then I've fixed another related bug in some less
> common case, and someone else (can't remember who right now, Lennart
> maybe?) found a third one (between Emacs-22 and 23).
> For this last bug, I tried to do a "thorough code review" to try and
> convince myself that we really did get it right this time, but
> I wouldn't bet my life on it.
>
> AFAIK, none of those 3 bugs were related to new features, so getting
> dynamic let-bindings to work right in the presence of buffer-local
> variables has taken in the order of what ... 20 years?

;-)

Is maybe a reason that those bugs that shows up in complicated
relations are easily missed because you may believe that the bug is
somewhere else - and that is "confirmed" when you fix something else.

A problem is that those bugs tends to be more likely to show up the
more complicated elisp code Emacs have to handle.

I guess this make unit tests very important.



reply via email to

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