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#12638: 24.2.50; FR: Some suggestions for icomplete-mode Date: Tue, 04 Dec 2012 23:02:53 +0530 Message-ID: <874nk1iuyi.fsf@gmail.com> References: <87391ieck9.fsf@gmail.com> <87624nsjes.fsf@gmail.com> <87d2yq9dvi.fsf@gmail.com> <877goxn8bw.fsf@gmail.com> <87624hu77x.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354642255 18775 80.91.229.3 (4 Dec 2012 17:30:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 17:30:55 +0000 (UTC) Cc: 12638@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 18:31:07 2012 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 1TfwKf-0000Ko-Iu for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 18:30:57 +0100 Original-Received: from localhost ([::1]:34891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfwKT-0008Ej-QF for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 12:30:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfwKM-0007wv-8c for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 12:30:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfwKH-0008QI-N7 for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 12:30:37 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfwKH-0008QC-JR for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 12:30:33 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TfwMg-00073i-3g for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 12:33: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: Tue, 04 Dec 2012 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12638 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12638-submit@debbugs.gnu.org id=B12638.135464236027105 (code B ref 12638); Tue, 04 Dec 2012 17:33:02 +0000 Original-Received: (at 12638) by debbugs.gnu.org; 4 Dec 2012 17:32:40 +0000 Original-Received: from localhost ([127.0.0.1]:53505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfwMJ-000737-MV for submit@debbugs.gnu.org; Tue, 04 Dec 2012 12:32:40 -0500 Original-Received: from mail-pb0-f44.google.com ([209.85.160.44]:43582) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfwMH-00072z-1G for 12638@debbugs.gnu.org; Tue, 04 Dec 2012 12:32:38 -0500 Original-Received: by mail-pb0-f44.google.com with SMTP id uo1so2824107pbc.3 for <12638@debbugs.gnu.org>; Tue, 04 Dec 2012 09:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=6HJjVZH9hmbRrS2S5jwH07dWAWhQrFBFexQJ4sOw1II=; b=nnx6gdYVJVmm3ztUrDuVQRQ2L62Z/7mbB5TCn+f0R4QMBiMgoA3TP6SKYvcjOyjtv1 OqH2GtqS0QGanVmbk2uNvNA+MsrW0AmwrcgZgyKGfyD8Xvm/lhC4cVt7R87ZfCuLXccz KUJUV9SVpaEfXA8hLfMoxRCVrwvJE+7NBbMdC4ya7hS4FXwAQV37RoTpl2yyFz7C3I7y 6zUSngKXTJ0wFU6dCJBp/rYVhRCxO2UxepkHEhpJT+W0U9eXZnA+ma3qTHKstQ8WO/B4 oR62y0maE/4ONH7KVGJZhV2TIa9O3CL4prB95LX7u8X11IVfvJsE9SCw5voASOUn8fH/ aa2A== Original-Received: by 10.69.0.8 with SMTP id au8mr40917161pbd.58.1354642207010; Tue, 04 Dec 2012 09:30:07 -0800 (PST) Original-Received: from debian-6.05 ([101.63.152.19]) by mx.google.com with ESMTPS id sz6sm1305912pbc.52.2012.12.04.09.30.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Dec 2012 09:30:06 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Tue, 04 Dec 2012 12:14:33 -0500") 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:67904 Archived-At: Stefan Monnier writes: >> The problem is in the displayed string. Why not push "" to prospects >> when most-is-exact. I think completions are cycling but the displayed >> string is not. > > The problem is that we want the display to indicate that the current > field is an exact match. Currently this is visible thanks to the "{| ...}". > So if we want to let the empty string move elsewhere (and hence > potentially off-screen), we need another way to indicate that we have an > exact match. RET pushes the minibuffer contents. C-j pushes the head of the list. I think appending, "[Complete, but not unique]????" should serve as a cue that one can simply RET. >> Is removal of leading space really necessary? > > No, it just makes a lot of sense in the current situation. Note that if > we let the empty string appear elsewhere, we may also want to use > "a | | b" instead of "a | | b", tho it's clearly less important. This could be an aside. I never could come up with a sensible explanation for magic number 5 down below. ,---- | (determ (unless (or (eq t compare) (eq t most-try) | (= (setq compare (1- (abs compare))) | (length most))) | (concat open-bracket | (cond | ((= compare (length name)) | ;; Typical case: name is a prefix. | (substring most compare)) | ,---- | | ((< compare 5) most) | `---- | | (t (concat "..." (substring most compare)))) | close-bracket))) `---- > Stefan