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

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

Re: Abbreviated filenames for display


From: Michael Mauger
Subject: Re: Abbreviated filenames for display
Date: Tue, 26 Apr 2005 20:44:58 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Additional item below:

Michael Mauger <mmaug <at> yahoo.com> writes:

> 
> This is not a critical need but it has been bugging me for a while.
> 
> I have three locations of files that I use regularly.  One is local on my w32 
> machine, the other two are on Unix machines.  I use Tramp and everything 
works 
> beatifully.  I have something like the following in my .emacs:
> 
>    (putenv "D0" "~/My Documents/Projects/xyz")
>    (putenv "D1" "/sshx:address@hidden:/home/myuser")
>    (putenv "D2" "/sshx:address@hidden:/home/myuser")
> 
> This allows me to specify remote files easily at the C-x C-f prompt, with a 
> string like:
> 
>     Find File: $D2/proj/xyz/src/x.sql
> 
> The "$D2" gets expanded and my fingers don't fall off for excess wear.
> 

One additional point -- I have tried to use `directory-abbrev-alist' but it 
gets applied and the result expanded multiple times so that you end up with a 
mess.

For example:

   (setq directory-abbrev-alist
     '(("~/My Documents/Projects/xyz" . "$D0")
       ("/sshx:address@hidden:/home/myuser" . "$D1")
       ("/sshx:address@hidden:/home/myuser" . "$D2")))

I end up with filenames like:

   $D2/proj/xyz/src/$D2/proj/xyz/src/$D2/proj/xyz/src/$D2/proj/xyz/src/x.sql

Thanks again.





reply via email to

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