From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kgold@watson.ibm.com (kgold) Newsgroups: gmane.emacs.help Subject: Re: hooking jode to emacs Date: 22 Dec 2003 14:47:32 GMT Organization: IBM T.J. Watson Research Center Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3FE38BFB.40307@yahoo.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1072106145 3769 80.91.224.253 (22 Dec 2003 15:15:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2003 15:15:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 22 16:15:42 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AYRmW-0008St-00 for ; Mon, 22 Dec 2003 16:15:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AYSiY-00076e-Ow for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Dec 2003 11:15:38 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cs.utexas.edu!geraldo.cc.utexas.edu!an02.austin.ibm.com!ausnews.austin.ibm.com!newsfeed.btv.ibm.com!news.btv.ibm.com!alpha.watson.ibm.com!kgold Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: alpha.watson.ibm.com Original-X-Trace: news.btv.ibm.com 1072104452 15588 9.2.16.245 (22 Dec 2003 14:47:32 GMT) Original-X-Complaints-To: news@btv.ibm.com Original-NNTP-Posting-Date: 22 Dec 2003 14:47:32 GMT X-Newsreader: xrn 9.02 Original-Xref: shelby.stanford.edu gnu.emacs.help:119564 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15504 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15504 Kevin Rodgers writes: > > It works the same way as file-name-extension, which you use. What happens if > you just replace the reference to file in (shell-command ...) with > (file-name-sans-extension file)? Thanks. The below worked. It turns out that jode also wants the file name without the directory path. Two more (since emacs can do anything) - How can I automatically set the resulting *Shell Command Output* buffer to java-mode. M-x java-mode works interactively. My attempts at variations of this didn't work. (execute-extended-command 'java-mode) - The author of jode sends two lines (his name and email address, and the name of the class file) to stdout. How can I trim these two lines out of the buffer? ~~~~~~~~~~~~~~~~~~ (defun decompile-class-file (&optional file) "Run `class-file-decompile-command' on FILE, but only if it's a .class file. If FILE is nil, run it on `buffer-file-name'." (interactive "fFile: ") (or file (setq file buffer-file-name)) (and (equal (file-name-extension file) "class") (shell-command (concat class-file-decompile-command " " (file-name-nondirectory (file-name-sans-extension file)))))) --