* Extending Info-directory-list. There's got to be a better way.
@ 2003-04-01 20:59 Alan Mackenzie
2003-04-01 22:59 ` Oliver Scholz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Alan Mackenzie @ 2003-04-01 20:59 UTC (permalink / raw)
I recently added the following to my .emacs, after much (too much)
searching of the docs:
(eval-after-load "info"
'(progn (info-initialize)
(push "/usr/src/packages/BUILD/emacs-21.1/info/" Info-directory-list)))
This was the only way I found of appending to the front of
Info-directory-list which works regardless of whether or not Info has
already been loaded (for example, by desktop).
Surely there's got to be a better way? One that doesn't involve arcane
constructions like eval-after-load and calling functions like
info-initialise which feel like they ought to be internal private
functions rather than public functions.
Anybody got any ideas to share?
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extending Info-directory-list. There's got to be a better way.
2003-04-01 20:59 Extending Info-directory-list. There's got to be a better way Alan Mackenzie
@ 2003-04-01 22:59 ` Oliver Scholz
2003-04-02 4:13 ` Eli Zaretskii
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Oliver Scholz @ 2003-04-01 22:59 UTC (permalink / raw)
Alan Mackenzie<none@example.invalid> writes:
> I recently added the following to my .emacs, after much (too much)
> searching of the docs:
>
> (eval-after-load "info"
> '(progn (info-initialize)
> (push "/usr/src/packages/BUILD/emacs-21.1/info/" Info-directory-list)))
>
> This was the only way I found of appending to the front of
> Info-directory-list which works regardless of whether or not Info has
> already been loaded (for example, by desktop).
>
> Surely there's got to be a better way? One that doesn't involve arcane
> constructions like eval-after-load and calling functions like
> info-initialise which feel like they ought to be internal private
> functions rather than public functions.
[...]
I think, if you use `Info-default-directory-list' rather than
`Info-directory-list', you can simply `push' to it. I think it is
preloaded.
Oliver
--
13 Germinal an 211 de la Révolution
Liberté, Egalité, Fraternité!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extending Info-directory-list. There's got to be a better way.
2003-04-01 20:59 Extending Info-directory-list. There's got to be a better way Alan Mackenzie
2003-04-01 22:59 ` Oliver Scholz
@ 2003-04-02 4:13 ` Eli Zaretskii
2003-04-03 21:31 ` Kevin Ryde
2003-04-04 18:18 ` David Masterson
3 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2003-04-02 4:13 UTC (permalink / raw)
> From: Alan Mackenzie<none@example.invalid>
> Newsgroups: gnu.emacs.help
> Date: Tue, 1 Apr 2003 20:59:27 +0000
>
> (eval-after-load "info"
> '(progn (info-initialize)
> (push "/usr/src/packages/BUILD/emacs-21.1/info/" Info-directory-list)))
>
> This was the only way I found of appending to the front of
> Info-directory-list which works regardless of whether or not Info has
> already been loaded (for example, by desktop).
>
> Surely there's got to be a better way?
Yes: set the INFOPATH environment variable outside Emacs (in the same
shell from which you are invoking Emacs). That is the advertized way
of doing what you want, and it also makes sure any other Info reader
will see the same Info files as Emacs.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extending Info-directory-list. There's got to be a better way.
2003-04-01 20:59 Extending Info-directory-list. There's got to be a better way Alan Mackenzie
2003-04-01 22:59 ` Oliver Scholz
2003-04-02 4:13 ` Eli Zaretskii
@ 2003-04-03 21:31 ` Kevin Ryde
2003-04-04 18:18 ` David Masterson
3 siblings, 0 replies; 5+ messages in thread
From: Kevin Ryde @ 2003-04-03 21:31 UTC (permalink / raw)
Alan Mackenzie<none@example.invalid> writes:
>
> (eval-after-load "info"
> '(progn (info-initialize)
> (push "/usr/src/packages/BUILD/emacs-21.1/info/" Info-directory-list)))
>
> Surely there's got to be a better way?
I use the little function below. Still not a thing of beauty, but
avoids forcibly running info-initialize.
(defun my-info-directory (dir)
"Setup an extra info directory.
This is added to `Info-directory-list' if info has been initialized, or
to `Info-default-directory-list' if not.
`Info-additional-directory-list' is not used, since that comes after
`Info-directory-list' in the searching, and extras should come before the
standard locations."
(if (not (file-exists-p dir))
(message "Skipping %s" dir))
(add-to-list (if (boundp 'Info-directory-list)
'Info-directory-list
'Info-default-directory-list)
dir))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Extending Info-directory-list. There's got to be a better way.
2003-04-01 20:59 Extending Info-directory-list. There's got to be a better way Alan Mackenzie
` (2 preceding siblings ...)
2003-04-03 21:31 ` Kevin Ryde
@ 2003-04-04 18:18 ` David Masterson
3 siblings, 0 replies; 5+ messages in thread
From: David Masterson @ 2003-04-04 18:18 UTC (permalink / raw)
>>>>> Alan Mackenzie writes:
> I recently added the following to my .emacs, after much (too much)
> searching of the docs:
> (eval-after-load "info"
> '(progn (info-initialize)
> (push "/usr/src/packages/BUILD/emacs-21.1/info/"
> Info-directory-list)))
> This was the only way I found of appending to the front of
> Info-directory-list which works regardless of whether or not Info
> has already been loaded (for example, by desktop).
> Surely there's got to be a better way? One that doesn't involve
> arcane constructions like eval-after-load and calling functions like
> info-initialise which feel like they ought to be internal private
> functions rather than public functions.
> Anybody got any ideas to share?
Info-directory-list is one of the areas that needs work in both Emacs
and XEmacs. For instance, Info-default-directory-list seems to have
been obsoleted in XEmacs. That means that your code has to be
tailored to the particular Emacsen (for instance, info-initialize does
not exist in XEmacs). Another problem that comes up is that the order
of Info-directory-list is very important.
What happens if you just do this?
(add-to-list 'Info-directory-list
"/usr/src/packages/BUILD/emacs-21.1/info/" t)
Somebody needs to rewrite Info such that, when it constructs the
directory node, it sorts it on the basis of @dircategory and @direntry
so that the organization of the directory node will not be dependent
on the order of the directories in Info-directory-list. Of course,
that assumes a fairly standard Info file setup. :-\
--
David Masterson David DOT Masterson AT synopsys DOT com
Sr. R&D Engineer Synopsys, Inc.
Software Engineering Sunnyvale, CA
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-04 18:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-01 20:59 Extending Info-directory-list. There's got to be a better way Alan Mackenzie
2003-04-01 22:59 ` Oliver Scholz
2003-04-02 4:13 ` Eli Zaretskii
2003-04-03 21:31 ` Kevin Ryde
2003-04-04 18:18 ` David Masterson
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).