unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 31357@debbugs.gnu.org,
	bug-gnu-emacs
	<bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org>
Subject: bug#31357: 26.1; tramp-make-tramp-file-name: incompatible lisp changes in 26.1 ?
Date: Fri, 04 May 2018 09:44:56 +0200	[thread overview]
Message-ID: <87y3gz50g7.fsf@gmx.de> (raw)
In-Reply-To: <54c47e29d981f94a537aa9bdf0f37276@webmail.orcon.net.nz> (Phil Sainty's message of "Fri, 04 May 2018 09:34:47 +1200")

Phil Sainty <psainty@orcon.net.nz> writes:

Hi Phil,

>> `tramp-make-tramp-file-name' has never been documented as public
>> function, it is intended for internal use. Granted, this should have
>> been signalled better.
>
> Given the function naming, a NEWS entry seems warranted to me.

Well, this is a historical accident. None of the Tramp functions has
been indicated as internal (as a double slash in the function name would
do). This was already the case when I've entered the Tramp team back in
2002. And later on I resisted to perform a big renaming just for this.

> I do think that there *should* be a public interface for manipulating
> tramp file names.  If these were never intended as such then perhaps
> such functionality could be introduced...

Perhaps. These days, people dissect a remote file name by the different
calls of `file-remote-p', and reconstruct the file name by `concat' or
`format'. An public interface might help. But this won't be
`tramp-make-tramp-file-name', because this is the internal working
horse, which will always be adapted to whatever need arrives in Tramp.

Maybe you could propose such a public interface? It shouldn't be Tramp
specific, other file name handlers shall profit from this as well. And
local file names as arguments shall also be possible, so that you could
change a local file name into a remote file name by a simple call (think
about the common case changing a local file name into a sudo'ed one).

See also function `file-local-name' (introduced in Emacs 26.1), which
could be part of such broader interface.

>> (setf (tramp-file-name-host vec) "whatever")
>
> Ah, I'd actually tried that in 25.2 but those are not generalized
> variables in that version.  I see that it works in 26.1 though,
> so that's an excellent enhancement.

Well, `tramp-file-name' has been introduced as defstruct in Tramp
2.3. Before, there was no dedicated type, and VEC was always a, hmm,
simple vector.

> cheers,
> -Phil

Best regards, Michael.





      reply	other threads:[~2018-05-04  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 14:23 bug#31357: 26.1; tramp-make-tramp-file-name: incompatible lisp changes in 26.1 ? Phil Sainty
2018-05-03 15:26 ` Michael Albinus
2018-05-03 21:34   ` Phil Sainty
2018-05-04  7:44     ` Michael Albinus [this message]

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=87y3gz50g7.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=31357@debbugs.gnu.org \
    --cc=bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org \
    --cc=psainty@orcon.net.nz \
    /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).