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: Tue, 4 Sep 2007 11:51:48 -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 1188932011 27702 80.91.229.12 (4 Sep 2007 18:53:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2007 18:53:31 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 04 20:53:29 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 1ISdWf-00056T-SH for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2007 20:53:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISdWd-0003nW-Ql for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2007 14:53:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ISdWa-0003nN-Bt for emacs-devel@gnu.org; Tue, 04 Sep 2007 14:53:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ISdWZ-0003mt-KD for emacs-devel@gnu.org; Tue, 04 Sep 2007 14:53:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ISdWZ-0003mq-GQ for emacs-devel@gnu.org; Tue, 04 Sep 2007 14:53:19 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ISdWZ-0004ap-9M for emacs-devel@gnu.org; Tue, 04 Sep 2007 14:53:19 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l84IpcLp030253 for ; Tue, 4 Sep 2007 12:51:39 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id l84BQ1Xw002786 for ; Tue, 4 Sep 2007 12:51:38 -0600 Original-Received: from dhcp-amer-csvpn-gw1-141-144-66-125.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 3181589171188931894; Tue, 04 Sep 2007 11:51:34 -0700 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.3138 In-Reply-To: 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:77759 Archived-At: > I think a better approach is to use a markup language in doc strings, > be it XHTML or even TexinfoML. Then using a style sheet it can be > formatted nicely in the Help buffer. Example of a doc string: > > (defun foo () > "To create a file, just visit it with C-x > C-f. See also find-file-literally." > ) > > I don't want to go down that route. It is a lot of complexity, and an > invitation to keep adding more. So, coming back to the original topic (;-)), before the fork toward markup: It makes sense to let programmers apply text properties to doc strings. What is lacking is an easy way to do that. For functions, there is currently no way. For variables, there is a way, but it could be made less cumbersome. Before tackling the problem of finding an easy way to apply text properties, however, we need to accept Johan's proposed (trivial) fix to `describe-variable', so that variable doc strings with properties will in fact be displayed. (Nothing is needed for functions, apparently.) So, there were two proposals in my mail: 1. Let's accept Johan's fix for `describe-variable'. 2. Let's discuss ways to address the limitation that there is currently "no clean and easy way to put text properties on a doc string". #1 does not require #2, so let's take care of #1 first. Johan's fix is a one-liner. Wrt #2, I proposed an approach that (a) would allow propertizing doc strings for functions also and (b) would make propertizing doc strings more user-friendly for both functions and variables. The idea is to let literal doc strings contain special syntax to eval parts and replace them with their values. I proposed "mumble \\(...) titi". Juri proposed "mumble \\,... titi" instead, for consistency with query-replace. I have no problem with either syntax, and perhaps someone has another suggestion. I also proposed a shortcut for face application, which I expect will be a common use case for this feature: "mumble \\#highlight toto# titi" instead of "mumble \\,(propertize "toto" 'face 'highlight) titi" (using Juri's syntax). And I suggested that a similar shortcut might be added for image insertion. Other suggestions for #2 are welcome. But let's at least first agree on #1.