From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 12456@debbugs.gnu.org
Subject: bug#12456: 24.2.50; Completion in `Info-goto-node' (cross-manual jump)
Date: Tue, 18 Sep 2012 23:03:21 +0300 [thread overview]
Message-ID: <87a9wn85fa.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvpq5je0bq.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 18 Sep 2012 12:57:22 -0400")
>> * "(elisp)<TAB>" completes to all nodes in the elisp manual.
>
> Yes, that's the part that's not yet implemented. Patch welcome,
This can be implemented by this patch. The remaining problem is
that it's too slow because it doesn't cache completions of non-current
manuals. Perhaps `Info-build-node-completions' should use `Info-toc-nodes'
that caches node names from all visited manuals.
=== modified file 'lisp/info.el'
--- lisp/info.el 2012-09-13 22:01:45 +0000
+++ lisp/info.el 2012-09-18 20:02:43 +0000
@@ -1778,12 +1778,23 @@ (defun Info-read-node-name-1 (string pre
(substring string 1)
predicate
code))
- ;; If a file name was given, then any node is fair game.
- ((string-match "\\`(" string)
- (cond
- ((eq code nil) string)
- ((eq code t) nil)
- (t t)))
+ ;; If a file name was given, complete nodes in the file.
+ ((string-match "\\`([^)]+)" string)
+ (let ((file (match-string 0 string))
+ (node (substring string (match-end 0))))
+ (completion-table-with-context
+ file
+ (apply-partially
+ (lambda (string pred action)
+ (complete-with-action
+ action
+ (with-temp-buffer
+ (Info-mode)
+ (Info-goto-node (concat file "Top"))
+ (Info-build-node-completions)
+ Info-current-file-completions)
+ string pred)))
+ node predicate code)))
;; Otherwise use Info-read-node-completion-table.
(t (complete-with-action
code Info-read-node-completion-table string predicate))))
next prev parent reply other threads:[~2012-09-18 20:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 17:59 bug#12456: 24.2.50; Completion in `Info-goto-node' (cross-manual jump) Dani Moncayo
2012-09-16 19:39 ` Dani Moncayo
2012-09-17 21:12 ` Stefan Monnier
2012-09-18 6:23 ` Eli Zaretskii
2012-09-18 12:22 ` Stefan Monnier
2012-09-18 13:52 ` Eli Zaretskii
2012-09-18 14:26 ` Dani Moncayo
2012-09-18 16:57 ` Stefan Monnier
2012-09-18 20:03 ` Juri Linkov [this message]
2012-12-15 15:30 ` Juri Linkov
2012-12-27 20:42 ` Juri Linkov
2012-12-27 21:37 ` Dani Moncayo
2012-12-27 21:57 ` Juri Linkov
2012-12-28 23:57 ` Juri Linkov
2012-12-29 0:24 ` Dani Moncayo
2012-12-29 21:59 ` Juri Linkov
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9wn85fa.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=12456@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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.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).