* emacsclient usage
@ 2007-12-17 18:36 rustom
2007-12-17 15:03 ` Nikos Apostolakis
[not found] ` <mailman.5124.1197923852.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: rustom @ 2007-12-17 18:36 UTC (permalink / raw)
To: help-gnu-emacs
Trying to use emacsclient (though not yet sure its what I need to
use :-) ) came upon the following questions:
1. How do I tell emacsclient that my server is not emacs but emacs-
snapshot-gtk ?
2. How do I tell emacsclient (to tell the server...) not to read a
file but to run a command (say remember)
Note in my attempts so far it barfs at the -e option though the man
page shows it. It accepts and ignores the -a or ALTERNATE_EDITOR
settings
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: emacsclient usage
2007-12-17 18:36 emacsclient usage rustom
@ 2007-12-17 15:03 ` Nikos Apostolakis
[not found] ` <mailman.5124.1197923852.18990.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Nikos Apostolakis @ 2007-12-17 15:03 UTC (permalink / raw)
To: help-gnu-emacs
rustom <rustompmody@gmail.com> writes:
> Trying to use emacsclient (though not yet sure its what I need to
> use :-) ) came upon the following questions:
>
> 1. How do I tell emacsclient that my server is not emacs but emacs-
> snapshot-gtk ?
If you are using Debian then each emacs flavor has its own server.
For emacs-snapshot-gtk is probably emacsclient.emacs-snapshot.
Still on Debian you can make emacs-snapshot and its client the
standard alternative for emacs by using the command
`update-alternatives'.
> 2. How do I tell emacsclient (to tell the server...) not to read a
> file but to run a command (say remember)
>
> Note in my attempts so far it barfs at the -e option though the man
> page shows it. It accepts and ignores the -a or ALTERNATE_EDITOR
> settings
I think that the -e option is relatively recent, it doesn't work
with older emacsclient.
HTH,
Nikos
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.5124.1197923852.18990.help-gnu-emacs@gnu.org>]
* Re: emacsclient usage
[not found] ` <mailman.5124.1197923852.18990.help-gnu-emacs@gnu.org>
@ 2007-12-18 8:07 ` rustom
2007-12-18 9:58 ` Andrea Vettorello
0 siblings, 1 reply; 7+ messages in thread
From: rustom @ 2007-12-18 8:07 UTC (permalink / raw)
To: help-gnu-emacs
On Dec 17, 8:03 pm, Nikos Apostolakis <nikos...@gmail.com> wrote:
> rustom <rustompm...@gmail.com> writes:
> > Trying to use emacsclient (though not yet sure its what I need to
> > use :-) ) came upon the following questions:
>
> > 1. How do I tell emacsclient that my server is not emacs but emacs-
> > snapshot-gtk ?
>
> If you are using Debian then each emacs flavor has its own server.
> For emacs-snapshot-gtk is probably emacsclient.emacs-snapshot.
> Still on Debian you can make emacs-snapshot and its client the
> standard alternative for emacs by using the command
> `update-alternatives'.
>
> > 2. How do I tell emacsclient (to tell the server...) not to read a
> > file but to run a command (say remember)
>
> > Note in my attempts so far it barfs at the -e option though the man
> > page shows it. It accepts and ignores the -a or ALTERNATE_EDITOR
> > settings
>
> I think that the -e option is relatively recent, it doesn't work
> with older emacsclient.
>
> HTH,
> Nikos
Thanks that was quite helpful.
Ive set gconf-editor->apps->metacity->keybinding-commands->command_1
to the foll:
bash -c "wmctrl -a emacs-snapshot-gtk; emacsclient.emacs-snapshot -e
'(remember)'"
The wmctrl is required because the emacsclient on its own does not
activate the emacs window.
And because of that the bash -c is required.
Is there a neater way?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: emacsclient usage
2007-12-18 8:07 ` rustom
@ 2007-12-18 9:58 ` Andrea Vettorello
2007-12-18 19:48 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 7+ messages in thread
From: Andrea Vettorello @ 2007-12-18 9:58 UTC (permalink / raw)
To: help-gnu-emacs
On Dec 18, 2007 9:07 AM, rustom <rustompmody@gmail.com> wrote:
>
> On Dec 17, 8:03 pm, Nikos Apostolakis <nikos...@gmail.com> wrote:
> > rustom <rustompm...@gmail.com> writes:
[...]
>
> Thanks that was quite helpful.
> Ive set gconf-editor->apps->metacity->keybinding-commands->command_1
> to the foll:
>
> bash -c "wmctrl -a emacs-snapshot-gtk; emacsclient.emacs-snapshot -e
> '(remember)'"
>
> The wmctrl is required because the emacsclient on its own does not
> activate the emacs window.
> And because of that the bash -c is required.
> Is there a neater way?
I've mangled emacsclient.c to spawn an Emacs instance if none is found
running, and IIRC changed the Gnome mime type to use emacsclient to
edit text files...
--
Andrea
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: emacsclient usage
2007-12-18 9:58 ` Andrea Vettorello
@ 2007-12-18 19:48 ` Lennart Borgman (gmail)
2007-12-18 22:17 ` Andrea Vettorello
0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-18 19:48 UTC (permalink / raw)
To: Andrea Vettorello; +Cc: help-gnu-emacs
Andrea Vettorello wrote:
> I've mangled emacsclient.c to spawn an Emacs instance if none is found
> running, and IIRC changed the Gnome mime type to use emacsclient to
> edit text files...
The emacsclient that comes with EmacsW32 also starts Emacs if it is not
already started. I have only ran this on MS Windows, but the code should
work on other platforms too. EmacsW32 is here:
http://ourcomments.org/Emacs/EmacsW32.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: emacsclient usage
2007-12-18 19:48 ` Lennart Borgman (gmail)
@ 2007-12-18 22:17 ` Andrea Vettorello
2007-12-18 23:17 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 7+ messages in thread
From: Andrea Vettorello @ 2007-12-18 22:17 UTC (permalink / raw)
To: Emacs List
On Dec 18, 2007 8:48 PM, Lennart Borgman (gmail)
<lennart.borgman@gmail.com> wrote:
> The emacsclient that comes with EmacsW32 also starts Emacs if it is not
> already started. I have only ran this on MS Windows, but the code should
> work on other platforms too. EmacsW32 is here:
>
> http://ourcomments.org/Emacs/EmacsW32.html
>
That patch is huge, mine was a 10 minutes hack with 5 lines of code.
I'll give a better look tomorrow...
--
Andrea
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: emacsclient usage
2007-12-18 22:17 ` Andrea Vettorello
@ 2007-12-18 23:17 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-18 23:17 UTC (permalink / raw)
To: Andrea Vettorello; +Cc: Emacs List
Andrea Vettorello wrote:
> On Dec 18, 2007 8:48 PM, Lennart Borgman (gmail)
> <lennart.borgman@gmail.com> wrote:
>
>> The emacsclient that comes with EmacsW32 also starts Emacs if it is not
>> already started. I have only ran this on MS Windows, but the code should
>> work on other platforms too. EmacsW32 is here:
>>
>> http://ourcomments.org/Emacs/EmacsW32.html
>>
>
> That patch is huge, mine was a 10 minutes hack with 5 lines of code.
> I'll give a better look tomorrow...
You mean the emacsclient.c part? Yes, for the MS Windows part it does
some other things too.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-12-18 23:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 18:36 emacsclient usage rustom
2007-12-17 15:03 ` Nikos Apostolakis
[not found] ` <mailman.5124.1197923852.18990.help-gnu-emacs@gnu.org>
2007-12-18 8:07 ` rustom
2007-12-18 9:58 ` Andrea Vettorello
2007-12-18 19:48 ` Lennart Borgman (gmail)
2007-12-18 22:17 ` Andrea Vettorello
2007-12-18 23:17 ` Lennart Borgman (gmail)
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).