all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <Michael.Albinus@alcatel.de>
Cc: emacs-devel@gnu.org
Subject: Re: substitute-in-file-name and "$"
Date: Mon, 07 Jul 2003 17:48:56 +0200	[thread overview]
Message-ID: <nqadbql4lz.fsf@alcatel.de> (raw)
In-Reply-To: <200307061624.h66GO0G06676@raven.dms.auburn.edu> (Luc Teirlinck's message of "Sun, 6 Jul 2003 11:24:00 -0500 (CDT)")

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> Michael Albinus wrote:
>
>    `PC-do-completion' must do it, because the result is shown in the
>    minibuffer.
>
>    Or a file name like this: "$NEXT_HOP:/share$$", where $NEXT_HOP has
>    the value "/smb:next.hop.com". At least case (2) would be needed,
>    because Tramp file name handler could be activated only after applying
>    substitute-in-file-name to that file name.
>
> You can always double up all $'s if your function only has access to
> an already substituted filename.  (Putting a /: at the beginning would

But you even don't know that. My original problem came from the fact
that, if a user applies partial completion, the file name is already
substituted, and in the other case it isn't.

Meanwhile, I tend to regard it as a bug in `PC-do-completion', like
the others.

> be easier, but that could probably cause remote filenames to be
> considered local.)  All functions have to make clear in their
> documentation string what they are going to do to file names (if
> anything) and in which form they return them, if non-standard.  If
> they do not, that is a bug.  This is not madness.  It is completely
> obvious.  Functions need to say what they do.  People who use
> functions need to know exactly what they do, not more or less what
> they do.  It is usually easier to be able to find this out by reading
> documentation strings than by carefully reading through every single
> line of code of the function itself and of all indirectly called
> functions.

For file name operations, this would be even an implementation
restriction whether they can apply substitute-in-file-name, or not.

More general, it might be said under which circumstances it is
harmless to apply substitute-in-file-name (for local cases, where the
result of substitution isn't returned by the function), and when not.

> Sincerely,
>
> Luc.

  parent reply	other threads:[~2003-07-07 15:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-05 16:44 substitute-in-file-name and "$" Michael Albinus
2003-07-05 18:29 ` Luc Teirlinck
2003-07-05 23:16   ` Michael Albinus
2003-07-05 23:58     ` Luc Teirlinck
2003-07-06 12:20       ` Kai Großjohann
2003-07-06 12:44         ` Miles Bader
2003-07-06 14:30       ` Michael Albinus
2003-07-06 16:24         ` Luc Teirlinck
2003-07-06 16:53           ` Kai Großjohann
2003-07-07 15:48           ` Michael Albinus [this message]
2003-07-06  0:07     ` Miles Bader
2003-07-06 12:07       ` Kim F. Storm
2003-07-06 14:37         ` Michael Albinus
2003-07-06 17:06           ` Stefan Monnier
2003-07-06 17:20         ` Stefan Monnier
2003-07-07 11:50           ` Michael Albinus
2003-07-07 14:34             ` Stefan Monnier
2003-07-07 16:10               ` Michael Albinus
2003-07-09 23:47                 ` Richard Stallman
2003-07-07  3:39         ` Richard Stallman
2003-07-07 21:33         ` Kevin Rodgers
2003-07-08 20:02           ` Richard Stallman
2003-07-06 18:53 ` Richard Stallman
2003-07-06 23:46   ` Kim F. Storm
2003-07-06 21:55     ` Stefan Monnier

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=nqadbql4lz.fsf@alcatel.de \
    --to=michael.albinus@alcatel.de \
    --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.