unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 12456@debbugs.gnu.org
Subject: bug#12456: 24.2.50; Completion in `Info-goto-node' (cross-manual jump)
Date: Tue, 18 Sep 2012 08:22:47 -0400	[thread overview]
Message-ID: <jwvehlz5xym.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83sjaf26jt.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 18 Sep 2012 09:23:18 +0300")

>> IIRC the core of the problem is that Info's completion table does not
>> (yet) know how to do completion after something like "(elisp)", so it
>> basically returns some "dummy" completion data (because the way
>> completion tables are defined currently, they have no way to say "I
>> don't know").

> Can the completion tables say no completion candidates at all?  That
> would be the best short-term solution; the stand-alone Info reader
> does just that.

So that we always get a [No completions] message?
We can try.  It's all decided in the following three lines of
Info-read-node-name-1:

   ((string-match "\\`(" string)
    (cond
     ((eq code nil) string)
     ((eq code t) nil)
     (t t)))

As long as we don't know the actual list of nodes, it's important to
return non-nil when `code' is `lambda': that's the `test-completion'
case, which determines whether RET will accept the user's input since
the completion is called with `require-match'.
     
>> So there are 2 ways to fix the above problem:
>> - Extend minibuffer.el so a completion table return "don't know" (at
>> which point it could put a message like " [No completion info]").
>> - Extend info.el so that it does provide actual completion by opening up
>> the "elisp" info file and gathering the corresponding node names.
> The latter sounds like the best long-term solution to me.

Agreed.

> Of course, next we will see a bug report with "g (eli TAB"...

Try it: that one already works.


        Stefan





  reply	other threads:[~2012-09-18 12:22 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 [this message]
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
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=jwvehlz5xym.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12456@debbugs.gnu.org \
    --cc=eliz@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).