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: Prepend an indicator to the minibuffer prompt to show you can use completion Date: Sun, 13 Aug 2006 12:38:50 -0700 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1155497979 12614 80.91.229.2 (13 Aug 2006 19:39:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 Aug 2006 19:39:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 13 21:39:36 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GCLo1-0006H4-DC for ged-emacs-devel@m.gmane.org; Sun, 13 Aug 2006 21:39:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCLo1-0004Lw-2Y for ged-emacs-devel@m.gmane.org; Sun, 13 Aug 2006 15:39:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GCLnm-0004Lr-FA for emacs-devel@gnu.org; Sun, 13 Aug 2006 15:39:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GCLnk-0004Ld-PP for emacs-devel@gnu.org; Sun, 13 Aug 2006 15:39:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GCLnk-0004La-JR for emacs-devel@gnu.org; Sun, 13 Aug 2006 15:39:12 -0400 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1GCLtO-0000ln-Oj for emacs-devel@gnu.org; Sun, 13 Aug 2006 15:45:02 -0400 Original-Received: from rgmgw3.us.oracle.com (rgmgw3.us.oracle.com [138.1.186.112]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k7DJdA2I003967 for ; Sun, 13 Aug 2006 14:39:11 -0500 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-64-220.vpn.oracle.com [141.144.64.220]) by rgmgw3.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k7DJdAUq029150 for ; Sun, 13 Aug 2006 13:39:10 -0600 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.1807 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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:58363 Archived-At: Minor feature suggestion, for after the release: Prepend a one-character indicator, with a face that stands out, to the minibuffer prompt, whenever completion is possible. I do this in my own code, and I think it helps orient users. It's not always obvious, when a function reads input, whether completion is available. This makes it obvious, at the minor cost of an additional character or two in the prompt. For example, in Emacs 20 and 21, when you use `i' in Info, completion is not available; in Emacs 22, completion is available. There is nothing in the UI that indicates whether completion is available - you either know it or you don't, or you try hitting TAB to see if completion is possible. Users already used to the older, non-completion behavior can miss out, until they somehow become aware that completion is available for index lookup. If you have an old habit, you might not think of trying TAB. Knowing whether completion is available can change the way you interact with Emacs. Not knowing it is available can mean that you miss out on a quick way of inputting something. I just add a space character to the beginning of the prompt, highlighting it, whenever completion is available. I add another space with no highlighting, to separate this indicator from the prompt per se. (I also use Miles's minibuf-depth.el (or mbuf-depth.el), BTW, to indicate recursive minibuffer depth, and the two indications play well together.) An additional subtlety can help a little more: I prepend a different character (`=') and highlight it in a different color, whenever completion requires a match. In sum: * When must-match completing, `=' is prepended and highlighted one way. * When completing otherwise, ` ' is prepended and highlighted another way. * When not completing, nothing is prepended. Users can turn off this feature, if they prefer, by just customizing the prefix strings to "".