From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [External] : Dialling down symbol escaping slightly? Date: Thu, 10 Mar 2022 05:50:15 +0000 Message-ID: References: <87pmmu4j7t.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8253"; mail-complaints-to="usenet@ciao.gmane.io" To: Lars Ingebrigtsen , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 10 06:51:22 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nSBhp-0001zB-W9 for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Mar 2022 06:51:22 +0100 Original-Received: from localhost ([::1]:55368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSBho-0002LU-Kt for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Mar 2022 00:51:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:32842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSBh0-0000sY-3d for emacs-devel@gnu.org; Thu, 10 Mar 2022 00:50:32 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:64078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSBgw-0004ad-On for emacs-devel@gnu.org; Thu, 10 Mar 2022 00:50:29 -0500 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22A1hYmm022949; Thu, 10 Mar 2022 05:50:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=u6OheygeBvHIRHyeeID4qhsUzlrbiXaaBQHDxpxyT2M=; b=c+nYrNRr/cvZMojOjTMGH/QKgX4MNqC4hh3ADJpQG2VTp8bfNrWHpbw5FB7iuZFjKMfL HxIIQFHqlztDjmEHjgdmtKO2QFgMNF76lkNEXtEuP20Jf0luhliQUlTPRrBlXphwV54O r1UA5uuxpAHR5Mw+ITFGgHSyIB2UpRvNdeUC3ptD6hwHZzwAkwnqUThqlE+058FaLQ2l hU2nDatyuaBbFcCRBAbEf2c0Vam7t7izOa+WJHDjRkQrZy+mvKWt4jketpRLIg++zEZB t7aKk57yrVJfYB0TVY1g6UdRV6/KGnfQZdqYqdQ/IDzxmWR0aLTOrbFOKnUEa0OuevWW Yg== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3ekyraunh9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Mar 2022 05:50:19 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 22A5lFcN159700; Thu, 10 Mar 2022 05:50:18 GMT Original-Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by aserp3020.oracle.com with ESMTP id 3ekyp3c5g3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Mar 2022 05:50:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nkb7J2Hg2itSpsMIfbY7MkyQ+I5m3b/T0M1BY8VaRBCFOPXjhSC3HrODNvg7Lk1b6sWeM8UavyzUhmQK0f2sHLfI2EVN44cg8mrr5NYXVyZZnJS4E0GHEHzu+fu1MNibRp9HGNzjWsAredIY4QNCUAwDAi119aaHQvyvLWW8kHngaQF0D1TC+lIBJq/VpMw1PSbPxR4oBqSfpIY4b9PjJZbdxDr/ngUziRzzC0qX8Q7XmpxSPYBBPMcdVnQeFdxRDUqP7XgDpnD1M61L824C2MChNFhXX05LRir/KroL9dM8wcZs6qeXIy3gOFlNVplP9joYDe8cYX8XEdU2jsBUuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=u6OheygeBvHIRHyeeID4qhsUzlrbiXaaBQHDxpxyT2M=; b=TXSqo9hpbUH1NhfR9O0kynwnanmMeWm0KIZvibfifMKiaZpneoo6P6U9nKj4xPUmDAQic3RwwgdD8fIzYQY2C4FlJ8ZVGpWh3/z4N3ycr4eZHjFtzPxIsvvPhyWosCuK/IpSdAr9aU7chS2zl1HtQylHkD2+1FUg6cKz2drfS+pnJZHppqdvCNP+R0G8SKxc85E8hbJOQ3+7UcfzTzCiUgHFD0ZjZ7ywx++9LEDoJKs1REZudX+Nf4BERYhK7+pC3S80mMAjmZ9G25dT+4AEL2nYjpQlLH/8Sit27paroVI/e3Qwv0Kvi2LCkJIDROZ4q1gpzD0ecWgbyfToia1A4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u6OheygeBvHIRHyeeID4qhsUzlrbiXaaBQHDxpxyT2M=; b=I6UJq9LnKETXjZahR2DCra8OPYXEVj80InO+uZIBij5sIFJwbbNyRVNhMtJLVPn7+bOWL/L8MP9bBy3/zUQuFBl4bzBkptE/MRuAvTY5cbeFHZAq5Q/UmfH2qatCoyfm44/xjpx24HJQx0H44dE1SO5yy86Rtb/4Fr2qkBaWEas= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MN2PR10MB4349.namprd10.prod.outlook.com (2603:10b6:208:1d4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.15; Thu, 10 Mar 2022 05:50:16 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::ec69:8077:89b0:4379]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::ec69:8077:89b0:4379%6]) with mapi id 15.20.5061.021; Thu, 10 Mar 2022 05:50:16 +0000 Thread-Topic: [External] : Dialling down symbol escaping slightly? Thread-Index: AQHYNC5ASkthB5lSbkuJ9v+tJwrnRqy4C6+A In-Reply-To: <87pmmu4j7t.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef1cbc0f-d496-4b69-75fd-08da0259da2c x-ms-traffictypediagnostic: MN2PR10MB4349:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: il+1FgtqGRzTv56hv+6eH3mRKrEdDAwMth81E8vw62XAVU4HcJI9hqiOW70iqQBZj5yM/VaxDTdbj4wjOXG4wAsCCZ4rDUFGcEl68arR17D3Gz+nSxrImuQ/72PThQjwYj3O0onNItuj0JROKSwZWGsOH/tbL+v/MsQX0JL0FuGg8Bi+itwlKE20LGXCGZRYDKheZ6deuqsxbY5FzOTd3OBPt4BC1KzOfdT4HcuSNemtT+tFvmZ+YpadxzS0S10a5ERUt42GCQ8G7F1gi4Zn/DPocbBs3v41OIMMnb810g2Hpf2MdQmsHag7OpNTKC+5zpXfuoJieC+1FrkwQD2yoKqQsJ1vTaeKe/Lt+v1uZNIuiaA8aEAbbde9RHfKazCnyH67VKONa88hcypUivZLIunQGuOQ8WUxy2vXSOUdpjaghc3XyPaqo2xAf0msrtURrGtgJXqP5w7lYBNx2/3B735oqxAl7nQQu4nSEMLGuNxg4L1nEtHKbGRZMNwtc4VN8Wg6gUFnac7pv0XDGwPpUfSUtoMkwKxeg5rkx1lknIfaexUt0EHBKue2OJruXuspnjTV12P1w7fxEkaH+dq+pp2RP6X3lDHmL2DdyVUT/ruH8RpF1SC3ciLCazbNT3z9v8uE+Fb7fMGWqMzY2T16h5mEU8cSO9+HqrrUwDlt2joyVkF8uaQHF5MaBbKZTl8nuhAjc8a+bLYFmAUf2G2smIbGk5z9zHMY19fjioYJd6cj5DBMhXHijSnRNzDU/ cKwN8XB5gIztNzwDRKpV2JKsx+2Y4aIQ9br/29i4SZpS8k= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(38070700005)(9686003)(966005)(5660300002)(83380400001)(110136005)(316002)(8676002)(66556008)(6506007)(64756008)(86362001)(66446008)(66476007)(66946007)(71200400001)(8936002)(508600001)(52536014)(7696005)(122000001)(76116006)(55016003)(38100700002)(26005)(186003)(33656002)(2906002)(44832011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uoYGH2livvb26QArIkU7oUo2WKF7WEtBBUpzDVVvLhtLgIO7VD9cYKXdwufW?= =?us-ascii?Q?Rz5UuJ+sbf4YlEXoQB0ish6qVPkO6b025F0uFiFlcjpoRpAB2uo4HZKidGM0?= =?us-ascii?Q?+OGNTj05BYuiZMJbp01w5F3WC+orZz9vTie6kTTsDXuy6nM/KYVzxppVdam8?= =?us-ascii?Q?YCTHP9M57K2bbOu4car3hN8YOf1nG/BQIVKAeMv8lUHoy4v1z76iuQ+kUUOB?= =?us-ascii?Q?spuBCtLeNuuS3NvwAuV2DqD8UQ4m4Xvm8589h7yqJwtgWpnFbRtNEY1sg/aI?= =?us-ascii?Q?eaTuRTRYQ4kQxrEY3xnjZfXSsAWDidvN5st0yT7EBeT/Qk8TRrIWioaepHxN?= =?us-ascii?Q?5DtChArIegs/MCXZBFfF+QHmZi/t2iAnZDr1gacyxjyQcvj9WhKWxdkYsL+U?= =?us-ascii?Q?Zqy4d/EdWT33OGU5SnnEYbsJwiNNgsp+iZ5zK5IOi+DQOcgdrptHKXTcj/yn?= =?us-ascii?Q?zOPP57qzi+u4ACqByJYFTjyqsE77x/9rZFrWL7XUwMoPnwObKr2kZUBFG5B6?= =?us-ascii?Q?C4ONW1STJTVrZFQUvDlCYjVZzSNr7tKgEFECXIxHP7miaPWDl7g0X4eIs0Dm?= =?us-ascii?Q?Z0S0YYW6yTXuQZnAe/CaS4deOjDyRyQ88MmwzHBIAsAbd7Ii3pVKzi9hyKIF?= =?us-ascii?Q?IM X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef1cbc0f-d496-4b69-75fd-08da0259da2c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2022 05:50:15.8768 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XwHERjWEdNnx5KLnp818PodJ59jahzEAgqiL7a1rTl46sJkcYNX1eB+0p6E/YhSKVo3nQ7NACWW+ftHs0G4CRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4349 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10281 signatures=692062 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203100027 X-Proofpoint-GUID: E3WmCSnf5FCvu1qlUlnm7RBDF4fwaC_4 X-Proofpoint-ORIG-GUID: E3WmCSnf5FCvu1qlUlnm7RBDF4fwaC_4 Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286983 Archived-At: > In a bug report, Please, refer to the bug report, where this was presented and discussed. It's bug #23130: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23130 Go ahead, read the report; it's not long. (You can ignore the rest of the bug thread without missing anything.) > Drew pointed out that a function like > (defun foo. ()) got a *Help* buffer like: >=20 > foo\. is a Lisp closure. >=20 > (foo\.) Also from the bug report: (defun bar\ () (message "BARRRR")) `C-h f' Describe function (default bar ): RET bar\ is a Lisp function. (bar\ ) Note that the first line here is not even correct - it should at least have another SPC char after the `\ '. The way it is written now, it suggests that the name is `bar\', i.e., that the symbol is bar\\. The point of the report is that *Help* and prompts should talk about a function or variable using the same way the Emacs manual and help usually do: by quoting its _name_: `foo.' (or curly quotes). >From the bug report: it would be better to show something like this: `foo.' is a Lisp function. (foo\.) `bar ' is a Lisp function. (bar\ ) And it would be better to use `...' also in the prompt: Describe function (default `foo.'): Describe function (default `bar '): (The same situation exists for other languages, BTW.) We should talk about a function, variable, face, ... whatever has a name, by referring to its _name_. Its name is unambiguous, and we don't need to use Lisp reader syntax to talk about it in our help/doc. There's a difference between _using_ a named thing, as in Lisp read+eval, and _mentioning_ it, as in help. When mentioning a name we quote it. That's as old as the hills. (For fun, read some Quine...) In code, to use function `bar ' we use (bar\ ). (When talking about that use we use `(bar\ )'.) That's all this bug is about. It shouldn't be a big deal to fix. There's _nothing_ complicated going on here, at all. > This is because we're using prin1 (as we should) here, and because the > printer always adds a backslash before the dot. You also get the same > thing with a question mark, which is perhaps a more serious usability > problem, because quite a few people like to use that convention for > predicates: ... and so on. That all misses the point. This is not about _using_ functions or variables or... that have such names. It's about talking about them in our doc/help/prompts. (And yes, in interaction such as prompts, some contexts might be exceptions - Lisp read syntax might be appropriate. Lisp is like that - using it and talking about it almost at the same time. We need not make a black-&-white thing of this.) > foo\? is a Lisp closure. >=20 > This isn't only for *Help*, of course, but in any context where we > display a symbol, like in backtraces and the like, where "foo\?" is > confusing and therefore less than optimal. Yes and no. Yes, if it's a context where we're talking about the thing and it's important that we humans reading that might otherwise get confused. If we want to be sure to be clear in that case then we can quote the name: `...'. But no, we do _not_ need to do that "in any [i.e. every] context where we display a symbol". No. Absolutely not. If it's not so important in some context to be super clear, and a human reader understands that the text written there is something that could be Lisp-read, then we need not necessarily quote it. Lisp-read syntax can sometimes be handier, and even clearer. In such contexts we know to put on our little Lisp-reader hats and read like Lisp... But when it comes to doc/help talking about things, we should in general quote their names. And we already do that in our doc. It's not an accident that Emacs has always taken pains to quote names in the doc. We do it even for names that are not problematic. All the more reason to do it for problematic ones (problematic for us human readers) - e.g., names that start or end with chars such as SPC. All this bug is about is *Help* descriptions and some prompts. And only a tiny part of such descriptions - in in general we already quote names in *Help*. The bug just points out a rare case where we've neglected to do that. It's a detail, a corner case. But it's worth fixing. There's zero reason to make a big thing out of this, and to start going on about Lisp sexp printing, or reading, or closures... This is only about improving user help a tiny bit, by quoting function, var, and face names in a few places where we've not done that yet. > Now, as far as I can tell, the only symbol containing a dot that needs > to be escaped is the `.' symbol. That is, it needs to be printed as > \. to differentiate between that and the dot operator in `(1 . 2)'. As > for the question mark, it apparently only needs to be quoted when it's > the first character in a symbol (to differentiate between the symbol > and the character syntax). >=20 > Does anybody see any problems with tweaking the printer to drop > escaping "." and "?" (except in the two cases described above)? That's all blah-blah, IMO. No, this is not about needing to tweak the printer for _any_ specific characters. I'm afraid you may have completely missed the point. Let's just fix bug #23130 and then move along...