* Using ffap to open paths relative to a different directory
@ 2013-12-06 20:53 Evan Driscoll
2013-12-07 14:55 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Evan Driscoll @ 2013-12-06 20:53 UTC (permalink / raw
To: help-gnu-emacs
At my place of work, for our C/C++ projects we have a directory
structure such as:
src
+--- dir1
| +---- subdir1
| +---- library.h
+--- dir2
+---- prog.c
where source and headers are in the same directory (though that
doesn't really matter for this question).
We "always" provide full include paths relative to src/, so for
example if src/dir2/prog.c needs to include library.h, it will say
#include "dir1/subdir1/library.h"
and then the files will be compiled with src/ in the include paths.
The problem is that ffap doesn't work on these paths, presumably
because it looks for dir1/subdir1/library.h relative to src/dir2 (the
location of the file that contains that line). Is there a way I can
configure it with a set of directories (really even a single directory
would be sufficient) to get it to work nicely in our environment? Or
an alternative to ffap that will do so?
Thanks,
Evan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using ffap to open paths relative to a different directory
2013-12-06 20:53 Using ffap to open paths relative to a different directory Evan Driscoll
@ 2013-12-07 14:55 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2013-12-07 14:55 UTC (permalink / raw
To: help-gnu-emacs
On 12/6/13 1:53 PM, Evan Driscoll wrote:
> At my place of work, for our C/C++ projects we have a directory
> structure such as:
>
> src
> +--- dir1
> | +---- subdir1
> | +---- library.h
> +--- dir2
> +---- prog.c
>
> where source and headers are in the same directory (though that
> doesn't really matter for this question).
>
>
> We "always" provide full include paths relative to src/, so for
> example if src/dir2/prog.c needs to include library.h, it will say
>
> #include "dir1/subdir1/library.h"
>
> and then the files will be compiled with src/ in the include paths.
>
>
> The problem is that ffap doesn't work on these paths, presumably
> because it looks for dir1/subdir1/library.h relative to src/dir2 (the
> location of the file that contains that line). Is there a way I can
> configure it with a set of directories (really even a single directory
> would be sufficient) to get it to work nicely in our environment? Or
> an alternative to ffap that will do so?
Try adding the absolute path to src, to ffap-c-path.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-07 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06 20:53 Using ffap to open paths relative to a different directory Evan Driscoll
2013-12-07 14:55 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.