From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#7524: 24.0.50; backquote converts newlines in strings to "\n" Date: Thu, 22 Oct 2020 09:24:55 -0300 Message-ID: References: <9C4145152E1B4A9890C4A8DA520A51ED@us.oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000fed42d05b2418d5c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier To: 7524@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 22 14:26:19 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVZfe-0006Lj-QE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Oct 2020 14:26:18 +0200 Original-Received: from localhost ([::1]:32884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVZfd-0001zS-RL for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Oct 2020 08:26:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVZfO-0001xT-Ia for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 08:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVZfO-0003Pn-6v for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 08:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kVZfO-0001xQ-30 for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2020 08:26:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <9C4145152E1B4A9890C4A8DA520A51ED@us.oracle.com> Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Oct 2020 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7524 X-GNU-PR-Package: emacs Original-Received: via spool by 7524-submit@debbugs.gnu.org id=B7524.16033695197467 (code B ref 7524); Thu, 22 Oct 2020 12:26:02 +0000 Original-Received: (at 7524) by debbugs.gnu.org; 22 Oct 2020 12:25:19 +0000 Original-Received: from localhost ([127.0.0.1]:51683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVZeg-0001wN-Mf for submit@debbugs.gnu.org; Thu, 22 Oct 2020 08:25:19 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:44741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVZec-0001vt-PK for 7524@debbugs.gnu.org; Thu, 22 Oct 2020 08:25:15 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id t9so2106384wrq.11 for <7524@debbugs.gnu.org>; Thu, 22 Oct 2020 05:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=6MPf/UXDNHfMU1FI6FPTE7GMYdhZVre8V9jGzbJKz0o=; b=Ii0AQcJBHfoguQRbozan5DWcWerQD4TUYSvJiD+yIWA+k604TtOqzfDtEefxTF0B6X dPkH8sdac8lVnBrVfndCJfifaJUopss1A5Lv86ChgmjCEQMl1ray2eMEGy+6rinxH0Dv D6qTZoxHXOKdoeH1gUdmceMiHCnkfPdu7rzu84rJfqexAYMcTN1fpe6R0zrGp6wq8Ym/ LqDT+TFz/2ofArX9dKOaHVteuxxCaaNkEZPfgT0dPSzCHhDddHZlIRiYulm//kAo5vaH YPfDeVAXAbWqzk88b1S7whNVXN96ZTjOOTx6J42M0N9vx+3yFxWJaTftezI44HYR8/46 xw2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=6MPf/UXDNHfMU1FI6FPTE7GMYdhZVre8V9jGzbJKz0o=; b=nzVLMVBNVC1Oe8nCYMswyvacko75FrpiEIR30EVotIYQjc4QuFf0WdySzObKlZ6BKo N8SB9I4C9K4wN+WfFmVTxRKJkTfdt1iAlOKdbasX30pkee4VoaG0/cMH/Wn3np+vd6lZ TJ760Qy+KrFpiivtNN6zxhoVv55FQcSfhjrMU1Aqfwf8fJqL2N1rCqzKb3ZpNQPzIE7D hB77BoXBk3C/qjhwNvVDFsbWdM7IejML1eK/4YN4ddApU0KeuyLl3iM9HuQYxvFu0XUa ChgkLF1PuC1WLATNyajoA+8pUJvec7lGartYSdJXQOuP3zUe5oBzqeFVGRBNhPuLXSrS +Qqw== X-Gm-Message-State: AOAM532yZJ5ANhNoUaIALZGuQA0Pl1KcZlGVAVDJzVHhhmQKgTx29CR1 GTyX6rawerUtPXz3eQcMSjMrkGlY+fCOxT4LF5EH6fA/79M= X-Google-Smtp-Source: ABdhPJxTB+hNHy6jycotthJYYZSRU0FhZR+KFy/mCBx+9gP4lkdns4xjviKTdio8Ls6LB02PFc9Y4lwW9wJf8GiWI6E= X-Received: by 2002:adf:df03:: with SMTP id y3mr2449760wrl.70.1603369508402; Thu, 22 Oct 2020 05:25:08 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191250 Archived-At: --000000000000fed42d05b2418d5c Content-Type: multipart/alternative; boundary="000000000000fed42b05b2418d5a" --000000000000fed42b05b2418d5a Content-Type: text/plain; charset="UTF-8" tags 7524 patch quit "Drew Adams" writes: >> > (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. > If I understand this bug report correctly, the wishlist item is about pretty printing restricted-sexp values, which makes sense to me. Values of the sexp widget already get pretty-printed, but not the values of the restricted-sexp widget. I attach a patch to pretty-print restricted sexp values too, by using the same function that the sexp widget uses. --000000000000fed42b05b2418d5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
tags 7524 patch
quit

=
"Drew Adams" <drew.adams@oracle.com> writes:

>> > (This is p= articularly messy when used in defcustom values.)
>>
>> = I don't know what you're referring to.=C2=A0 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.
>
> `defcu= stom' does different things in this regard, depending on the :type (and=
> whether there is a mismatch, but that's something else no doub= t).
>
> See what the \n representation does, for example, with = the file I sent to
> emacs-devel yesterday, thread "Variable beh= avior for `mouse-3' second click at
> same spot".=C2=A0 Here= 's a direct URL to the file.
>
> http://www.emacswiki.org/emacs/mouse3.el
= >
> Eval the defcustom for `mouse3-region-popup-submenus', the= n use `M-x customize',
> and you'll see how messy (how wide) = the display is.
>

If I understand this bug report correctly, t= he wishlist item is about
pretty printing restricted-sexp values, which = makes sense to me.=C2=A0 Values
of the sexp widget already get pretty-pr= inted, but not the values of the
restricted-sexp widget.

I attach= a patch to pretty-print restricted sexp values too, by using the
same f= unction that the sexp widget uses.
--000000000000fed42b05b2418d5a-- --000000000000fed42d05b2418d5c Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Pretty-print-restricted-sexp-values-too.patch" Content-Disposition: attachment; filename="0001-Pretty-print-restricted-sexp-values-too.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kgkso3l00 RnJvbSAwY2Y3ZDc1MzdjY2JmNmI2OGYwMzFlNDc3NzVlMjIwNjA3YWExOTFlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFpbC5jb20+ CkRhdGU6IFdlZCwgNyBPY3QgMjAyMCAyMDowMjowNCAtMDMwMApTdWJqZWN0OiBbUEFUQ0hdIFBy ZXR0eSBwcmludCByZXN0cmljdGVkIHNleHAgdmFsdWVzIHRvbwoKKiBsaXNwL3dpZC1lZGl0LmVs IChyZXN0cmljdGVkLXNleHAgd2lkZ2V0KTogVXNlCndpZGdldC1zZXhwLXZhbHVlLXRvLWludGVy bmFsIHRvIHByZXR0eSBwcmludCB0aGUgd2lkZ2V0J3MgdmFsdWUsIHdoZW4KaXQgaXMgYSB2YWxp ZCBvbmUuICAoQnVnIzc1MjQpCi0tLQogbGlzcC93aWQtZWRpdC5lbCB8IDIgKy0KIDEgZmlsZSBj aGFuZ2VkLCAxIGluc2VydGlvbigrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3Av d2lkLWVkaXQuZWwgYi9saXNwL3dpZC1lZGl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