all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: emacs-devel@gnu.org, Mathias Dahl <mathias.dahl@gmail.com>
Subject: Re: How to get "emacsclient --eval x" to DWIM when Emacs is not started
Date: Sun, 30 Mar 2008 18:49:00 -0400	[thread overview]
Message-ID: <jwv8wzzg787.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <47EFF64F.7080408@gmail.com> (Lennart Borgman's message of "Sun,  30 Mar 2008 22:21:35 +0200")

>> How can I get "emacsclient --eval x" to DWIM when Emacs is not
>> started? I have tried the following:
>> 
>> emacsclient -e '(message "Hello!")' -a emacs
>> 
>> But that does not work. What happens is that Emacs, when started as
>> the alternate editor, tries to open a file with the name ''(message
>> "Hello!").
>> 
>> For normal operation, i.e. not using --eval but just for opening a
>> file, -a emacs works well and does what I expect. Why does not --eval
>> do the same? I have, of course, (server-start) in my .emacs file.
>> 
>> As far as I can see, the manual does not mention this case.

> You can always try the patches I use for w32. It works fine for cases like
> the above though you just write something like

>   emacsclient -e "(message \"hello\")"

I think it would be a good change for emacsclient to auto-start an Emacs
server if the server is not running yet.

I have not followed closely your work on this (other than knowing it
exists), so maybe if you can take your current code, bring it down to
the simplest/cleanest patch (ignore everything that can be added
later), we can start discussing it (in a new thread).


        Stefan




  parent reply	other threads:[~2008-03-30 22:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-30 20:09 How to get "emacsclient --eval x" to DWIM when Emacs is not started Mathias Dahl
2008-03-30 20:21 ` Lennart Borgman (gmail)
2008-03-30 21:45   ` Mathias Dahl
2008-03-30 21:52     ` Lennart Borgman (gmail)
2008-03-30 22:06       ` Mathias Dahl
2008-03-30 22:33         ` Lennart Borgman (gmail)
2008-03-30 22:49   ` Stefan Monnier [this message]
2008-03-30 22:55     ` Lennart Borgman (gmail)
2008-03-30 23:24       ` Juanma Barranquero
2008-03-31  7:44     ` Mathias Dahl
2008-03-31  7:49       ` Lennart Borgman (gmail)

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

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

  git send-email \
    --in-reply-to=jwv8wzzg787.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=mathias.dahl@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.