* Re: define Info's "dir"? [not found] <mailman.2160.1083158847.1061.help-gnu-emacs@gnu.org> @ 2004-04-28 15:23 ` Kevin Rodgers 2004-05-01 9:42 ` Kai Grossjohann 1 sibling, 0 replies; 11+ messages in thread From: Kevin Rodgers @ 2004-04-28 15:23 UTC (permalink / raw) gebser@speakeasy.net wrote: > 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. 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? Why don't you just visit files from a Dired buffer visiting that directory? C-x d ~/projects/writings/politics/econ -- Kevin Rodgers ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? [not found] <mailman.2160.1083158847.1061.help-gnu-emacs@gnu.org> 2004-04-28 15:23 ` define Info's "dir"? Kevin Rodgers @ 2004-05-01 9:42 ` Kai Grossjohann 2004-05-02 3:11 ` gebser 1 sibling, 1 reply; 11+ messages in thread From: Kai Grossjohann @ 2004-05-01 9:42 UTC (permalink / raw) gebser@speakeasy.net writes: > 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. 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? (setenv "econ" "/home/ken/projects/writings/politics/econ") Then C-x C-f $econ/foo RET. You can also always use $x and redefine it depending on your work context. Kai ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? 2004-05-01 9:42 ` Kai Grossjohann @ 2004-05-02 3:11 ` gebser 0 siblings, 0 replies; 11+ messages in thread From: gebser @ 2004-05-02 3:11 UTC (permalink / raw) That looks like it'll work. Thanks. At 11:42 (UTC+0200) on Sat, 1 May 2004 Kai Grossjohann said: = gebser@speakeasy.net writes: = = > 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. 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? = = (setenv "econ" "/home/ken/projects/writings/politics/econ") = = Then C-x C-f $econ/foo RET. = = You can also always use $x and redefine it depending on your work = context. = = Kai = = _______________________________________________ = Help-gnu-emacs mailing list = Help-gnu-emacs@gnu.org = http://mail.gnu.org/mailman/listinfo/help-gnu-emacs = ^ permalink raw reply [flat|nested] 11+ messages in thread
* define Info's "dir"? @ 2004-04-28 6:44 Mike Ballard 2004-04-28 11:22 ` Eli Zaretskii [not found] ` <mailman.2124.1083147692.1061.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 11+ messages in thread From: Mike Ballard @ 2004-04-28 6:44 UTC (permalink / raw) Is there a way to tell Emacs to always use a specific "dir" as the top-level dir file? Even if the name is not "dir"? Mike -- mikeballard--at--verizon.net "Roses are red, violets are blue, I'm schizophrenic and so am I" ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? 2004-04-28 6:44 Mike Ballard @ 2004-04-28 11:22 ` Eli Zaretskii 2004-04-28 12:35 ` gebser [not found] ` <mailman.2124.1083147692.1061.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 11+ messages in thread From: Eli Zaretskii @ 2004-04-28 11:22 UTC (permalink / raw) > Newsgroups: gnu.emacs.help > From: Mike Ballard <dont_w@nt_spam.org> > Date: Wed, 28 Apr 2004 06:44:26 GMT > > Is there a way to tell Emacs to always use a specific "dir" as the > top-level dir file? Even if the name is not "dir"? There doesn't seem to be a way to do that. The names of DIR files are hardwired into info.el: Emacs looks for `dir', `DIR', `dir.info', and `DIR.INFO', in that order, in each Info directory. The names are hardwired because the Texinfo package never generates DIR files under any other name. Why do you need that? What is the real problem behind your request? ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? 2004-04-28 11:22 ` Eli Zaretskii @ 2004-04-28 12:35 ` gebser 2004-04-28 19:03 ` Eli Zaretskii 0 siblings, 1 reply; 11+ messages in thread From: gebser @ 2004-04-28 12:35 UTC (permalink / raw) 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. 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? tia, ken At 13:22 (UTC+0200) on 28 Apr 2004 Eli Zaretskii said: = > Newsgroups: gnu.emacs.help = > From: Mike Ballard <dont_w@nt_spam.org> = > Date: Wed, 28 Apr 2004 06:44:26 GMT = > = > Is there a way to tell Emacs to always use a specific "dir" as the = > top-level dir file? Even if the name is not "dir"? = = There doesn't seem to be a way to do that. The names of DIR files are = hardwired into info.el: Emacs looks for `dir', `DIR', `dir.info', and = `DIR.INFO', in that order, in each Info directory. = = The names are hardwired because the Texinfo package never generates = DIR files under any other name. = = Why do you need that? What is the real problem behind your request? = = = = _______________________________________________ = Help-gnu-emacs mailing list = Help-gnu-emacs@gnu.org = http://mail.gnu.org/mailman/listinfo/help-gnu-emacs = ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? 2004-04-28 12:35 ` gebser @ 2004-04-28 19:03 ` Eli Zaretskii 2004-04-29 15:35 ` gebser 0 siblings, 1 reply; 11+ messages in thread From: Eli Zaretskii @ 2004-04-28 19:03 UTC (permalink / raw) > Date: Wed, 28 Apr 2004 08:35:59 -0400 (EDT) > From: gebser@speakeasy.net > > 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. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? 2004-04-28 19:03 ` Eli Zaretskii @ 2004-04-29 15:35 ` gebser 0 siblings, 0 replies; 11+ messages in thread From: gebser @ 2004-04-29 15:35 UTC (permalink / raw) 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: gebser@speakeasy.net = > = > 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 = Help-gnu-emacs@gnu.org = http://mail.gnu.org/mailman/listinfo/help-gnu-emacs = ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.2124.1083147692.1061.help-gnu-emacs@gnu.org>]
* Re: define Info's "dir"? [not found] ` <mailman.2124.1083147692.1061.help-gnu-emacs@gnu.org> @ 2004-04-29 5:16 ` Mike Ballard 2004-04-29 19:12 ` Eli Zaretskii [not found] ` <mailman.2480.1083262409.1061.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 11+ messages in thread From: Mike Ballard @ 2004-04-29 5:16 UTC (permalink / raw) On Thu Apr 29, Eli Zaretskii disturbed my nap when he said: > > Newsgroups: gnu.emacs.help > > From: Mike Ballard <dont_w@nt_spam.org> > > Date: Wed, 28 Apr 2004 06:44:26 GMT > > > > Is there a way to tell Emacs to always use a specific "dir" as the > > top-level dir file? Even if the name is not "dir"? > > There doesn't seem to be a way to do that. The names of DIR files are > hardwired into info.el: Emacs looks for `dir', `DIR', `dir.info', and > `DIR.INFO', in that order, in each Info directory. > > The names are hardwired because the Texinfo package never generates > DIR files under any other name. > > Why do you need that? What is the real problem behind your request? > Thanks for the info (no pun intended). I use gentoo. For some (to me, inexplicable) reason the gentoo folks have decided to have emerge (the tool for installing new sources) search for "dir" files and in some cases rename them to dir.old. I filed a bug on it six months ago and it hasn't been touched. If a bug can be classified as "absolute lowest priority in the entire world" mine's probably it. I happen to have my own top-level dir file, source-controlled, not in an info dir but in the first entry in $INFOPATH so that Emacs will use it. I've added the Info help cmds to it, formatted so that most-used are near the top, and cleaned it up to be more 'presentable' for my tastes. Gentoo's emerge script (IIRC) is python, which I know nothing about. I originally edited the script locally so it would stop being so belligerent as to have the nerve to change things how I want them. When I upgraded this edit no longer seems to do the trick. For now I have to start Emacs with a script that includes a while loop to sleep/test/rename my "dir" whenever emerge changes it. I was hoping to use a new "dir" name that emerge wouldn't mess with. Mike -- mikeballard--at--verizon.net "Roses are red, violets are blue, I'm schizophrenic and so am I" ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: define Info's "dir"? 2004-04-29 5:16 ` Mike Ballard @ 2004-04-29 19:12 ` Eli Zaretskii [not found] ` <mailman.2480.1083262409.1061.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 11+ messages in thread From: Eli Zaretskii @ 2004-04-29 19:12 UTC (permalink / raw) > Newsgroups: gnu.emacs.help > From: Mike Ballard <dont_w@nt_spam.org> > Date: Thu, 29 Apr 2004 05:16:48 GMT > > I use gentoo. For some (to me, inexplicable) reason the gentoo folks have > decided to have emerge (the tool for installing new sources) search for > "dir" files and in some cases rename them to dir.old. Well, if you rename `dir' into `dir.info', will emerge leave it alone? If it will, you have your solution, I think. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.2480.1083262409.1061.help-gnu-emacs@gnu.org>]
* Re: define Info's "dir"? [not found] ` <mailman.2480.1083262409.1061.help-gnu-emacs@gnu.org> @ 2004-04-30 4:07 ` Mike Ballard 0 siblings, 0 replies; 11+ messages in thread From: Mike Ballard @ 2004-04-30 4:07 UTC (permalink / raw) On Fri Apr 30, Eli Zaretskii disturbed my nap when he said: > > Newsgroups: gnu.emacs.help > > From: Mike Ballard <dont_w@nt_spam.org> > > Date: Thu, 29 Apr 2004 05:16:48 GMT > > > > I use gentoo. For some (to me, inexplicable) reason the gentoo folks have > > decided to have emerge (the tool for installing new sources) search for > > "dir" files and in some cases rename them to dir.old. > > Well, if you rename `dir' into `dir.info', will emerge leave it alone? > If it will, you have your solution, I think. > Thanks - "dir.info" is apparently not detected and therefore left untouched by emerge. I didn't know that was a valid name - thanks for the help... Mike -- mikeballard--at--verizon.net "Roses are red, violets are blue, I'm schizophrenic and so am I" ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-05-02 3:11 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <mailman.2160.1083158847.1061.help-gnu-emacs@gnu.org> 2004-04-28 15:23 ` define Info's "dir"? Kevin Rodgers 2004-05-01 9:42 ` Kai Grossjohann 2004-05-02 3:11 ` gebser 2004-04-28 6:44 Mike Ballard 2004-04-28 11:22 ` Eli Zaretskii 2004-04-28 12:35 ` gebser 2004-04-28 19:03 ` Eli Zaretskii 2004-04-29 15:35 ` gebser [not found] ` <mailman.2124.1083147692.1061.help-gnu-emacs@gnu.org> 2004-04-29 5:16 ` Mike Ballard 2004-04-29 19:12 ` Eli Zaretskii [not found] ` <mailman.2480.1083262409.1061.help-gnu-emacs@gnu.org> 2004-04-30 4:07 ` Mike Ballard
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).