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: migrating from ido to icicles Date: Wed, 19 Dec 2012 14:41:13 -0800 Message-ID: <728806CAFD184E6582CE77D11D5802CB@us.oracle.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355956889 21309 80.91.229.3 (19 Dec 2012 22:41:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2012 22:41:29 +0000 (UTC) To: , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 19 23:41:44 2012 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 1TlSKc-0000N6-RP for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Dec 2012 23:41:43 +0100 Original-Received: from localhost ([::1]:41424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlSKP-0006uB-5y for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Dec 2012 17:41:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlSKI-0006tg-C0 for help-gnu-emacs@gnu.org; Wed, 19 Dec 2012 17:41:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlSKF-00061c-0w for help-gnu-emacs@gnu.org; Wed, 19 Dec 2012 17:41:22 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:45951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlSKE-00061D-QI for help-gnu-emacs@gnu.org; Wed, 19 Dec 2012 17:41:18 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qBJMfFaS015246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Dec 2012 22:41:16 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qBJMfF4n026359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Dec 2012 22:41:15 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qBJMfErE022336; Wed, 19 Dec 2012 16:41:15 -0600 Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 Dec 2012 14:41:14 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3eHTUbV0y5J7QWQuaZdn+VJ7Fj/AAD/Nyg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] 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:88237 Archived-At: > I'm trying to use icicles exclusively and not use ido anymore. This page might help in that regard, in general: http://www.emacswiki.org/emacs/Icicles_-_Ido_and_IswitchB > There's one sticking point left, and that's how icicles deals > with filename completion. > > The problem is with drilling down directory levels. It seems > to be that once completion is active, both TAB and the cycle > keys do the same thing. The only way to say "I accept the > currently highlighted directory candidate, drill down to > start completing the next one" is M-SPC. Actually, `M-TAB' does what you want here only because it does "word" completion, which also moves the cursor to the end of the completion. It is that cursor movement that switches from cycling back to completing. In Icicles, cycling fills the minibuffer with a candidate, which you can edit etc. normally. In this it is quite different from Ido, IswitchB, and Icomplete, which display candidates in the minibuffer but not as input to be edited directly. Icicles needs to know whether the input in the minibuffer is the result of cycling or of editing or completing. When you have been cycling, if you do something other than hit a cycling key (or a scrolling key etc.) then it cancels cycling - your action is taken as "editing" the cycled candidate. Repeating TAB (or S-TAB) cycles among the current candidates. And if one of those (filename) candidates is a directory name then it is handled just like the other, non-directory candidates: (a) cycling moves on from it to the next candidate, and (b) RET (or C-RET) visits that directory using Dired. IOW, a directory-name candidate is treated during cycling just like a file name. But you can complete without cycling or after cycling a bit: If your input matches only a unique directory name then TAB (or S-TAB) completes to that name. Then a second TAB (or S-TAB) uses that directory not as a candidate but as the base directory in which to complete. IOW, it shows you all the files in that directory as candidates. IOW, the contents of the minibuffer are interpreted differently depending on whether they are the result of completing or editing on the one hand, or cycling on the other hand. Cycling does not change the `default-directory' or the current set of candidates. Completion and editing can change both. So all you really need to do is to change from cycling to "editing", to get Icicles to interpret the current minibuffer content as a new starting point for file-name completion, i.e., in this case as the new `default-directory'. "Editing" really means doing pretty much anything other than cycling. Just moving the cursor, for instance. What users typically do to drill down through a directory that they have reached by cycling, is to hit `C-e' or `C-f' etc., and then hit TAB to complete the files in that directory. E.g.: C-x C-f con TAB TAB ... ; cycle until you get to CONTRIB/ C-e TAB ; complete in directory CONTRIB/ Or as I said, you can also not bother with cycling and just use completion. E.g.: C-x C-f cont TAB ; assuming only one match for that input Or include progressive completion. E.g.: C-x C-f c TAB M-SPC ib S-TAB ; complete prefix `c', then match `ib' > What I want is just for completion of filenames, for TAB to > only activate completion, and if it's already active, do what > M-SPC currently does. Leave cycling for keys bound > specifically for that purpose. Long ago Icicles used TAB and S-TAB only for completion, not also for cycling as now. If there were a demand for this it could be optional, but today it is not. If you want that behavior, replace `icicle-next-(prefix|apropos)-complete-cycles-p' with `nil' wherever its value is used in `icicles-mcmd.el'. (You still do have other keys that perform only cycling.) HTH.