From: Martin Slouf <mar@centrum.cz>
Subject: Re: Need help writing file-visiting macro
Date: Mon, 25 Jul 2005 23:38:35 +0200 [thread overview]
Message-ID: <20050725212531.GC9300@barbucha.martin.net> (raw)
In-Reply-To: <dc2r60$o6n$1@panix2.panix.com>
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 -----
next prev parent reply other threads:[~2005-07-25 21:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-25 13:58 Need help writing file-visiting macro Roy Smith
2005-07-25 15:33 ` Thien-Thi Nguyen
2005-07-25 16:45 ` Roy Smith
2005-07-25 17:44 ` drkm
2005-07-25 16:50 ` Sergei Organov
2005-07-25 17:52 ` rgb
2005-07-25 21:02 ` drkm
2005-07-26 22:49 ` rgb
2005-07-25 18:05 ` Kevin Rodgers
2005-07-25 21:38 ` Martin Slouf [this message]
2005-07-26 15:52 ` Kevin Rodgers
2005-07-26 18:24 ` Martin Slouf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050725212531.GC9300@barbucha.martin.net \
--to=mar@centrum.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.