all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Substring matching for info index command
Date: Sun, 07 Dec 2014 11:02:55 -0500	[thread overview]
Message-ID: <jwvvblnqwoy.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: loom.20141207T131109-263@post.gmane.org

> I've never used the builtin completion-styles, because I 
> use other completion packages, but I thought I give it a try
> and try substring matching for the info index command.

Info should setup a "completion category" so you could configure this
via `completion-category-overrides'.  Please M-x report-emacs-bug.

> I added this advice to the command which wraps it in a
> let and sets completion-styles to substring:

> (defadvice Info-index (around my-Info-index activate)
>   (let ((completion-styles '(substring)))
>     ad-do-it))

That affects the body of the function (i.e. the code that, given
a query, will look for the corresponding place in the index), whereas
you want to tweak the way the interactive-spec works.

You might like to try something like (guaranteed 100% untested):

   (advice-add 'Info-index :before
               (lambda (&rest _)
                 (interactive
                   (lambda (spec)
                     (let ((completion-styles '(substring)))
                       (advice-eval-interactive-spec spec))))
                 nil))
                             
-- Stefan




      parent reply	other threads:[~2014-12-07 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-07 12:15 Substring matching for info index command Tom
2014-12-07 14:06 ` Drew Adams
2014-12-07 14:16   ` Tom
2014-12-07 14:56     ` Drew Adams
2014-12-07 15:56 ` Eli Zaretskii
2014-12-07 16:02 ` Stefan Monnier [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvblnqwoy.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.