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

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

Re: yanking in outline mode without expanding?


From: Thomas F. Burdick
Subject: Re: yanking in outline mode without expanding?
Date: 22 Dec 2003 22:54:23 -0800

Peter Seibel <address@hidden> writes:

> 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.

Yeah, that's why I posted a suggestion, instead of code :-)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               


reply via email to

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