GNU bug report logs -
#10771
TAB completion for info-display-manual
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Thu, 9 Feb 2012 06:38:01 UTC
Severity: wishlist
Tags: patch
Found in version 24.0.93
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> At least this is not worse than the original command that reads a
>> manual name without completion.
>
> I didn't say it was worse. I asked how it was better.
How about adding existing Info buffers' manual names to the completion
table too, like the following?
=== modified file 'lisp/info.el'
*** lisp/info.el 2012-12-02 06:41:22 +0000
--- lisp/info.el 2012-12-03 06:55:15 +0000
***************
*** 5105,5113 ****
(progn
(info-initialize)
(completing-read "Manual name: "
! (apply-partially 'Info-read-node-name-2
! Info-directory-list
! (mapcar 'car Info-suffix-list))
nil t))))
(let ((blist (buffer-list))
(manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
--- 5105,5111 ----
(progn
(info-initialize)
(completing-read "Manual name: "
! (info--manual-names)
nil t))))
(let ((blist (buffer-list))
(manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
***************
*** 5126,5131 ****
--- 5124,5143 ----
(info (Info-find-file manual)
(generate-new-buffer-name "*info*")))))
+ (defun info--manual-names ()
+ (let (names)
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when (and (eq major-mode 'Info-mode)
+ (stringp Info-current-file))
+ (push (file-name-sans-extension
+ (file-name-nondirectory Info-current-file))
+ names))))
+ (delete-dups (append names
+ (apply-partially 'Info-read-node-name-2
+ Info-directory-list
+ (mapcar 'car Info-suffix-list))))))
+
(provide 'info)
;;; info.el ends here
This bug report was last modified 12 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.