emacs-devel
[Top][All Lists]
Advanced

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

Re: vc.el: asynchronous annotations


From: David Kastrup
Subject: Re: vc.el: asynchronous annotations
Date: Mon, 16 Jul 2007 22:57:33 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> OTOH it reminds me of a proposed feature: make it possible to exchange the
>>> text (plus related data like text-properties, markers, overlays) of
>>> two buffers.
>
>> That would not require much Lisp, I guess.
>
> No, that would be implemented at the C level.
>
>> It would probably be easiest to just append the new stuff at the end of
>> the current buffer in an invisible overlay, then move the point, delete
>> the old material and make the new stuff visible.
>
> Sounds like a good way to get into trouble: invisible text is still visible
> to most Lisp code (e.g. save etc...).
>
>>> With such a feature, we could indeed run the async process in
>>> another buffer and then bring the result into the old buffer.  The
>>> original motivation for such a feature was tar-mode where we'd like
>>> to move the tarball bytes into an auxiliary buffer (kept in unibyte
>>> mode) and have the "main" buffer only contain the tar listing (in
>>> multibyte mode).  This would save us from constantly switching
>>> between multibyte and unibyte modes and would clean up the code.
>
>> Shadow-buffers don't help in this case?
>
> What are shadow buffers?

Ok, wrong term.

(info "(elisp) Indirect Buffers")

But they are rather for the same content under different
circumstances.  I doubt that one could give them different
multibyteness.

Anyway, I don't see the big problem with supplanting buffers (probably
because I am stupid).  set-window-buffer should make it reasonably
easy to swap out buffers on the screen.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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