all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Juanma Barranquero" <lekktu@gmail.com>
Cc: Emacs-devel@gnu.org
Subject: Re: emacsclient: --quiet/--verbose
Date: Fri, 1 Dec 2006 02:10:35 +0100	[thread overview]
Message-ID: <f7ccd24b0611301710y51620f90r9501a6d50d871a94@mail.gmail.com> (raw)
In-Reply-To: <7631420.post@talk.nabble.com>

On 12/1/06, Michael Mauger <mmaug@yahoo.com> wrote:

> * Should it be used if the emacs is "remote" i.e. not at 127.0.0.1?  What if
> emacsclientw is running on w32, Emacs is running on Unix, and you try to
> foreground a Unix pid.  Is it possible to confirm that a remote host is
> actually the local host?  Is it worthwhile to do so?

Of course, it is entirely possible to have server-host set to a
non-127.0.0.1 address which is, in fact, local. What emacsclient
should do is to check the address of the server (from the server file)
and, if not 127.0.0.1, get a list of the addresses of the local
machine it is running in, and detect whether the server-host address
is in fact local or not. The code to do that amounts to 10-15 lines of
C.

However, I don't think it is necessary right now. The worst that can
happen is that emacsclient calls AllowSetForegroundWindow on the pid
of a process which doesn't expect it (and which won't grab the focus
unless it is doing something like moving a window, etc.), or on an
nonexistent pid (in which case ASFW will return an error, which is
ignored anyway).

> * Is the AllowSetForegroundWindow really necessary since it isn't called
> when emacsclient is run on Unix to a w32 Emacs yet the w32 Emacs responds
> and raises in the window stack as you'd expect.

Obviously, because the Emacs on Windows is not fighting for the focus
against the Unix emacsclient. However, it is necessary on Windows,
when called from the same machine, because Emacs and the console
session you're using to run emacsclient fight for the focus. That
doesn't happen if some other program executes emacsclient as a
subprocess, perhaps. But 99% of my uses of emasclient are from a CMD
(4NT, really) console.

> Finally, if people could take another look at the Tramp changes I proposed
> for emacsclient.

I don't have anything about emacsclient using Tramp, as long as it is
not the only way, of course. TCP sockets are fine for my uses.

                    /L/e/k/t/u

  reply	other threads:[~2006-12-01  1:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30  5:34 emacsclient: --quiet/--verbose Michael Mauger
2006-11-30 22:59 ` Juanma Barranquero
2006-11-30 23:20   ` Lennart Borgman
2006-12-01 10:12     ` Eli Zaretskii
2006-12-01  0:47   ` Michael Mauger
2006-12-01  1:10     ` Juanma Barranquero [this message]
2006-12-01  3:39       ` Michael Mauger
2006-12-02 19:03         ` Lennart Borgman
2006-12-01  9:12 ` Jason Rumney
2006-12-01 13:37 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-12-02 22:02 Michael Mauger
2006-12-03 12:25 ` Lennart Borgman

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=f7ccd24b0611301710y51620f90r9501a6d50d871a94@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=Emacs-devel@gnu.org \
    /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.