[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] patch to add new link type "infoi" that leverages Info-index com
From: |
Nicolas Goaziou |
Subject: |
Re: [O] patch to add new link type "infoi" that leverages Info-index command |
Date: |
Mon, 10 Nov 2014 10:17:22 +0100 |
Richard Kim <address@hidden> writes:
> Thanks for your feedback. I agree that using the same link type is better.
> Hence I took an alternate approach as detailed in the attached patch.
> Enhanced org-info-follow-link to attempt index lookup if node lookup fails.
> Following is my check in message found in the attached patch:
Thanks. I think it is better, indeed.
Some minor comments follow.
> Subject: [PATCH] Enhanced org-info-follow-link to attempt index lookup if node
> lookup fails.
>
> Info index is almost always finer grain than info nodes. For example
> with this change, [[info:libc#close]] brings up not only
> "(libc)Opening and Closing Files" info node, but also place the cursor
> on the line that documents "close" function within the node. This is
> done by looking up "close"in the index upon failing to find a node
> named "close". Hence one can now link function, variable and other
> names that are in the index rather than being limited to info node
> names. Typically there are far more index items than there are node
> names. For example libc manual has about 700 nodes, but over
> 4000 concept, type, function, and variables index items.
You need to reformat a bit the commit message, according to Org mode
rules (see <http://orgmode.org/worg/org-contribute.html#unnumbered-10>).
E.g.,
--8<---------------cut here---------------start------------->8---
[PATCH] org-info: info links may attempt index lookup
* lisp/org-info.el (org-info-follow-link): Attempt index lookup if node
lookup fails.
* doc/org.texi (External links): Update info links.
Info index is almost always...
TINYCHANGE
--8<---------------cut here---------------end--------------->8---
You may also want to update "orgguide.texi".
> + ;; If nodename-or-index is invalid node name, then look it
> + ;; up in the index.
> + (condition-case nil
> + (Info-find-node filename nodename-or-index)
> + (user-error (Info-find-node filename "Top")
> + (condition-case nil
> + (Info-index nodename-or-index)
> + (user-error (message "Could not find '%s' node or index
> entry."
> + nodename-or-index))))))
`message' is not needed. Also, error message shouldn't end on a full
stop:
(user-error "Could not find '%s' node or index entry" nodename-or-index)
> (message "Could not open: %s" name)))
Not directly related to your patch, but shouldn't it be
(user-error "Could not open: %s" name)
Regards,