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: propose adding Icicles to Emacs Date: Mon, 18 Jun 2007 09:15:23 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1182183466 32114 80.91.229.12 (18 Jun 2007 16:17:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2007 16:17:46 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 18 18:17:41 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I0JvA-0008OZ-1K for ged-emacs-devel@m.gmane.org; Mon, 18 Jun 2007 18:17:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0Jv8-0005mG-Cf for ged-emacs-devel@m.gmane.org; Mon, 18 Jun 2007 12:17:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I0JuY-0004xe-7y for emacs-devel@gnu.org; Mon, 18 Jun 2007 12:17:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I0JuW-0004tD-0M for emacs-devel@gnu.org; Mon, 18 Jun 2007 12:17:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I0JuV-0004sc-Kd for emacs-devel@gnu.org; Mon, 18 Jun 2007 12:16:59 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I0JuU-0002eS-Cj; Mon, 18 Jun 2007 12:16:58 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l5IGGs9D031044; Mon, 18 Jun 2007 11:16:55 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l5IGGr8e022558; Mon, 18 Jun 2007 10:16:53 -0600 Original-Received: from dhcp-4op11-4op12-west-130-35-178-179.us.oracle.com by acsmt351.oracle.com with ESMTP id 2938610441182183324; Mon, 18 Jun 2007 09:15:24 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: Linux 2.4-2.6 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:73241 Archived-At: > In the vanilla Emacs `customize-apropos-faces', you must provide a regexp > once and for all, with RET - there is no completion of face names > available, and no way to rectify your regexp without starting over. > > This is a good example of the general advantage of regexp matching on the > fly, and the advantage of providing input by completion whenever possible. I might add that once you have the ability to type and change the regexp to match dynamically, there is less raison d'etre for these `customize-apropos-*' commands. An Icicles user would simply use `customize-face' and so on, instead. Well, not really. A multi-command version of each would first need to be defined, so that `C-RET' etc. could DTRT. With RMS's proposed `call-interactively' tweak, this step would presumably be unnecessary. With Icicles (without RMS's `call-interactively tweak), here is, for example, a definition of a multi-command `customize-face': (defun icicle-customize-face (face) "Customize face FACE." (interactive (list (let ((icicle-candidate-action-fn 'customize-face)) (read-face-name "Customize face: ")))) (customize-face face)) Actually, because `customize-face' moves the frame focus to the Customize frame, and you want to keep the focus on the minibuffer frame (which might be a different frame) until you're done completing and acting on candidates, this is what you really need: (defun icicle-customize-face (face) "Customize face FACE." (interactive (list (let ((icicle-candidate-action-fn (lambda (x) (customize-face x) (select-frame-set-input-focus (window-frame (minibuffer-window)))))) (read-face-name "Customize face: ")))) (customize-face face)) Also, there is the inconvenience that acting on all matching face names would, in this case, open a separate Customize buffer for each. So, this is not exactly equivalent to `customize-apropos-faces', and not quite as convenient for customizing several faces. Still, it does point out that having the ability to: 1) type a regexp at any time to match candidates and 2) act on any or all candidates (C-RET or C-!) means that commands such as `(customize-)apropos-*' that ask for a regexp up front are not quite so necessary. Instead of entering a regexp once and for all to the prompt of such commands, you can type the same regexp to any multi-command that acts on such a candidate - in this case, a multi-command version of `customize-face'. And you can change that regexp on the fly, to correct it or to act on different candidates. In `icicle-occur', for instance, you just start typing a regexp and the matching lines become the search targets as you type - edit the regexp and the search targets change (similar to `isearch-*-regexp'). An added specific advantage for `icicle-customize-face' is that, by using `read-face-name' and `customize-face', you can see (WYSIWYG) the faces you might choose to customize, in *Completions*. Even with the tweak to `read-face-name' that provides this behavior generally, `customize-apropos-faces' still shows plain face names as candidates, because it does not use `read-face-name'. Another advantage is of course on-the-fly help for individual faces: during completion, `C-M-mouse-2' or `C-M-RET' on a face-name candidate shows the face's doc string.