From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: completion-auto-help Date: Fri, 11 Nov 2005 09:47:45 -0800 Message-ID: References: <87lkzvpz2s.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131731412 5543 80.91.229.2 (11 Nov 2005 17:50:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2005 17:50:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 11 18:50:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ead0K-00079Y-Gf for ged-emacs-devel@m.gmane.org; Fri, 11 Nov 2005 18:48:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ead0J-0004Ah-SN for ged-emacs-devel@m.gmane.org; Fri, 11 Nov 2005 12:47:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ead0A-0004AO-O2 for emacs-devel@gnu.org; Fri, 11 Nov 2005 12:47:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ead0A-0004A4-21 for emacs-devel@gnu.org; Fri, 11 Nov 2005 12:47:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ead09-0004A1-VG for emacs-devel@gnu.org; Fri, 11 Nov 2005 12:47:50 -0500 Original-Received: from [148.87.122.30] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Ead09-0006B1-W2 for emacs-devel@gnu.org; Fri, 11 Nov 2005 12:47:50 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id jABHll6o009442 for ; Fri, 11 Nov 2005 10:47:47 -0700 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jABHlkB5006854 for ; Fri, 11 Nov 2005 10:47:46 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jABHlk9A006846 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 11 Nov 2005 10:47:46 -0700 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal In-Reply-To: <87lkzvpz2s.fsf-monnier+emacs@gnu.org> X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45756 Archived-At: complete.el extends the meaning of the variable so that a non-nil non-t value means "show the help but only on the second attempt to complete". I.e. if TAB finds nothing to complete, the first TAB will just say "[Next char not unique]" without bringing up the *Completions* buffer, and the second TAB will then bring up the *Completions* buffer. It happens to be my favorite behavior. Thanks. I knew about that behavior, but I couldn't make out the related use of completion-auto-help. I still don't see it in complete.el (it is only tested there, never bound), and I don't see it in C code either. Where is `completion-auto-help's non-nil, non-t value bound? If it is only a user who sets such a value, then shouldn't the non-nil, non-t behavior be documented for the user option? I don't see that, as I mentioned. > 2. New feature proposal - How about allowing for an > "always-display-*Completions*' behavior: > - t means what it means now > - nil means what it means now > - other means this: We could have t = what it means now nil = what it means now eager = what you suggest (always show the completions and update them after each key stroke) lazy = what complete.el does for non-nil non-t values Good. > IOW, with this value, the user would not need to hit `TAB' to display > *Completions*. (S)he would see the list of completions whenever there are > more than one. There is currently no way to make `completing-read', > `read-file-name' etc. display *Completions* from the outset. Indeed. The closest is icomplete-mode. Yes, in fact, I implement this behavior with regexp matching in Icicles, where I refer to it, by analogy, as "apropos icompletion" ("apropos" because it uses a regexp, "icompletion" because it is incremental completion). That was one of the motivations for this request: I currently have no way to display the candidates right from the beginning - a user must first request the display (via, e.g., `TAB'). I proposed `eager' _without_ the automatic update after each keystroke, in order to allow that as an additional (separate) option. I think that would be better. Some people (or some functions) might like to display the list of candidates right from the beginning, as a kind of menu, but prefer to update it only upon demand (via `TAB'), not automatically at each keystroke. Some people might find the automatic list updating to be distracting (I find it very helpful, personally). IOW, I think we should separate the control of when to display of *Completions* from the control of whether or not to automatically update it. The difference only makes sense, probably, for the `eager' value, so we could just have two values instead of one: `eager-with-auto-update' and `eager-without-auto-update'. My implementation of this kind of incremental completion in Icicles uses an option that is checked in the special self-insert I use. The option values: non-nil means update *Completions* incrementally, as you type. t means do nothing if *Completions* is not already displayed. non-nil and non-t means display *Completions* and update it. So, for instance, non-nil, non-t causes character insertion to display *Completions*. That does not take care of displaying it, however, right from the beginning, which is why I made this request. The special self-insert gets called inside `completing-read', upon insertion, but I see no way to get `completing-read' to display *Completions* without any user action.