* help with file not found hook
@ 2009-03-20 22:54 pedz
2009-03-21 12:26 ` Nikolaj Schumacher
0 siblings, 1 reply; 2+ messages in thread
From: pedz @ 2009-03-20 22:54 UTC (permalink / raw)
To: help-gnu-emacs
I'm trying to write a hook for the find-file-not-found-functions but I
may be way off course.
This is for OSF DCE which has a tree that is "backed" by a matching
tree (which can also be backed...)
So, if I try to find a file
/a/b/BASE/c/d/e/f.c
that may not exist so the next place to look is
/a/b/BASE/link/c/d/e/f.c
and after that
/a/b/BASE/link/link/c/d/e/f.c
etc.
Questions:
1) After I find the file, I currently set buffer-file-name to the
full path and then call insert-file-contents and return true. Is that
what I should be doing?
2) The problem I have is if I find the same file a second time, I
get a duplicate buffer. I can check to see if such a buffer already
exists but what do I do if it does?
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: help with file not found hook
2009-03-20 22:54 help with file not found hook pedz
@ 2009-03-21 12:26 ` Nikolaj Schumacher
0 siblings, 0 replies; 2+ messages in thread
From: Nikolaj Schumacher @ 2009-03-21 12:26 UTC (permalink / raw)
To: pedz; +Cc: help-gnu-emacs
pedz <pedzsan@gmail.com> wrote:
> Questions:
> 1) After I find the file, I currently set buffer-file-name to the
> full path and then call insert-file-contents and return true. Is that
> what I should be doing?
I think you should call `find-alternate-file' with the new name. That
should take care of everything (including running the hook again).
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-21 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20 22:54 help with file not found hook pedz
2009-03-21 12:26 ` Nikolaj Schumacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).