From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#13602: 24.3.50; remove bindings for `icomplete-minibuffer-map' - make a separate mode Date: Thu, 07 Feb 2013 15:54:55 +0530 Message-ID: <87txpobevc.fsf@gmail.com> References: <65EEA895D8A0443A859A780AB233146E@us.oracle.com> <625A327B282C4C279837A7542B76E5C8@us.oracle.com> <87zjzk112u.fsf@gmail.com> <20DF11E25EE542A1A334DA1FDB79F77B@us.oracle.com> <87bobz7ajl.fsf@gmail.com> <87bobys6yc.fsf@mail.jurta.org> <87wquluiks.fsf@mail.jurta.org> <87txpon5mk.fsf@gmail.com> <87a9rgo959.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1360232748 8841 80.91.229.3 (7 Feb 2013 10:25:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2013 10:25:48 +0000 (UTC) Cc: 13602@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 07 11:26:09 2013 Return-path: Envelope-to: geb-bug-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 1U3OgC-0000AH-HR for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 11:26:08 +0100 Original-Received: from localhost ([::1]:53140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Oft-0001Ng-KU for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 05:25:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Ofp-0001IU-R8 for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 05:25:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3Ofm-0002Qm-PG for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 05:25:44 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3Ofm-0002Qi-Dn for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 05:25:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U3Oh4-0000hM-Fz for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 05:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Feb 2013 10:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13602 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13602-submit@debbugs.gnu.org id=B13602.13602328062662 (code B ref 13602); Thu, 07 Feb 2013 10:27:02 +0000 Original-Received: (at 13602) by debbugs.gnu.org; 7 Feb 2013 10:26:46 +0000 Original-Received: from localhost ([127.0.0.1]:40794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3Ogn-0000gt-Bn for submit@debbugs.gnu.org; Thu, 07 Feb 2013 05:26:45 -0500 Original-Received: from mail-pa0-f52.google.com ([209.85.220.52]:50089) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3Ogj-0000gk-Td for 13602@debbugs.gnu.org; Thu, 07 Feb 2013 05:26:43 -0500 Original-Received: by mail-pa0-f52.google.com with SMTP id fb1so1305696pad.25 for <13602@debbugs.gnu.org>; Thu, 07 Feb 2013 02:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=cDaN34rpj03FdQkXSK51XDpk595N+kJJwKNfQI1HCHs=; b=Zy8snmQLAUbM2LSGlmtTH1RvNEaveARGwXa2iAFj1KGV/O2oQUm0CJMJE1bAmgmbTg cOeHat98p9ZxzSASs+BKAuO/RJNKkxF92oYDzrewNGYIDNm2YZj0Wju0AKEfsFFqLZl1 KFXBU4c/ZSIMw5Syc7RBgiaImrVNOLjrjv6mheaWWuYh8IGPzSfUe9OZcGoE8YNW6F7Q sDNGPEomM6S3k6ql1aOba/29muXCx+2KdHGOCBZcdv6cn96fOm2BIvNj60CAnRDd8ERE f9dvb69rnJnGkhbqyfqNTSq8trPol9dPzqL5IKJ5rj4Vus4T157wL2VXhQiWWhA6bWGO BXFQ== X-Received: by 10.66.86.71 with SMTP id n7mr4241971paz.77.1360232719866; Thu, 07 Feb 2013 02:25:19 -0800 (PST) Original-Received: from debian-6.05 ([101.62.22.236]) by mx.google.com with ESMTPS id y9sm44892067paw.1.2013.02.07.02.25.14 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 07 Feb 2013 02:25:17 -0800 (PST) In-Reply-To: <87a9rgo959.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 07 Feb 2013 09:50:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70803 Archived-At: --=-=-= Content-Type: text/plain Juri Linkov writes: >> `completion-all-sorted-completions' prefers recent input history. Once >> you have `gnus-read-ephemeral-emacs-bug-group' in the command history, >> it is likely to be the first of the few completions which you can pick >> with one or more C-s-es. >> >> One doesn't need to rely on traditional "C-r" exclusively to accomplish >> the above work flow. > > IIUC, it matches only prefixes, whereas traditional Isearch `C-r' > can also match in the middle of the command name in the history. > > When I tried now `icomplete-backward-completions' currently bound to `C-r', > I discovered that it is broken. It fails with the error: > > Debugger entered--Lisp error: (wrong-type-argument listp 0) > cdr(0) > (setcdr last-but-one (cdr last)) > > The full test case: > > 0. emacs -Q > 1. M-x icomplete-mode RET > 2. M-x icomplete-m C-r --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: icomplete.el.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-07 08:50:04 +0000 +++ lisp/ChangeLog 2013-02-07 10:11:32 +0000 @@ -1,3 +1,8 @@ +2013-02-07 Jambunathan K + + * icomplete.el (icomplete-forward-completions) + (icomplete-backward-completions): Handle corner case (bug#13602). + 2013-02-07 Michael Albinus * vc/vc-hooks.el (vc-find-file-hook): `buffer-file-truename' can === modified file 'lisp/icomplete.el' --- lisp/icomplete.el 2013-01-04 08:20:49 +0000 +++ lisp/icomplete.el 2013-02-07 10:01:09 +0000 @@ -167,8 +167,9 @@ Second entry becomes the first and can b (interactive) (let* ((comps (completion-all-sorted-completions)) (last (last comps))) + (when comps (setcdr last (cons (car comps) (cdr last))) - (completion--cache-all-sorted-completions (cdr comps)))) + (completion--cache-all-sorted-completions (cdr comps))))) (defun icomplete-backward-completions () "Step backward completions by one entry. @@ -178,7 +179,7 @@ Last entry becomes the first and can be (let* ((comps (completion-all-sorted-completions)) (last-but-one (last comps 2)) (last (cdr last-but-one))) - (when last + (when (consp last) ; Atleast two elements in comps (setcdr last-but-one (cdr last)) (push (car last) comps) (completion--cache-all-sorted-completions comps)))) --=-=-= Content-Type: text/plain > Does this mean that other users of `icomplete-mode' like me disabled > `icomplete-mode' in their .emacs after it began overriding Isearch keys, > so this feature remained untested and the bug remained unnoticed > for the long time (2 months)? I won't be surprised if this is > the real reason, because traditional Isearch C-s and C-r is useful > in the minibuffer. Interesting to learn that disabling of `icomplete-mode' might have been an un-intentional side-effect rather than a deliberate act. Interesting to see how this exchange is developing. > OTOH, I believe the users of `icomplete-mode' might like the new feature > provided by the new commands `icomplete-forward-completions' and > `icomplete-backward-completions' only when it leaves intact the > traditional Isearch keybindings C-s and C-r. Let's have best of both worlds rather than label the unknown and strange world as hell. > Let's face the root of the problem: abusing C-s and C-r keys in ido was > a poor choice in the first place that paved the road to future > conflicts. Fair statement. > Are there know alternatives to C-s and C-r among the ido users? I use C-s and C-r myself. > I see that ido.el mentions the right and left arrow keys. > Could they be used with some modifiers? This would mean that my right hand is leaving the home row. Any suggestions ... ISearch map is really a big rock that leaves little room for even pebbles... --=-=-=--