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: display-completion-list should not strip text properties Date: Mon, 22 Jan 2007 21:10:56 -0800 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 1169529144 19558 80.91.229.12 (23 Jan 2007 05:12:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2007 05:12:24 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 23 06:12:20 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 1H9DxE-0007Tu-7J for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 06:12:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9DxD-0005iH-JM for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 00:12:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Dwz-0005eN-7z for emacs-devel@gnu.org; Tue, 23 Jan 2007 00:12:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Dwy-0005cZ-5c for emacs-devel@gnu.org; Tue, 23 Jan 2007 00:12:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Dwx-0005c9-Vt for emacs-devel@gnu.org; Tue, 23 Jan 2007 00:12:04 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9Dwx-0006Qj-JQ for emacs-devel@gnu.org; Tue, 23 Jan 2007 00:12:03 -0500 Original-Received: from rgmgw3.us.oracle.com (rgmgw3.us.oracle.com [138.1.186.112]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l0N5C0XW014291 for ; Mon, 22 Jan 2007 23:12:00 -0600 Original-Received: from rcsmt250.oracle.com (rcsmt250.oracle.com [148.87.90.195]) by rgmgw3.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l0N5C0DV001247 for ; Mon, 22 Jan 2007 22:12:00 -0700 Original-Received: from dhcp-amer-csvpn-gw2-141-144-73-207.vpn.oracle.com by rcsmt251.oracle.com with ESMTP id 2387616981169529057; Mon, 22 Jan 2007 22:10:57 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: 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:65401 Archived-At: > Users could then pass propertized strings to, for example, > `completing-read' and have them displayed as defined. > > Is there a case where this is useful? I think the page I pointed to suggests a few uses. It's hard to know whether you didn't follow the URL or you didn't think the suggestions made there were useful. Just in case you didn't follow the URL, some possible uses of text properties in *Completions*: . 'face' - to make some completion candidates stand out in particular ways The screenshots show *Completions* with color names and their accompanying color swatches; that is, the individual completions have, as their backgrounds, the colors they name. Complete your input to a name or just click the color you want (WYSIWYG), without paying much attention to the name. Or, complete a face name: you see the faces whose names you can choose (like `list-faces-display', but with completion). WYSIWYG. . 'help-echo' - for help that is specific to a particular candidate or to a particular command that completes input Put your mouse over a candidate function name to see its first doc-string line (like `apropos' with completion). . 'keymap' - for individualized mouse or key treatment of candidates (or even of parts of candidates) For example, a mouse binding specific to a particular candidate or group of candidates (e.g. help, preview, or a mouse-3 menu). . 'display' - to include images in candidates or to add display artifacts For example, application icons next to file names, to show what program will apply if a particular file is chosen. Or thumbnails next to image-file names - choose an image file by completing its name, but also get a preview of it to help you choose. More generally, `display-completion-list' is a general function. It should be just as general as the other completion functions such as `all-completions'. Put another way, what is *gained* by stripping text properties from completions? If something is gained in some cases, then at the very least stripping should be an option (bind some variable or customize some user option to impose stripping). I would prefer to just get rid of stripping altogether, to open new possibilities. I would rather burden any programs that might need to strip properties with doing that themselves, before they call `display-completion-list'. And I would prefer to have the function coded in Lisp. What is the advantage of using C here? It just makes user tweaking more difficult, with no benefit that I can see.