From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Richard Kim <emacs18@gmail.com>
Cc: Emacs-orgmode@gnu.org
Subject: Re: patch to add new link type "infoi" that leverages Info-index command
Date: Mon, 10 Nov 2014 10:17:22 +0100 [thread overview]
Message-ID: <87y4rjqusd.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFq8O8sWXQ93irE+S1o1oWa-PVGhPe_DB-a=eFsfgUWCx_QZCw@mail.gmail.com> (Richard Kim's message of "Sun, 9 Nov 2014 19:58:40 -0800")
Richard Kim <emacs18@gmail.com> 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,
next prev parent reply other threads:[~2014-11-10 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-01 18:23 patch to add new link type "infoi" that leverages Info-index command Richard Kim
2014-11-06 18:41 ` Nicolas Goaziou
2014-11-10 3:58 ` Richard Kim
2014-11-10 9:17 ` Nicolas Goaziou [this message]
2014-11-15 18:46 ` Richard Y. Kim
2014-11-15 23:21 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4rjqusd.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=Emacs-orgmode@gnu.org \
--cc=emacs18@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).