all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to alias directories?
@ 2004-04-29 17:44 J Krugman
  2004-04-29 17:56 ` Kin Cho
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: J Krugman @ 2004-04-29 17:44 UTC (permalink / raw)





I'm doing work on files residing in two directories with long,
non-overlapping pathnames (this is all on Linux).  It is a pain to
type these long pathnames whenever I need to find a new file in
one of these two directories (this happens whenever I'm visiting
a buffer corresponding to a file in one of the two directories,
and try to find-file a file that lives in the other directory).

I could make symbolic links with short names (e.g. "A" and "B")
pointing to these two directories, to simplify the typing, but I
was wondering if there was a way to do this sort of "directory
aliasing" directly within Emacs.

Thanks!

jill
-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 17:44 How to alias directories? J Krugman
@ 2004-04-29 17:56 ` Kin Cho
  2004-04-29 21:53   ` Miles Bader
  2004-04-29 18:25 ` EScott
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Kin Cho @ 2004-04-29 17:56 UTC (permalink / raw)


You could (setenv "x" "/long/dir/name/"), then C-x C-f $x.

-kin

J Krugman <jkrugman@yahbitoo.com> writes:

> I'm doing work on files residing in two directories with long,
> non-overlapping pathnames (this is all on Linux).  It is a pain to
> type these long pathnames whenever I need to find a new file in
> one of these two directories (this happens whenever I'm visiting
> a buffer corresponding to a file in one of the two directories,
> and try to find-file a file that lives in the other directory).
> 
> I could make symbolic links with short names (e.g. "A" and "B")
> pointing to these two directories, to simplify the typing, but I
> was wondering if there was a way to do this sort of "directory
> aliasing" directly within Emacs.
> 
> Thanks!
> 
> jill
> -- 
> To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 17:44 How to alias directories? J Krugman
  2004-04-29 17:56 ` Kin Cho
@ 2004-04-29 18:25 ` EScott
  2004-04-29 19:33 ` Roodwriter
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: EScott @ 2004-04-29 18:25 UTC (permalink / raw)



What I do in cases like this is to access one file (call it the "old" file)
from each of the directories.  Then when I want to edit an additional file
I first access the "old" file from the same directory.  This has the effect
of setting the directory without needing to do a major typing job.

This is my first posting ever; please excuse any inadvertent errors of
procedure.

G. Eric Scott
Senior Analyst, Software Development
New York Independent System Operator
187 Wolf Rd.
Albany, NY 12205

(518) 356 7635
escott@nyiso.com

J Krugman <jkrugman@yahbitoo.com> wrote on 04/29/2004 01:44:38 PM:

>
>
>
> I'm doing work on files residing in two directories with long,
> non-overlapping pathnames (this is all on Linux).  It is a pain to
> type these long pathnames whenever I need to find a new file in
> one of these two directories (this happens whenever I'm visiting
> a buffer corresponding to a file in one of the two directories,
> and try to find-file a file that lives in the other directory).
>
> I could make symbolic links with short names (e.g. "A" and "B")
> pointing to these two directories, to simplify the typing, but I
> was wondering if there was a way to do this sort of "directory
> aliasing" directly within Emacs.
>
> Thanks!
>
> jill
> --
> To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 17:44 How to alias directories? J Krugman
  2004-04-29 17:56 ` Kin Cho
  2004-04-29 18:25 ` EScott
@ 2004-04-29 19:33 ` Roodwriter
  2004-04-29 20:29 ` Peter Lee
  2004-04-29 23:07 ` Galen Boyer
  4 siblings, 0 replies; 8+ messages in thread
From: Roodwriter @ 2004-04-29 19:33 UTC (permalink / raw)


J Krugman wrote:

