all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Juanma Barranquero <lekktu@gmail.com>,
	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: Mon, 31 Mar 2008 00:55:29 +0200	[thread overview]
Message-ID: <47F01A61.6010508@gmail.com> (raw)
In-Reply-To: <jwv8wzzg787.fsf-monnier+emacs@gnu.org>

Stefan Monnier wrote:
>>> 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).


I hoped that Juanma should find some time to cooperate on this. I have 
restructured the code, it is not the best one can find, but the 
restructuring should help to understand what news it brings (I have 
moved the GUI part to separate files and only have some "hooks" to it in 
emacsclient.c).

Juanma, I think that it would be best to do some more restructuring off 
the list just to avoid unnecessary noise. What do you think?

Anyone else interested in taking part please mail me.




  reply	other threads:[~2008-03-30 22:55 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
2008-03-30 22:55     ` Lennart Borgman (gmail) [this message]
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=47F01A61.6010508@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=mathias.dahl@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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.