unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: peder@news.klingenberg.no (Peder O. Klingenberg)
To: 26591@debbugs.gnu.org
Subject: bug#26591: 26.0.50; Using local emacs+tramp with remote emacsclient
Date: Fri, 28 Apr 2017 13:29:19 +0200	[thread overview]
Message-ID: <ksmvb0db3k.fsf@luna.netfonds.no> (raw)
In-Reply-To: <m1pog5g2jm.fsf@klingenberg.no>

On Fri, Apr 28 2017 at 12:42, Eli Zaretskii wrote:

> Also, I don't see "/home" used anywhere in the example, so something
> is missing here.

The shared file system is just the easiest way for emacs and emacsclient
to both see the same server file, containing port number and security
cookie.  The default placement of that file is in ~/.emacs.d/server, and
a shared /home makes sure it's reachable from both server and client.

I can see how that would be unclear.  I'll improve it, and fix the other
things you pointed out.

> Why the test for argv[i] being an absolute file name?  And if relative
> file names cannot be supported, I think emacsclient should emit an
> error message rather than silently ignoring --tramp.

The previous hunk of the patch adds the tramp prefix to the -dir
argument, which ends up setting `default-directory' for the server
buffers.  That makes relative filenames work.

With an absolute filename, if we don't prepend the tramp prefix, the
`default-directory' is ignored serverside and emacs tries to open a
local-to-emacs absolute file.  So we need to prepend the tramp
formula to tell emacs that the absolute filename is remote.

It would probably do no harm to include the tramp prefix on non-absolute
filenames as well, but it's not necessary, due to the previous -dir.

...Peder...
-- 
I wish a new life awaited _me_ in some off-world colony.







  reply	other threads:[~2017-04-28 11:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 16:15 bug#26591: 26.0.50; Using local emacs+tramp with remote emacsclient Peder O. Klingenberg
2017-04-28  9:42 ` Eli Zaretskii
2017-04-28 11:29   ` Peder O. Klingenberg [this message]
2017-04-29 19:45   ` Peder O. Klingenberg
2017-05-19  8:54     ` Eli Zaretskii
2017-05-19 13:36       ` Peder O. Klingenberg
2017-05-19 14:35         ` Eli Zaretskii

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=ksmvb0db3k.fsf@luna.netfonds.no \
    --to=peder@news.klingenberg.no \
    --cc=26591@debbugs.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 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).