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

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

Re: Expanding Include Files


From: Kai Großjohann
Subject: Re: Expanding Include Files
Date: Fri, 14 Feb 2003 10:00:35 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50

"CarlC" <carlc@snowbd.com> writes:

> "Kai Großjohann" <kai.grossjohann@uni-duisburg.de> wrote in message
> 841y2c4j4v.fsf@lucy.is.informatik.uni-duisburg.de">news:841y2c4j4v.fsf@lucy.is.informatik.uni-duisburg.de...
>> Hm.  I think you could use overlays to display the source code, but I
>> don't know whether C-s searches in overlays or in the buffer text.
>
> Thanks, Kai. It is a start, but as you suggested, C-s searches aren't
> including overlay text. I will look further to see what capabilities I have
> with overlays and searching. My main purpose for this routine is to search
> for variables throughout the entire source of the program. I could create a
> temporary view buffer, but it just wouldn't be quite as sexy.

Yeah, temp buffers wouldn't be as nice.  Hm.

One possibility is to try to abstract from buffers.  M-x tags-search
RET can search across buffers, for example.  Maybe ECB also helps to
get a better overview of your source code.

Otherwise, I guess you'll just have to frob the buffer text itself.
Hm.  Hmmm...  How about this idea: you implement a generic facility
for viewing several files in one buffer.  You could use text
properties or markers to specify which part of the buffer comes from
which file, and then you'd have to intercept the saving routine to
save each part to its file.  Then you implement something which looks
for #include directives and then uses the generic facility.

And then you post it to gnu.emacs.sources so others can use it, too :-)

Maybe you can use format-alist to frob the buffer text on saving, or
you add stuff to write-file-hooks.  I'm not sure what's the right
way, here.  Maybe others have a suggestion for this.
-- 
A turnip curses Elvis


reply via email to

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