From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Martin Slouf Newsgroups: gmane.emacs.help Subject: Re: Need help writing file-visiting macro Date: Mon, 25 Jul 2005 23:38:35 +0200 Message-ID: <20050725212531.GC9300@barbucha.martin.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122329117 27741 80.91.229.2 (25 Jul 2005 22:05:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Jul 2005 22:05:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 26 00:05:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DxB49-0002ES-Hn for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Jul 2005 00:04:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxB6S-0006DE-Tq for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jul 2005 18:07:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DxB2a-000476-LK for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 18:03:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DxB2Z-00045W-Cf for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 18:03:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DxB2Y-0003fj-Cp for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 18:03:14 -0400 Original-Received: from [84.242.95.145] (helo=barbucha.martin.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DxApK-0003lc-M7 for help-gnu-emacs@gnu.org; Mon, 25 Jul 2005 17:49:34 -0400 Original-Received: from martin by barbucha.martin.net with local (Exim 3.36 #1 (Debian)) id 1DxAeh-0002gH-00 for ; Mon, 25 Jul 2005 23:38:35 +0200 Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28187 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28187 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 -----