> 
> 
> 
> I'm doing work on files residing in two directories with long,
> non-overlapping pathnames (this is all on Linux).  It is a pain to
> type these long pathnames whenever I need to find a new file in
> one of these two directories (this happens whenever I'm visiting
> a buffer corresponding to a file in one of the two directories,
> and try to find-file a file that lives in the other directory).
> 
> I could make symbolic links with short names (e.g. "A" and "B")
> pointing to these two directories, to simplify the typing, but I
> was wondering if there was a way to do this sort of "directory
> aliasing" directly within Emacs.
> 
> Thanks!
> 
> jill

One possibility is a macro. Record the keystrokes and assign a shortcut key 
combination.

I hadn't thought of that. I should probably do it. 

--Rod

__________

Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical Consumers" 
and "Boring Stories from Uncle Rod." Both are available at 
http://www.rodwriterpublishing.com/index.html

To reply by e-mail, take the extra "o" out of the name.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 17:44 How to alias directories? J Krugman
                   ` (2 preceding siblings ...)
  2004-04-29 19:33 ` Roodwriter
@ 2004-04-29 20:29 ` Peter Lee
  2004-04-29 23:07 ` Galen Boyer
  4 siblings, 0 replies; 8+ messages in thread
From: Peter Lee @ 2004-04-29 20:29 UTC (permalink / raw)


>>>> J Krugman writes:

    jkrugman> It is a pain to type these long pathnames whenever I
    jkrugman> need to find a new file in one of these two directories
    jkrugman> (this happens whenever I'm visiting a buffer
    jkrugman> corresponding to a file in one of the two directories,
    jkrugman> and try to find-file a file that lives in the other directory).

I use abbrevs for this.  They are usable from the minibuffer to.

(define-abbrev global-abbrev-table "xdd" "~/some/long/path/to/dd/")
(define-abbrev global-abbrev-table "xee" "~/another/long/path/to/ee/")

With those defined you can: C-x C-f xddC-x a e

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 17:56 ` Kin Cho
@ 2004-04-29 21:53   ` Miles Bader
  2004-04-30  1:52     ` J Krugman
  0 siblings, 1 reply; 8+ messages in thread
From: Miles Bader @ 2004-04-29 21:53 UTC (permalink / raw)


Kin Cho <ignore-this-prefixkin@techie.com> writes:
> You could (setenv "x" "/long/dir/name/"), then C-x C-f $x.

Yeah, that's what I do (though actually I set them in my .profile file
when logging in).

It's nice because it works outside of emacs as well, in shells etc.
Regrettably it doesn't work in GDB and typical GUI apps (but then the
latter are usually barely usable from the keyboard anyway; as for GDB,
well... gotta fix that one of these days...).

Emacs file-name-completion &c work well with these too.

The one annoying thing about this method is that when you change a
setting, it's a bit of a pain to make running programs see the change,
so it's best used for aliases which are relatively stable.

-Miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 17:44 How to alias directories? J Krugman
                   ` (3 preceding siblings ...)
  2004-04-29 20:29 ` Peter Lee
@ 2004-04-29 23:07 ` Galen Boyer
  4 siblings, 0 replies; 8+ messages in thread
From: Galen Boyer @ 2004-04-29 23:07 UTC (permalink / raw)


You can set bookmarks to directories.
-- 
Galen Boyer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to alias directories?
  2004-04-29 21:53   ` Miles Bader
@ 2004-04-30  1:52     ` J Krugman
  0 siblings, 0 replies; 8+ messages in thread
From: J Krugman @ 2004-04-30  1:52 UTC (permalink / raw)





A lot of good ideas.  Thanks!

jill

-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-04-30  1:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-29 17:44 How to alias directories? J Krugman
2004-04-29 17:56 ` Kin Cho
2004-04-29 21:53   ` Miles Bader
2004-04-30  1:52     ` J Krugman
2004-04-29 18:25 ` EScott
2004-04-29 19:33 ` Roodwriter
2004-04-29 20:29 ` Peter Lee
2004-04-29 23:07 ` Galen Boyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.