unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* info-lookup delay on missing file
@ 2003-08-28  0:08 Kevin Ryde
  2003-08-28  7:13 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2003-08-28  0:08 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

When an info file specified in info-lookup-alist doesn't exit,
info-lookup has a message and sit-for every time it goes across that
file in doing a lookup.

For instance in sh-mode, diff.info is after coreutils.info.  If you
don't have coreutils.info and you try "C-h C-i diff" there's a message
and delay

	Cannot access Info node (coreutils)Index

every time before going on to bring up the diff manual.  During the
delay an unrelated index is shown in the info window, which I also
think is quite disconcerting.

I'd like to propose quietly ignoring such inaccessible files,

        * info-look.el (info-lookup): Don't sit-for and message on
        inaccessible info file.  This was done on every lookup going past that
        file's entry and was too annoying.  Leave it to happen just once on
        building the cache.

There's still a message while first loading up info-lookup-cache,
ie. the first lookup in a mode, hopefully that's enough of a warning.

I struck this when appending further manuals to the c-mode setups.  I
don't have a termcap.info for that entry in the default setups and so
got a delay on every lookup of one of my additions.

Obviously it's not too hard to delete info-lookup-alist bits for
things you doesn't have, but it seems to me friendlier to give just
one warning and thereafter ignore missing stuff.



[-- Attachment #2: info-look.el.message.diff --]
[-- Type: text/plain, Size: 656 bytes --]

*** info-look.el.~1.34.~	Thu Jan  1 10:00:01 1970
--- info-look.el	Thu Aug 21 14:53:47 2003
*************** (defun info-lookup (topic item mode)
*** 351,360 ****
  		  (progn
  		    (Info-goto-node node)
  		    (setq doc-found t))
! 		(error
! 		 (message "Cannot access Info node %s" node)
! 		 (sit-for 1)
! 		 nil))
  	  (condition-case nil
  	      (progn
                  ;; Don't use Info-menu, it forces case-fold-search to t
--- 351,357 ----
  		  (progn
  		    (Info-goto-node node)
  		    (setq doc-found t))
! 		(error nil))
  	  (condition-case nil
  	      (progn
                  ;; Don't use Info-menu, it forces case-fold-search to t

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

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

* Re: info-lookup delay on missing file
  2003-08-28  0:08 info-lookup delay on missing file Kevin Ryde
@ 2003-08-28  7:13 ` Eli Zaretskii
  2003-08-29 22:48   ` Kevin Ryde
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2003-08-28  7:13 UTC (permalink / raw)
  Cc: emacs-devel

> From: Kevin Ryde <user42@zip.com.au>
> Date: Thu, 28 Aug 2003 10:08:00 +1000
> 
> For instance in sh-mode, diff.info is after coreutils.info.  If you
> don't have coreutils.info and you try "C-h C-i diff" there's a message
> and delay
> 
> 	Cannot access Info node (coreutils)Index
> 
> every time before going on to bring up the diff manual.  During the
> delay an unrelated index is shown in the info window, which I also
> think is quite disconcerting.
> 
> I'd like to propose quietly ignoring such inaccessible files,
> 
>         * info-look.el (info-lookup): Don't sit-for and message on
>         inaccessible info file.  This was done on every lookup going past that
>         file's entry and was too annoying.  Leave it to happen just once on
>         building the cache.

What happens if _none_ of the files in info-lookup-alist exist?  Does
the user get any messages with your change, or will Emacs simply do
nothing visible (quietly)?  If the latter, I'm not sure the proposed
behavior is a good idea.

Btw, one alternative is to be less talkative, but not to omit the
information altogether, either: put the message into *Messages*, but
don't display it and don't sit-for.

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

* Re: info-lookup delay on missing file
  2003-08-28  7:13 ` Eli Zaretskii
@ 2003-08-29 22:48   ` Kevin Ryde
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2003-08-29 22:48 UTC (permalink / raw)


"Eli Zaretskii" <eliz@elta.co.il> writes:
>
> What happens if _none_ of the files in info-lookup-alist exist?  Does
> the user get any messages with your change, or will Emacs simply do
> nothing visible (quietly)?

You get "Not documented as a symbol" on any lookup.  This is unchanged
actually, since if there's no manuals at all available then nothing
goes into the cache.

The bad case is when there's a missing manual in the middle of the
list, every lookup into a manual past that gets the message and delay.

> Btw, one alternative is to be less talkative, but not to omit the
> information altogether, either: put the message into *Messages*, but
> don't display it and don't sit-for.

The sit-for is the annoying bit.  I don't know that a message every
time adds much, but it doesn't hurt.

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

end of thread, other threads:[~2003-08-29 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-28  0:08 info-lookup delay on missing file Kevin Ryde
2003-08-28  7:13 ` Eli Zaretskii
2003-08-29 22:48   ` Kevin Ryde

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).