bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13365: 24.3.50; info node name completion busted


From: emacs18
Subject: bug#13365: 24.3.50; info node name completion busted
Date: Sat, 05 Jan 2013 09:53:38 -0800

I use latest bzr trunk emacs that I compiled on linux.

Following is something I have done going back to emacs 18; launch
emacs, start info brower via C-h i, then type "g" to call
Info-goto-node, type "(emacs)" followed by RETURN.

Above no longer works.  Why?  Because we now have to use proper info
node name, i.e., I now have to type "(emacs)Top" instead of "(emacs)".
This is quite annoying to me.  IMHO a feature that has been around for
over 25 years is now busted.

This bug was introduced by Juri Linkov on Dec 27, 2012 via trunk
change set 11354.  The difff chunk in question is shown below.

I think this should be changed so that node names such as "(emacs)" is
allowed and interpreted same as if it was "(emacs)Top" as emacs has
done for over 25 years.


=== modified file 'lisp/info.el'
--- lisp/info.el        2012-12-08 23:12:08 +0000
+++ lisp/info.el        2012-12-27 20:42:02 +0000
@@ -1771,12 +1775,20 @@
      (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 ((file0 (match-string 0 string))
+         (file1 (match-string 1 string))
+         (node (substring string (match-end 0))))
+      (completion-table-with-context
+       file0
+       (apply-partially
+       (lambda (string pred action)
+         (complete-with-action
+          action
+          (Info-build-node-completions (Info-find-file file1))
+          string pred)))
+       node predicate code)))
    ;; Otherwise use Info-read-node-completion-table.
    (t (complete-with-action
        code Info-read-node-completion-table string predicate))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]