[Top][All Lists]

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

Re: yanking in outline mode without expanding?

From: Peter Seibel
Subject: Re: yanking in outline mode without expanding?
Date: Mon, 22 Dec 2003 19:58:00 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

address@hidden (Thomas F. Burdick) writes:

> Peter Seibel <address@hidden> writes:
> > I've been using outline mode in:
> > 
> >   GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 
> > 2003-07-17 on xeon
> > 
> > When I have my outline collapsed and kill a section and then yank it
> > back, it always insterts the text fully expanded. Is there some simple
> > way to change this behavior--I'd like it to stay collapsed just the
> > way it was when I killed it.
> It looks like outline mode uses overlays, which aren't a part of the
> text itself, so aren't copied when you kill it.  You could advise the
> kill/yank functions so that in outline mode they stuff the appropriate
> overlay information into text properties on kill, and the reverse on
> yank.

Yup. I looked into the code a bit after I asked this--to do it right
you'd have to find the overlays in the region being cut, split them if
they are completely contained in the region, and then do as you
suggest. Maybe someday I'll get annoyed enough to do that. For now
I'll probably just keep recollapsing things "by hand". Thanks though.


Peter Seibel                                      address@hidden

         Lisp is the red pill. -- John Fraser, comp.lang.lisp

reply via email to

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