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

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

Re: Need help writing file-visiting macro


From: Martin Slouf
Subject: Re: Need help writing file-visiting macro
Date: Mon, 25 Jul 2005 23:38:35 +0200
User-agent: Mutt/1.5.9i

Indeed a great thread!

I found inforamtion here very usefull and i am surprised how easy it is.
thanks.

In fact i do a lot of Java editting (jakarta struts) and there is a lot of
files whith deterministic filename (thanks to the naming conventions we use).

The files are unfortunately in different directories.  I know very little of
elisp, though i use Emacs a lot.

Is there an easy modification of this piece of code that can help me to find
files in different directories?  i guess these are the string manipulation
functions.

The situation is like this:

For each business level class (BankAccount.java) (located somewhere under the
'src' directory structure) there are at least two jsp pages:
bank_account_edit_.jsp and bank_account_list_.jsp under the 'web' directory
structure), ie:

top dir
+
|
+-- src (Java source in packages)
|    |
|    +-- somewhere
|            |
|            +-- BankAccount.java
|
+---web (JSP pages using jakarta-struts)
     |
     +-- somewhere
             |
             +-- bank_account_edit_.jsp
             |
             +-- bak_account_list_.jsp


i get those macros (proposed in thi sthread) open the same buffer with modified
name in the same directory.  My questions are like this:

1. what string function can be used to make the string BankAccount to transform
it into bank_account_edit_ and bank_account_list_

2. what functions should be used to open those jsp buffers (java buffer
respectively)?, when each of this file is / can be in different directory?

thanks a lot for an answer.

Nowadays i use file-cache to search for a file.

m.

On Mon, Jul 25, 2005 at 09:58:24AM -0400, Roy Smith wrote:
> I'm working in a software development system which has classes defined
> in foo.mdl files, with the corresponding implementation code in
> foo_Impl.c files I want to write a macro or function which lets you
> flip back and forth between the two.  If I'm looking at a .mdl file, I
> want it to construct the corresponding _Impl.c filename and visit that
> file.  Is that possible?
> 
> I'm using GNU Emacs 21.3.1.
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

----- End forwarded message -----




reply via email to

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