help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file-at-point expanding environment variables?


From: Andreas Politz
Subject: Re: find-file-at-point expanding environment variables?
Date: Tue, 04 May 2010 15:44:32 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]