unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: kgold@watson.ibm.com (kgold)
Subject: Re: hooking jode to emacs
Date: 22 Dec 2003 14:47:32 GMT	[thread overview]
Message-ID: <bs7064$f74$1@news.btv.ibm.com> (raw)
In-Reply-To: 3FE38BFB.40307@yahoo.com

Kevin Rodgers <ihs_4664@yahoo.com> 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))))))

-- 

  reply	other threads:[~2003-12-22 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-19 21:49 hooking jode to emacs kgold
2003-12-19 23:38 ` Kevin Rodgers
2003-12-22 14:47   ` kgold [this message]
2003-12-22 16:13     ` Kai Grossjohann
2003-12-22 19:40       ` kgold
2003-12-22 21:16         ` Kai Grossjohann
2003-12-23 17:59           ` Kevin Rodgers
2003-12-23 20:22             ` Kevin Rodgers
2003-12-25 16:28             ` Kai Grossjohann
2003-12-29 21:38               ` Kevin Rodgers

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='bs7064$f74$1@news.btv.ibm.com' \
    --to=kgold@watson.ibm.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).