all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to set alias to drectory in .emacs?
@ 2003-10-15 15:57 F. Chen
  2003-10-15 18:17 ` Kevin Rodgers
  2003-10-15 22:57 ` Tim X
  0 siblings, 2 replies; 5+ messages in thread
From: F. Chen @ 2003-10-15 15:57 UTC (permalink / raw)


Hello there:

This probably is a very FAQ, but I am having trouble finding a
solution, hence here to ask again.

I'd like to know how to set an alias for a direcory in emacs, e.g.
alias wd = "/Home/self/private/Work/Papers/InProgress/", so everytime
I want to open a file in that directory but from a different location,
I can do something along the line of C-x C-f type wd, then file name.

Any help will be greatly appreciated.

fc

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

* Re: How to set alias to drectory in .emacs?
  2003-10-15 15:57 How to set alias to drectory in .emacs? F. Chen
@ 2003-10-15 18:17 ` Kevin Rodgers
  2003-10-16  8:50   ` F. Chen
  2003-10-15 22:57 ` Tim X
  1 sibling, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2003-10-15 18:17 UTC (permalink / raw)


F. Chen wrote:

> I'd like to know how to set an alias for a direcory in emacs, e.g.
> alias wd = "/Home/self/private/Work/Papers/InProgress/", so everytime
> I want to open a file in that directory but from a different location,
> I can do something along the line of C-x C-f type wd, then file name.

M-: (setenv "wd" "/Home/self/private/Work/Papers/InProgress")
C-x C-f $wd TAB

-- 
Kevin Rodgers

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

* Re: How to set alias to drectory in .emacs?
  2003-10-15 15:57 How to set alias to drectory in .emacs? F. Chen
  2003-10-15 18:17 ` Kevin Rodgers
@ 2003-10-15 22:57 ` Tim X
  2003-10-16  8:52   ` F. Chen
  1 sibling, 1 reply; 5+ messages in thread
From: Tim X @ 2003-10-15 22:57 UTC (permalink / raw)


>>>>> "F" == F Chen <fangc@hotmail.com> writes:

 F> Hello there: This probably is a very FAQ, but I am having trouble
 F> finding a solution, hence here to ask again.

 F> I'd like to know how to set an alias for a direcory in emacs, e.g.
 F> alias wd = "/Home/self/private/Work/Papers/InProgress/", so
 F> everytime I want to open a file in that directory but from a
 F> different location, I can do something along the line of C-x C-f
 F> type wd, then file name.

 F> Any help will be greatly appreciated.

 F> fc

Though not exactly what you want, I think the ffap pakage has the
facility to set a default search path. With this, if you try to open a
file which doesn't exist in the current directory, it will search for
the file in a list of directories you specify. You could make that
list the home or default place to look.

If thats not sufficient for what you want, the package may give you
some clues on how you could put together your own lisp code to do it.

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

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

* Re: How to set alias to drectory in .emacs?
  2003-10-15 18:17 ` Kevin Rodgers
@ 2003-10-16  8:50   ` F. Chen
  0 siblings, 0 replies; 5+ messages in thread
From: F. Chen @ 2003-10-16  8:50 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3F8D8F37.10503@yahoo.com>...
> F. Chen wrote:
> 
> > I'd like to know how to set an alias for a direcory in emacs, e.g.
> > alias wd = "/Home/self/private/Work/Papers/InProgress/", so everytime
> > I want to open a file in that directory but from a different location,
> > I can do something along the line of C-x C-f type wd, then file name.
> 
> M-: (setenv "wd" "/Home/self/private/Work/Papers/InProgress")
> C-x C-f $wd TAB

Thanks! this works.

fc

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

* Re: How to set alias to drectory in .emacs?
  2003-10-15 22:57 ` Tim X
@ 2003-10-16  8:52   ` F. Chen
  0 siblings, 0 replies; 5+ messages in thread
From: F. Chen @ 2003-10-16  8:52 UTC (permalink / raw)


Tim X <timx@spamto.devnul.com> wrote in message news:<87n0c2rtvw.fsf@tiger.rapttech.com.au>...
> >>>>> "F" == F Chen <fangc@hotmail.com> writes:
> 
>  F> Hello there: This probably is a very FAQ, but I am having trouble
>  F> finding a solution, hence here to ask again.
> 
>  F> I'd like to know how to set an alias for a direcory in emacs, e.g.
>  F> alias wd = "/Home/self/private/Work/Papers/InProgress/", so
>  F> everytime I want to open a file in that directory but from a
>  F> different location, I can do something along the line of C-x C-f
>  F> type wd, then file name.
> 
>  F> Any help will be greatly appreciated.
> 
>  F> fc
> 
> Though not exactly what you want, I think the ffap pakage has the
> facility to set a default search path. With this, if you try to open a
> file which doesn't exist in the current directory, it will search for
> the file in a list of directories you specify. You could make that
> list the home or default place to look.
> 
> If thats not sufficient for what you want, the package may give you
> some clues on how you could put together your own lisp code to do it.
> 
> Tim

Thanks Tim, this seems to be a useful package to use, that would save
a bit typing if I can search files this way.

fc

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

end of thread, other threads:[~2003-10-16  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-15 15:57 How to set alias to drectory in .emacs? F. Chen
2003-10-15 18:17 ` Kevin Rodgers
2003-10-16  8:50   ` F. Chen
2003-10-15 22:57 ` Tim X
2003-10-16  8:52   ` F. Chen

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.