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

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

Re: define Info's "dir"?


From: gebser
Subject: Re: define Info's "dir"?
Date: Thu, 29 Apr 2004 11:35:53 -0400 (EDT)

The solution I was looking for has nothing to do with Info.  

When I do "C-x f" to visit a file, I am prompted to enter the name of 
the file.  In the prompt (in the minibuffer) is the default-directory 
already specified for me.  This default-directory, however, is the one 
for the current buffer.  Instead, I would like a command which overrides 
the default-directory for the current buffer when I do "C-x f" to visit 
a file,

To explain the same thing another way....  When I do "M-x cd" I'm 
prompted for the default-directory.  But this sets this variable for the 
current buffer only.  I would like to do, say "M-x gcd", and enter the 
name of a directory which would set, say, global-default-directory which 
would persist for the entire emacs sesssion or until I change it to 
something else.  Then, no matter what is the current buffer's 
default-directory, if I do "C-x f" to visit a file, the prompt will 
specify the global-default-directory.

So you see, it has nothing to do with Info.


At 21:03 (UTC+0200) on Wed, 28 Apr 2004 Eli Zaretskii said:

= > Date: Wed, 28 Apr 2004 08:35:59 -0400 (EDT)
= > From: address@hidden
= > 
= > I'm not the original poster, but I'd like to be able to set the default 
= > directory interactively and change it from time to time.  The motivation 
= > is that I sometimes work on a project whose (multiple) files all reside, 
= > or will reside, in a particular directory (or subdirs of it.  As a 
= > fictional example, suppose I'm working on economics today.  Throughout 
= > the day I create several files which I want to have in econ/national/, 
= > econ/state/, econ/local/, and econ/international.  In this case I'd want 
= > the default directory to be /home/ken/projects/writings/politics/econ/ 
= > but wouldn't want to have to type that in every time I visit a file.  
= > I'm aware of "M-x cd" but this sets "default-directory" only for that 
= > buffer.
= 
= Why don't you invoke Info directly on the manual you want to read (see
= the doc string of "C-h i" where it describes what happens if it is
= invoked with a prefix arg)?
= 
= > I'd like a function (defun in emacspeak, yes?) which is global, 
= > i.e., sets the default-directory no matter which buffer I'm currently 
= > visiting.  Is there such a nicety?
= 
= You could craft up something that modifies the value of
= Info-directory-list, but IIRC info.el consults this list only when it
= is first invoked.  That is, the contents of the DIR node are computed
= only once in an Emacs session.  So changing Info-directory-list after
= that will not help at all.
= 
= 
= _______________________________________________
= Help-gnu-emacs mailing list
= address@hidden
= http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
= 





reply via email to

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