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

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

Re: emacs 24 problem: `revert` command forgets bindings from `occur` buf


From: Paul K
Subject: Re: emacs 24 problem: `revert` command forgets bindings from `occur` buffer for compressed files.
Date: Tue, 24 Jul 2012 10:30:28 +0200

but it also forgets the (point), thus it looks like at least overlook
if not a bug.

best regards,
Paul

On Fri, Jul 20, 2012 at 11:49 PM, Tassilo Horn <tassilo@member.fsf.org> wrote:
> Paul K <mafeuser@gmail.com> writes:
>
>>> However, if you revert the buffer so that the file is found again,
>>> there are no markers anymore.
>>
>> not true
>>
>>> When you click a link in the old *occur* buffer, Emacs will try to
>>> find the given marker but fail, and thus point ends up at the end of
>>> the buffer.
>>
>> for not compressed files, revert keeps markers in buffer, so that You
>> can use "old" *Occur* buffer.
>
> Yes, `insert-file-contents' (which is the primitive used by
> `revert-buffer') does indeed some clever things to ensure that only the
> parts of the buffer that are different from the corresponding file are
> replaced.  That keeps markers in the unchanged parts intact.
>
> However, with compressed files the file contents and the buffer contents
> are completely different, thus everything's replaced.
>
> Bye,
> Tassilo



reply via email to

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