From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7524: 24.0.50; backquote converts newlines in strings to "\n" Date: Wed, 1 Dec 2010 08:40:28 -0800 Message-ID: <9F064DA0407E4234B3DA11C0722B97D1@us.oracle.com> References: <9C4145152E1B4A9890C4A8DA520A51ED@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291227203 897 80.91.229.12 (1 Dec 2010 18:13:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 18:13:23 +0000 (UTC) Cc: 7524@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 01 19:13:18 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PNrB3-00044d-2J for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 19:13:13 +0100 Original-Received: from localhost ([127.0.0.1]:52818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNrB1-0000sh-V3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 13:13:12 -0500 Original-Received: from [140.186.70.92] (port=41044 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNpo1-0003z3-Hh for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2010 11:45:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNpnk-0007p1-W5 for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2010 11:45:21 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNpnk-0007ov-Sv for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2010 11:45:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PNpf0-00074S-2E; Wed, 01 Dec 2010 11:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Dec 2010 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7524-submit@debbugs.gnu.org id=B7524.129122133027139 (code B ref 7524); Wed, 01 Dec 2010 16:36:02 +0000 Original-Received: (at 7524) by debbugs.gnu.org; 1 Dec 2010 16:35:30 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNpeU-00073g-DG for submit@debbugs.gnu.org; Wed, 01 Dec 2010 11:35:30 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNpeS-00073T-AM for 7524@debbugs.gnu.org; Wed, 01 Dec 2010 11:35:29 -0500 Original-Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oB1Gf4sU024061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Dec 2010 16:41:06 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oAUGR1Dw015269; Wed, 1 Dec 2010 16:41:02 GMT Original-Received: from abhmt001.oracle.com by acsmt353.oracle.com with ESMTP id 832628311291221648; Wed, 01 Dec 2010 08:40:48 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 01 Dec 2010 08:40:29 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcuRcXMvdOg33U6jT5uP9A6KVAKPwgAAHa4A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 01 Dec 2010 11:36:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42064 Archived-At: > > (This is particularly messy when used in defcustom values.) > > I don't know what you're referring to. I'll keep the bug > open for now, assuming that the defcustom issue will be > the actual bug. You're right of course about the chars "\n" and a ^J char in a Lisp string. `defcustom' does different things in this regard, depending on the :type (and whether there is a mismatch, but that's something else no doubt). See what the \n representation does, for example, with the file I sent to emacs-devel yesterday, thread "Variable behavior for `mouse-3' second click at same spot". Here's a direct URL to the file. http://www.emacswiki.org/emacs/mouse3.el Eval the defcustom for `mouse3-region-popup-submenus', then use `M-x customize', and you'll see how messy (how wide) the display is. Independently of this, perhaps Customize should wrap long lines in some way. Dunno. Doesn't seem like it should be displaying lines as 168 chars wide rather than wrapping them. This doc-string with two newline chars gets shown as a single line without any wrapping: 168 chars wide: "Replace the selected rectangle by the contents of a register you name. Note that the rectangle currently selected is first killed. You can restore it by yanking." Much of the reason for adding the doc string to the lambda was to give Customize users more info about these anonymous commands. The way things are, I guess the best thing for a programmer to do is create named commands and forgo anonymous ones within option values. Nothing wrong with that, but I think we should be able to do better wrt Customize display. Especially since most of the time newlines in strings _are_ shown in Customize using newline chars rather than the two chars "\n". Maybe the :type could be refined in this particular defcustom in some way that would cause the Customize display to be as usual (newline chars, no "\n"). Dunno (suggestions welcome). But at least this defcustom is not a case of `mismatch' (mismatch seems always to display a newline char in a string as "\n").