unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: emacsclientw
Date: Tue, 14 Nov 2006 01:45:46 +0100	[thread overview]
Message-ID: <455911BA.6030900@student.lu.se> (raw)
In-Reply-To: <f7ccd24b0611131510v6ccee3ccv2142a46f9c80f4c9@mail.gmail.com>

Juanma Barranquero wrote:
> On 11/13/06, Lennart Borgman <lennart.borgman.073@student.lu.se> wrote:
>
>> Though I am unsure
>> about some details ... - if setup of a network socket fails, is it then
>> ok to try again later? I mean I assume that the socket setup failed
>> because there was no emacs server running. Can those cases be 
>> recognized?
>
> That's one of the reasons I don't like this. emacsclient is based upon
> the idea that you try to connect to Emacs, and if you can't, you just
> run the alternate editor. Now, you're going to be forced to
> distinguish between running the alternate editor, and running Emacs,
> because they should be treated in two very different ways, and have
> all sort of configuration options for the case that you run Emacs.
> Unless you're thinking of getting rid of --alternate-editor, which
> wouldn't be a good idea.
>
> It would be far easier, I think, to have a second program (let's call
> it launchemacs) that does:
>
>  1) Run Emacs and wait until Emacs is running the server. The program
> should have options to start Emacs the way the user wants (either a
> config file, command line options, environmente variables, whatever)
>  2) Once the seerver is running, execvp emacsclient(w?).exe with the
> original arguments passed to launchemacs.
>
> The trick is that then you can do
>
>  emacsclient --alternate-editor=launchemacs myfile.txt
>
> and you don't have to modify emacsclient *at all*.

My idea is a little, little bit different. Keep --alternative-editor. 
Add a new option --start-timeout=[seconds]. If this new option is given 
then wait max that many seconds for emacs server to be available after 
launching --alternative-editor.

Let the default for --alternative-editor be "emacs" (or "runemacs" on 
w32). With full path taken from emacsclient path.

Doing it this way no second program is needed and it is (I hope) easy to 
wait for emacs server.

  reply	other threads:[~2006-11-14  0:45 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-12 22:17 I can't build from cvs sources on cygwin for some time now Eric Lilja
2006-11-12 22:23 ` Juanma Barranquero
2006-11-12 22:29   ` Eric Lilja
2006-11-12 22:34     ` Juanma Barranquero
2006-11-12 22:46       ` Eric Lilja
2006-11-12 22:56         ` Eric Lilja
2006-11-12 23:05           ` Juanma Barranquero
2006-11-12 23:22             ` Eric Lilja
2006-11-12 23:44               ` Juanma Barranquero
2006-11-12 23:52                 ` Eric Lilja
2006-11-13  0:07           ` Jason Rumney
2006-11-13  0:49             ` Juanma Barranquero
2006-11-13  2:13               ` Juanma Barranquero
2006-11-13  8:21                 ` Eric Lilja
2006-11-13 11:37                 ` Jason Rumney
2006-11-13 12:25                   ` Juanma Barranquero
2006-11-13 11:41                 ` emacsclientw Jason Rumney
2006-11-13 12:23                   ` emacsclientw Juanma Barranquero
2006-11-13 16:19                     ` emacsclientw Lennart Borgman
2006-11-13 12:36                   ` emacsclientw dhruva
2006-11-13 12:39                     ` emacsclientw Juanma Barranquero
2006-11-13 13:14                       ` emacsclientw dhruva
2006-11-13 13:31                         ` emacsclientw Juanma Barranquero
2006-11-13 22:43                         ` emacsclientw Jason Rumney
2006-11-13 22:56                           ` emacsclientw Lennart Borgman
2006-11-14  3:32                           ` emacsclientw dhruva
2006-11-14  7:18                             ` emacsclientw Mathias Dahl
2006-11-14  7:34                               ` emacsclientw Jason Rumney
2006-11-14  8:44                                 ` emacsclientw Mathias Dahl
2006-12-05 23:15                                   ` emacsclientw Stuart D. Herring
2006-11-14  8:39                               ` emacsclientw dhruva
2006-11-14  7:30                             ` emacsclientw Jason Rumney
2006-11-13 14:11                   ` emacsclientw Lennart Borgman
2006-11-13 14:40                     ` emacsclientw Juanma Barranquero
2006-11-13 19:36                       ` emacsclientw Stefan Monnier
2006-11-13 20:08                         ` emacsclientw Juanma Barranquero
2006-11-13 21:33                           ` emacsclientw Stefan Monnier
2006-11-13 22:23                             ` emacsclientw Lennart Borgman
2006-11-13 22:40                             ` emacsclientw Juanma Barranquero
2006-11-13 22:54                               ` emacsclientw Lennart Borgman
2006-11-13 23:10                                 ` emacsclientw Juanma Barranquero
2006-11-14  0:45                                   ` Lennart Borgman [this message]
2006-11-13 23:20                               ` emacsclientw Jason Rumney
2006-11-13 20:12                     ` emacsclientw Eli Zaretskii
2006-11-12 23:01         ` I can't build from cvs sources on cygwin for some time now Juanma Barranquero
2006-11-12 23:24           ` Eric Lilja
2006-11-12 23:45             ` Juanma Barranquero
2006-11-13 12:21 ` Eric Lilja

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=455911BA.6030900@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    --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 public inbox

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

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).