From: Peter Lee <pete.a.lee@gmail.com>
Subject: Re: Abbreviated filenames for display
Date: Tue, 26 Apr 2005 22:12:50 GMT [thread overview]
Message-ID: <u3btd89wd.fsf@gmail.com> (raw)
In-Reply-To: mailman.3088.1114541205.2895.help-gnu-emacs@gnu.org
>>>> Michael Mauger writes:
> (putenv "D0" "~/My Documents/Projects/xyz")
> (putenv "D1" "/sshx:myuser@unix1.abc.def.com:/home/myuser")
> (putenv "D2" "/sshx:myuser@unix2.abc.def.com:/home/myuser")
You can also use abbrev.
(define-abbrev global-abbrev-table "D0" "~/My Documents/Projects/xyz")
(define-abbrev global-abbrev-table "D1" "/sshx:myuser@unix1.abc.def.com:/home/myuser")
(define-abbrev global-abbrev-table "D2" "/sshx:myuser@unix2.abc.def.com:/home/myuser")
and then type C-x C-f D0[C-x ']
,----[ C-h k C-x ' ]
| C-x ' runs the command expand-abbrev
| which is an interactive built-in function in `C source code'.
| It is bound to C-x ', C-x a ', C-x a e.
| (expand-abbrev)
|
| Expand the abbrev before point, if there is an abbrev there.
| Effective when explicitly called even when `abbrev-mode' is nil.
| Returns the abbrev symbol, if expansion took place.
`----
> For example, rather than showing me
> /sshx:myuser@unix2.abc.def.com:/home/myuser/proj/xyz/src/x.sql
> as the filename, I want:
> $D2/proj/xyz/src/x.sql
Take a look at uniquify.el. It comes with cvs emacs... I don't
remember if it was part of 21.3 or not... if it wasn't you can search
around for it via google. It's a nice package for this type of thing
and you can probably configure it to give you what you want.
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward)
next prev parent reply other threads:[~2005-04-26 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3088.1114541205.2895.help-gnu-emacs@gnu.org>
2005-04-26 20:04 ` Abbreviated filenames for display kin
2005-04-26 22:12 ` Peter Lee [this message]
2005-04-26 21:57 Michael Mauger
-- strict thread matches above, loose matches on Subject: below --
2005-04-26 18:31 Michael Mauger
2005-04-26 20:01 ` Kevin Rodgers
2005-04-26 20:44 ` Michael Mauger
2005-04-26 20:51 ` Michael Albinus
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=u3btd89wd.fsf@gmail.com \
--to=pete.a.lee@gmail.com \
/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).