all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Open^H^H^H^HVisiting code & unit test files
@ 2010-08-06  7:48 Gary
  2010-08-09  8:46 ` Glauber Alex Dias Prado
  0 siblings, 1 reply; 2+ messages in thread
From: Gary @ 2010-08-06  7:48 UTC (permalink / raw)
  To: help-gnu-emacs

Is there any way to do the following without using some huge package
like cedet or something?

I have a project directory structure like this

myproject
 |
 |- Src
 |   |- Foo.php
 |   .
 |   ... more source files
 |
 |- Test
 |   |- Foo-Test.php
 |   .
 |   ... more unit test files
 etc.

In order for the unit test files (e.g. Foo-Test.php) to know what it
should test it includes some text like "require_once 'Foo.php';". The
include path is set when I actually run the unit test via the
Makefile. What I would like to happen is that when I put my cursor on
the "'Foo.php'" text, I can run find-file-at-point or something similar,
and have emacs visit myproject/Src/Foo.php without any further user
intervention. Currently I have to adapt the path manually.

If it helps, all unit test files are in the Test directory (or
subdirectories thereof) follow the naming convention x-Test.php, and
they correspond to the source file a matching named directory under Src
called x (where x is some descriptive name).

-- 
Gary
GNU Emacs 23.2.1
emacsclient 23.2
1.7.4(0.225/5/3) 2010-04-07 11:02 Cygwin




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Open^H^H^H^HVisiting code & unit test files
  2010-08-06  7:48 Open^H^H^H^HVisiting code & unit test files Gary
@ 2010-08-09  8:46 ` Glauber Alex Dias Prado
  0 siblings, 0 replies; 2+ messages in thread
From: Glauber Alex Dias Prado @ 2010-08-09  8:46 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> Is there any way to do the following without using some huge package
> like cedet or something?
>
> I have a project directory structure like this
>
> myproject
>  |
>  |- Src
>  |   |- Foo.php
>  |   .
>  |   ... more source files
>  |
>  |- Test
>  |   |- Foo-Test.php
>  |   .
>  |   ... more unit test files
>  etc.
>
> In order for the unit test files (e.g. Foo-Test.php) to know what it
> should test it includes some text like "require_once 'Foo.php';". The
> include path is set when I actually run the unit test via the
> Makefile. What I would like to happen is that when I put my cursor on
> the "'Foo.php'" text, I can run find-file-at-point or something similar,
> and have emacs visit myproject/Src/Foo.php without any further user
> intervention. Currently I have to adapt the path manually.
>
> If it helps, all unit test files are in the Test directory (or
> subdirectories thereof) follow the naming convention x-Test.php, and
> they correspond to the source file a matching named directory under Src
> called x (where x is some descriptive name).

Check out rinari it have a feature that makes this kind of association.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-09  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06  7:48 Open^H^H^H^HVisiting code & unit test files Gary
2010-08-09  8:46 ` Glauber Alex Dias Prado

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.