4

How do I make it so that gnome-do launches "emacsclient -n -g" instead of emacs?

I've got an init script setup to launch emacs daemon, and I can run emacsclient from the terminal. However, I'd like to be able to launch an emacs GUI that connects to the daemon from gnome-do.

Any ideas?

3 Answers 3

3

Create a custom Applications menu item. Use something like "GNU Emacs 23 (Client)" in the name field and emacsclient -c for the command. Gnome Do should automatically pick up on this and allow you to launch an emacsclient from Do.

(If you're typing something like "emacs" in Do to launch Emacs, you might need to use the down arrow a few times to select the new client item until Do gets the hint)

1
  • Er, I said -c, but you should be able to use whatever flags you want. -n doesn't seem to be necessary, though.
    – nocash
    May 10, 2010 at 16:04
1

For the most part Do uses what xdg to find out what to do with files, so if you use a desktop environment (e.g. Gnome or KDE) you can set the preferred application to emacsclient -n -g for the typical filetypes in there and Do should pick it up.

0

Could you wrap the emacsclient invocation in a shell script and make sure it's in your $PATH? That way, when you run Gnome-Do, you could just type in your shell script and it should execute.

I did this with a customized launcher for Flex Builder. I wrote a shell-script which invoked the command-line; added it to my ~/bin directory (which is in my $PATH); and it runs via Gnome-Do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .