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

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

Re: buffer for unopened file?


From: David L
Subject: Re: buffer for unopened file?
Date: Sun, 21 Oct 2007 13:56:46 -0700



There are libraries that let you define a named set of files or buffers that
you frequently want to visit, search, etc.  Icicles, filename-cache, and
bs.el come to mind, but there are others.

 
I played with filename-cache a bit.  It is an ok solution for
what I'm trying to do, but IMHO, it would be much better
if something like that could be integrated better so that
buffer lists could list a combination of real buffers or
pseudo-buffers (buffer names that would exist if all
files in the filecache were opened).  This would integrate
better with ECB, etc.  I also wouldn't have to have any
if else logic in my brain when changing to a new file
(ie, if a file is already opened, change to its buffer
else open a file-cached file).

If I weren't lisp-challenged, I'd try to implement what
I'm suggesting, but for now I'll just complain. ;)

In any case, I added a makefile target "filecache" that
creates a file of the format that is read using the
file-cache-read-cache-from-file function:

$(EXECDIR)$(EXECROOT).filecache: $(EXECDIR)$(EXECROOT).files
    @echo "(" > $@;\
    for i in `cat $(EXECDIR)$(EXECROOT).files`; \
    do echo `basename $$i` $(CVSROOTLEVEL) `dirname $$i` \
    | awk '{printf("(\"%s\" \"%s/%s/\")\n", $$1,$$2,$$3)}' >> $@;\
    done; \
    echo ")" >> $@;

A little bit of background to explain this code... I run make from
a directory that is the root of my CVS working copy, so all of the
file names in my list are relative to that directory (not absolute).
$(EXECDIR) is the directory name relative to the CVS root level
that I put my binary in.  $(EXECROOT) is the root name of the
application that I'm building.  In a separate target, I have
commands that create a file that lists all of the .c, .cpp, .h, etc
files that are dependencies of my binary.  This target takes that
list of files and creates another list of absolute filenames that can
be digested by file-cache-read-cache-from-file function.  I also
have an etags target:

$(EXECDIR)$(EXECROOT).etags: $(EXECDIR)$(EXECROOT).files
    etags --members -C `cat $(EXECDIR)$(EXECROOT).files` -o $@



reply via email to

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