unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: find-file-at-point expanding environment variables?
Date: Wed, 14 Apr 2010 11:31:29 +0200	[thread overview]
Message-ID: <87hbne5qj2.fsf@fh-trier.de> (raw)
In-Reply-To: 4bc50ce1$0$30266$c32e2966@unlimited.newshosting.com

David Rogoff <david@therogoffs.com> writes:

> On 2010-04-13 15:58:31 -0700, David Rogoff said:
>
>> I could use some help.  I use ffap (bound to c-x c-f) all the
>> time. However, I edit many files in which there are references to
>> filenames that use shell environment variables as part of the path.
>> For example -  /home/${USER}/.cshrc .  Is there a way for ffap to
>> expand/substitute this?  It would make my life a lot easier.
>
> I did some experimenting and see that ffap will expand variables
> ... except if they are enclosed in curly braces. This isn't too bad a
> limitation, but it would be better if I didn't have to edit the files
> and remove the curly braces.
>
> David

(add-to-list 'ffap-string-at-point-mode-alist
             '(file "--:\\\\$+<>@-Z_[:alpha:]~*?{}" "<@" "@>;.,!:"))
             
Try this.
-ap


  reply	other threads:[~2010-04-14  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-13 22:58 find-file-at-point expanding environment variables? David Rogoff
2010-04-14  0:31 ` David Rogoff
2010-04-14  9:31   ` Andreas Politz [this message]
2010-04-14 17:38     ` David Rogoff

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=87hbne5qj2.fsf@fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=help-gnu-emacs@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.
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).