emacsclient commandline
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
emacsclient commandline         


Author: Rustom Mody
Date: Aug 20, 2008 07:49

I am trying to construct a command line such that:

if emacs is running the client asks the server to raise-frame else it
calls runemacs.

The command line Ive given is:
$ emacsclient -a runemacs -e "(raise-frame)"

But this opens a file (or buffer) called '(raise-frame)' !!

Of course just
$ emacsclient -e "(raise-frame)"

raises the emacs frame alright but fails for the case of no server.

Another minor point:
When emacsclient is used with the -a option and there is no server
running it pops up a window saying ERROR No error !!
I guess this is an error (in emacsclient) :-)

Starting from the vbs file on the emacswiki Ive constructed my own
launch-emacs as below but I dont like the loop and the sql and all the
heavy stuff, hence this attempt.
Show full article (1.72Kb)
3 Comments
Re: emacsclient commandline         


Author: Oleksandr Gavenko
Date: Sep 11, 2008 10:45

Rustom Mody wrote:
> I am trying to construct a command line such that:
>
> if emacs is running the client asks the server to raise-frame else it
> calls runemacs.
>
> The command line Ive given is:
> $ emacsclient -a runemacs -e "(raise-frame)"
>
> But this opens a file (or buffer) called '(raise-frame)' !!
>
> Of course just
> $ emacsclient -e "(raise-frame)"
>
> raises the emacs frame alright but fails for the case of no server.
>
> Another minor point:
> When emacsclient is used with the -a option and there is no server
> running it pops up a window saying ERROR No error !!
> I guess this is an error (in emacsclient) :-) ...
Show full article (2.70Kb)
no comments
Re: emacsclient commandline         


Author: rustom
Date: Sep 12, 2008 06:18

On Sep 11, 10:45 pm, Oleksandr Gavenko gmail.com> wrote:
> Rustom Mody wrote:
>> I am trying to construct a command line such that:
>
>> if emacs is running the client asks the server to raise-frame else it
>> calls runemacs.
>
>> The command line Ive given is:
>> $ emacsclient -a runemacs -e "(raise-frame)"
>
>> But this opens a file (or buffer) called '(raise-frame)'  !!
>
>> Of course just
>> $ emacsclient -e "(raise-frame)"
>
>> raises the emacs frame alright but fails for the case of no server.
>
>> Another minor point:
>> When emacsclient is used with the -a option and there is no server
>> running it pops up a window saying ERROR No error !! ...
Show full article (3.21Kb)
no comments
Re: emacsclient commandline         


Author: Oleksandr Gavenko
Date: Sep 12, 2008 10:37

rustom wrote:
> The emacs-wiki code is better because it does not 'error'
> And my code is better because it does something useful in all 4 cases:
> (with and without file argument; with and without emacs server
> running)
>
> My question was basically about some way of making the VBS code more
> efficient and shorter.

Yea, I forget what you wont. Understanding emacsclient I start from
emacs-wiki, but I newbie in VB and do not wont learn complex technology,
so stay at bat file.

VB scripting supporting in all Windows OSes?
no comments