unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: emacs18@gmail.com
To: 13365@debbugs.gnu.org
Subject: bug#13365: 24.3.50; info node name completion busted
Date: Sat, 05 Jan 2013 09:53:38 -0800	[thread overview]
Message-ID: <qtmhamvbjod.fsf@gmail.com> (raw)

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	other threads:[~2013-01-05 17:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05 17:53 emacs18 [this message]
2013-01-05 22:39 ` bug#13365: 24.3.50; info node name completion busted Juri Linkov
2013-01-06  3:58   ` emacs18
2013-01-08  0:12     ` 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=qtmhamvbjod.fsf@gmail.com \
    --to=emacs18@gmail.com \
    --cc=13365@debbugs.gnu.org \
    /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).