From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Escape syntax in docstrings Date: Fri, 24 Mar 2023 14:22:04 +0100 Message-ID: <3143D454-E439-44B8-82DA-CBC5D1B455F2@gmail.com> References: <877cv7nlnr.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Chen Zhaoyang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 24 16:27:02 2023 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 1pfjJm-0000rn-C9 for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Mar 2023 16:27:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfjFS-0002yC-EO; Fri, 24 Mar 2023 11:22:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfhnb-0002aq-2Y for emacs-devel@gnu.org; Fri, 24 Mar 2023 09:49:43 -0400 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfhnR-00062u-7z for emacs-devel@gnu.org; Fri, 24 Mar 2023 09:49:42 -0400 Original-Received: by mail-ed1-x530.google.com with SMTP id i5so8388763eda.0 for ; Fri, 24 Mar 2023 06:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679665768; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=9tRJ0Kp5Mx7vcmfqOftYRZMmMvGqIUv/XaZy6sxTgVg=; b=SQHj3zkEBv/2TiZk/CkYsUFTEMKXOF+Xc8e+21R4GeD7mQlw2duBOXXBduw2lDGNaD 8EVtXPYMFum00YPqgtFaMJ0ZfA8zvs1Y00iQKtXLiUgE9SttieBRU/0dnFOnTx8TIIOh /mcHJooM1YJWH+Z1oYDBB2E5nK4LwcPQBKBE5VRzvcykYsWsalGXQWGn4G1qZGbbYfL2 RfA55Rb5Gz4WpNpzB0FFv0ftavquyf5zyMoGELl37eY26OGF21zVWq56V5XKYrd3LFq3 3ckbubcey6dCd7RnSBNXlcmzFhZpdUwpigkXITd4FI9apN6nhxdszshWgTeVb1oGWK31 2KNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679665768; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9tRJ0Kp5Mx7vcmfqOftYRZMmMvGqIUv/XaZy6sxTgVg=; b=mDba4k8gK8kHLD6BlCurOwy4t/wvbXYyRcKz4QDYzHRVSJFCyjJR2bL0tl47MAiWZf X4dY7X9G2tX7DJGhzuCjmYXcDjENsRnjZ1dTxBeNsQmJR+1sX1mbQN4roQeLWCM0g0gA UJoQ0odIEwNN+GNSNOGd2kE1j4lCMoXLI7kzXdpl4BaXvAkp/VE8LOCEw63w3sevLcJz eVorc4UTRqHLJp8EBx+Xv2FsNh5bO0KLKb1ahRd5U1suK9baHCYRHuzs5V3vhq+jQx6D Na8PPVYHMmBdaIRMO0gWJeen46nd5NkQbqSluOEpgzarQp3LM6nx1ElbpVwvdUqYvY4J 2HMw== X-Gm-Message-State: AAQBX9druBejYPD70P822ZSkNkFKNv7/ltxXsOE9uVL2k1/ajcbpyoMh jMHmU1FY5kfw9tXv91eZQSUC3gFnSS4= X-Google-Smtp-Source: AKy350ZqwzNDE9OxIVTpRQeHnPovuH3GxP1tSaZs0hzWiJWWCkqCc3piZLmX04X2hwDXpk1mL+btOg== X-Received: by 2002:a05:651c:10d:b0:295:a458:e2ce with SMTP id a13-20020a05651c010d00b00295a458e2cemr843402ljb.6.1679664125747; Fri, 24 Mar 2023 06:22:05 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id l2-20020a2e3e02000000b0029e5448e752sm1904680lja.131.2023.03.24.06.22.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2023 06:22:05 -0700 (PDT) In-Reply-To: <877cv7nlnr.fsf@gmail.com> X-Mailer: Apple Mail (2.3654.120.0.1.14) Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=mattias.engdegard@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 24 Mar 2023 11:22:33 -0400 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304748 Archived-At: 23 mars 2023 kl. 23.32 skrev Chen Zhaoyang : > I totally did not know about the fact that "\x" means NUL in = docstrings.=20 Most likely even the original author of that code in the Lisp reader did = totally not know about that. > I do agree that using the slash to represent =CE=BB in docstring is = not so > good to begin with. There is always a tension in doc strings between their dual roles as = comments to be read in the source, and as strings to be displayed in = help text. Text mark-up in doc strings and comments adds an extra layer = to the problem. The best we can do is trying to catch mistakes as early as possible. >> Good catch. Would you tell the Agdas about it? >=20 > Yeah, I am grepping for cases like this and will submit a patch to = them soon. Excellent. There is now a special \x check in relint as well.