all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Calling Info-find-file from other parts of Emacs
@ 2006-06-11 12:51 Ralf Angeli
  2006-06-11 19:26 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Angeli @ 2006-06-11 12:51 UTC (permalink / raw)


Hi,

AUCTeX currently uses `Info-find-file' for checking if certain info
files are available.  There are two problems with that.

First, the function is not autoloaded.  That's why AUCTeX autoloads it
manually, which of course fails with Emacs 21 where the function is
not present and which will break should the function ever be moved to
another file.  (I think, I can code around that problem.)  So maybe
the function can be autoloaded?

Second, if the function is called before the canonical entry point
`info' (or `Info-goto-node' for that matter) is called, the variable
`Info-directory-list' will not be initialized and search for any file
will fail.  Could initialization of `Info-directory-list' be done by
`Info-find-file' as well, or maybe even by loading info.el?

With the above changes the function could be used reliably by other
parts of Emacs.  Does this make sense or is there another way of
checking for the availability of info files?

-- 
Ralf

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-11 12:51 Calling Info-find-file from other parts of Emacs Ralf Angeli
@ 2006-06-11 19:26 ` Eli Zaretskii
  2006-06-11 22:03   ` Ralf Angeli
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2006-06-11 19:26 UTC (permalink / raw)
  Cc: emacs-devel

> From: Ralf Angeli <angeli@caeruleus.net>
> Date: Sun, 11 Jun 2006 14:51:00 +0200
> 
> With the above changes the function could be used reliably by other
> parts of Emacs.  Does this make sense or is there another way of
> checking for the availability of info files?

One such way is `(info "(foobar)Top")', but I'm not sure it's what you
want.

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-11 19:26 ` Eli Zaretskii
@ 2006-06-11 22:03   ` Ralf Angeli
  2006-06-11 22:50     ` Kevin Ryde
  0 siblings, 1 reply; 9+ messages in thread
From: Ralf Angeli @ 2006-06-11 22:03 UTC (permalink / raw)
  Cc: emacs-devel

* Eli Zaretskii (2006-06-11) writes:

>> From: Ralf Angeli <angeli@caeruleus.net>
>> Date: Sun, 11 Jun 2006 14:51:00 +0200
>> 
>> With the above changes the function could be used reliably by other
>> parts of Emacs.  Does this make sense or is there another way of
>> checking for the availability of info files?
>
> One such way is `(info "(foobar)Top")', but I'm not sure it's what you
> want.

Ideally it should not open an info buffer.  I'll have to check if it
will be visible in case it is killed again immediately.

-- 
Ralf

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-11 22:03   ` Ralf Angeli
@ 2006-06-11 22:50     ` Kevin Ryde
  2006-06-13 13:33       ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Ryde @ 2006-06-11 22:50 UTC (permalink / raw)
  Cc: Ralf Angeli

Ralf Angeli <angeli@caeruleus.net> writes:
>
> Ideally it should not open an info buffer.  I'll have to check if it
> will be visible in case it is killed again immediately.

Creating and then killing a buffer is what I ended up with for
`info-xref-goto-node-p' in info-xref.el.  Not too pretty, but it uses
`Info-goto-node' the same way a user or whatever will.

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-11 22:50     ` Kevin Ryde
@ 2006-06-13 13:33       ` Juri Linkov
  2006-06-16  0:13         ` Kevin Ryde
  0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2006-06-13 13:33 UTC (permalink / raw)
  Cc: angeli, emacs-devel

>> Ideally it should not open an info buffer.  I'll have to check if it
>> will be visible in case it is killed again immediately.
>
> Creating and then killing a buffer is what I ended up with for
> `info-xref-goto-node-p' in info-xref.el.  Not too pretty, but it uses
> `Info-goto-node' the same way a user or whatever will.

Does this restore the old window configuration when
same-window-regexps doesn't contain "*info*"?

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-13 13:33       ` Juri Linkov
@ 2006-06-16  0:13         ` Kevin Ryde
  2006-06-21 18:06           ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Ryde @ 2006-06-16  0:13 UTC (permalink / raw)
  Cc: angeli, emacs-devel

Juri Linkov <juri@jurta.org> writes:
>
> Does this restore the old window configuration when
> same-window-regexps doesn't contain "*info*"?

Yes, I think so.  It uses the whole big save-window-excursion to
hopefully defeat whatever Info-goto-node wants to do.

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-16  0:13         ` Kevin Ryde
@ 2006-06-21 18:06           ` Stefan Monnier
  2006-06-24 23:48             ` Kevin Ryde
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2006-06-21 18:06 UTC (permalink / raw)
  Cc: Juri Linkov, angeli, emacs-devel

>> Does this restore the old window configuration when
>> same-window-regexps doesn't contain "*info*"?

> Yes, I think so.  It uses the whole big save-window-excursion to
> hopefully defeat whatever Info-goto-node wants to do.

Doesn't help if displaying the buffer caused a new dedicated frame to be
created (even worse if the window manager requires the user to manually
place new frames).  If you don't want to display a buffer, then please, just
don't display it: trying to undisplay it after the fact will always fail in
some circumstance.


        Stefan "who uses just this kind of config"

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-21 18:06           ` Stefan Monnier
@ 2006-06-24 23:48             ` Kevin Ryde
  2006-07-02 15:57               ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Ryde @ 2006-06-24 23:48 UTC (permalink / raw)


Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> Doesn't help if displaying the buffer caused a new dedicated frame to be
> created

Seems like that case works.

> (even worse if the window manager requires the user to manually
> place new frames).

Ah, not sure about that case.

> If you don't want to display a buffer, then please, just don't
> display it:

Yes, point taken, but as a way of not having it get intimate with the
details of info.el it's not too terrible.

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

* Re: Calling Info-find-file from other parts of Emacs
  2006-06-24 23:48             ` Kevin Ryde
@ 2006-07-02 15:57               ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2006-07-02 15:57 UTC (permalink / raw)
  Cc: emacs-devel

>> Doesn't help if displaying the buffer caused a new dedicated frame to be
>> created
> Seems like that case works.

"Seems like" is the operative word here.

>> (even worse if the window manager requires the user to manually
>> place new frames).
> Ah, not sure about that case.

Trust me, I'm using exactly such a config.  These problems are endemic (tho
it's been improved over time as I bump into them and fix them).

>> If you don't want to display a buffer, then please, just don't
>> display it:
> Yes, point taken, but as a way of not having it get intimate with the
> details of info.el it's not too terrible.

Please change info.el instead.


        Stefan

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

end of thread, other threads:[~2006-07-02 15:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-11 12:51 Calling Info-find-file from other parts of Emacs Ralf Angeli
2006-06-11 19:26 ` Eli Zaretskii
2006-06-11 22:03   ` Ralf Angeli
2006-06-11 22:50     ` Kevin Ryde
2006-06-13 13:33       ` Juri Linkov
2006-06-16  0:13         ` Kevin Ryde
2006-06-21 18:06           ` Stefan Monnier
2006-06-24 23:48             ` Kevin Ryde
2006-07-02 15:57               ` Stefan Monnier

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.