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: Tassilo Horn
Subject: Re: emacs 24 problem: `revert` command forgets bindings from `occur` buffer for compressed files.
Date: Fri, 20 Jul 2012 23:49:32 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

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]