From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Icicles + icomplete apropos Date: Wed, 19 Nov 2014 23:56:34 -0800 (PST) Message-ID: <9acffafb-182d-440b-8a0c-1d5dafb4828c@default> References: <546D7506.5090202@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1416470241 6973 80.91.229.3 (20 Nov 2014 07:57:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 07:57:21 +0000 (UTC) To: Nikolay Kudryavtsev , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 20 08:57:13 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XrMc4-0007om-8y for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 08:57:12 +0100 Original-Received: from localhost ([::1]:34020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrMc3-0000XB-Tz for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Nov 2014 02:57:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrMbi-0000O1-Nc for help-gnu-emacs@gnu.org; Thu, 20 Nov 2014 02:56:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrMba-00022H-Sb for help-gnu-emacs@gnu.org; Thu, 20 Nov 2014 02:56:50 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:37618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrMba-000221-Lk for help-gnu-emacs@gnu.org; Thu, 20 Nov 2014 02:56:42 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id sAK7uekN012427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Nov 2014 07:56:40 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id sAK7ucBP024222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 20 Nov 2014 07:56:39 GMT Original-Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id sAK7ubqW027799; Thu, 20 Nov 2014 07:56:37 GMT In-Reply-To: <546D7506.5090202@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101073 Archived-At: > With the release of 24.4 iswitchb got marked as obsolete. So now I > have to think about how to replace it in my setup. > New icomplete is fine, but I was unable to make it work with icicles > - when icy-mode is enabled, icomplete suddenly matches only on > predicate, not on substring. >=20 > Alternatively is there a way to specify apropos as the initial > completion method in icicles? And only for buffers. So I > would get the same iswitchb behavior without the need to press > S-Tab. I'll give you a quick reply now, but you can follow up with me off list later, if you like. I'm not sure I understand completely what you say. I'm guessing you meant "prefix", not "predicate", for instance. 1. As far as I know, you can, if you want, continue to use IswitchB with Emacs 25... Deprecated does not mean desupported. IswitchB is still available as part of the GNU Emacs distribution, and if and when it no longer is, it will continue to be available elsewhere (e.g. Emacs Wiki), I'm sure. 2. In Icicle mode, Icomplete matching reflects the current Icicle completion mode. The default completion mode is controlled by option `icicle-default-cycling-mode'. The default value of this option is `prefix', meaning "prefix" completion (but see below, as this term can in fact include substring completion). TAB completion is another term for prefix completion. If you set or bind option `icicle-default-cycling-mode' to `apropos' then Icicles completion defaults to apropos completion, and so does Icomplete behavior. That means that Icomplete with Icicles will use regexp completion (which includes substring completion). Option `icicle-default-cycling-mode' affects Icicles cycling using keys `up' and `down' (you do not need to hit `TAB' or `S-TAB' first, to cycle). For example, `M-x foo', then `down down down...': (defun foo () (interactive) (let* ((icicle-default-cycling-mode 'apropos)) (message "You chose: %s" (completing-read "Foo: " obarray)))) And you can of course do that for a command that does buffer-name completion: (defun my-icicle-buffer ... And if you want to see completions in `*Completions*' from the outset then you can set or bind option `icicle-show-Completions-initially-flag' to non-nil. 3. Besides having Icicles start out using apropos completion (which corresponds to `S-TAB'), you can get substring completion with `TAB', as an Icicles "prefix" completion method, if the current Icicles TAB completion method is `vanilla', and if vanilla Emacs completion uses substring matching. That is, what Icicles calls "prefix" completion includes, as one of the "prefix" completion methods, `vanilla' Emacs completion, and that can include substring completion (but not regexp completion).=20 For that, vanilla option `completion-styles' needs to include `substring', or else vanilla option `completion-category-overrides' needs to specify `substring' for the particular kind of object currently being completed (which it does, by default, for buffer names). So another way to get Icomplete to match substrings with Icicles is to use "prefix" (i.e., `TAB') completion, but with `vanilla' as the current prefix completion method (depending on the values of the vanilla options mentioned). You can cycle the current Icicles "prefix" completion method on the fly, using `C-(' during completion. For vanilla Emacs completion to be used for this, cycle to `vanilla'. You can choose what the prefix completion methods are and what their cycling order is, by customizing option `icicle-TAB-completion-methods'. 4. If you use Icomplete mode, you might also want to try library `icomplete+.el'. http://www.emacswiki.org/IcompleteMode#IcompletePlus