unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@glug.org>
Subject: Re: Lisp code to expand /~ and // but not env vars?
Date: Mon, 03 Oct 2005 22:40:48 +0200	[thread overview]
Message-ID: <7ehdbyqqpb.fsf@ada2.unipv.it> (raw)
In-Reply-To: mailman.9471.1128294372.20277.help-gnu-emacs@gnu.org

"Drew Adams" <drew.adams@oracle.com> writes:

> Can anyone suggest a way to do this /~ and // conversion in Lisp?

double the dollar signs in the arg to `substitute-in-file-name'.
something like:

given-input => "def/~/abc/$HOME"

(double-dollar-signs given-input) => "def/~/abc/$$HOME"

(substitute-in-file-name 
  (double-dollar-signs given-input)) => "~/abc/$HOME"

you can write `double-dollar-signs' in various ways...

thi

       reply	other threads:[~2005-10-03 20:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.9471.1128294372.20277.help-gnu-emacs@gnu.org>
2005-10-03 20:40 ` Thien-Thi Nguyen [this message]
2005-10-02 22:51 Lisp code to expand /~ and // but not env vars? Drew Adams
2005-10-02 23:16 ` Lennart Borgman
2005-10-03  0:03   ` Drew Adams
2005-10-03 10:50     ` Peter Dyballa
2005-10-03 16:34       ` Lennart Borgman
     [not found]     ` <mailman.9543.1128345398.20277.help-gnu-emacs@gnu.org>
2005-10-03 14:55       ` Mathias Dahl
2005-10-03 21:07 ` Drew Adams

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=7ehdbyqqpb.fsf@ada2.unipv.it \
    --to=ttn@glug.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.
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).