From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2019 05:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 37548@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156973578222485 (code B ref -1); Sun, 29 Sep 2019 05:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Sep 2019 05:43:02 +0000 Received: from localhost ([127.0.0.1]:52048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iERz3-0005qb-Ku for submit@debbugs.gnu.org; Sun, 29 Sep 2019 01:43:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:42237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iERz1-0005qT-HJ for submit@debbugs.gnu.org; Sun, 29 Sep 2019 01:43:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47860) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERz0-0006T8-3U for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:42:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iERyz-0008CU-UZ for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:42:58 -0400 Received: from [189.15.124.78] (port=49010 helo=felix-laptop) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1iERyz-0006pg-8E for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:42:57 -0400 From: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro X-Face: %,T7Hsg=SK$Zh)wiU4Qdv9-fZ26Pf5*+}Ld,{LeV'Cq-1?=kA"hc,'i""S85]g; _W+{nZfx 2GnAMS1K\E_E&:{h[wQd+Tqj5#PtH:W&8^crA0>i?nmD7hOL$K".`@An_8.7gaObQLlMy0\%%I0Jp. Lue$J0B Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACcElEQVRYw93YzXHCQAwF4G0h Fw4caYEW0oJbSAtuwa1AldGg8PKQtP+GMHkHxkDG/qLVrtek6x65UCZPleYdH485HA4zrHHQ4R5F cPSTl4L0qigJDoxpoFRpUmMGKzR1sbpB3DTLsnzd83nL+XyeNHWDoBHEeg9YQlQWCtZrSmOa1YVN ktDkiz0FwmDJVbd7CizTUhcXLByDINXIiGyUQqnkL8Nm8iCY5CD1lkf+9UYQFykEhb7UqEGFeLwK Q6YgnXTovEtDZkHGZFpbR21nkLlhlUFqWig63XYGyevxeGSQXFjXG4lclSnyyekW/Ur+jFfzWRD6 31RoeQxAnxQB6cErQBKsywDpW6Yo93UgFAMg3DqgMaCqaRzEc4pBPh50fdxk9oF4zvPCCBDml6fo sIagnClVNTmQn/BAmOXxn4LMXQan45vrJCg07QPC/JI8BeT3BjidLNkGpOu1anSNbgd5U6qWx4Ak DOL1RotkTLMV8ouEWYc8yNzezcBNVchv5MIK8VKEHjKrM0D+malvyFoqxG2kLBHIMCmo3EAjFfLl MSAeNSzZoeZZIH/SHAim3I1MMwvC7syAeBuEyV++s3aA2suDHkI7nyi6UUTCHwLGKxSCsFjzzpV3 ZNUihc+s9QqF7YwtEW88zAMQt5Ec7AkKx4uvWjChwaujFoAay+PLUHhQ5LQXKeVu7y2a0GRY/LZq +gG1jBROap4Sy0XyX1VNyf8Ekav8lom5dqFyocn0k62QOenWkBC05uNNDyCv2fpj2mUtxve7vGZB 21CqI1X1BaBhTfiz1QDL9tAMaN70C8L8ei/Q32rYlN6hgdj0DS+u5+J4AqFYAAAAAElFTkSuQmCC Date: Sun, 29 Sep 2019 02:42:54 -0300 Message-ID: <87eezzwtcx.fsf@oitofelix.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Emacs developers, The inlined patch implements sanitation of single-file package=E2=80=99s lo= ng description which is derived from the package=E2=80=99s commentary header section. It removes the commentary header, the double semicolon prefix of each line, trailing new-lines and trailing white-space. I think this is the usual practice for packages in GNU ELPA and MELPA repositories. Furthermore it=E2=80=99s aligned with the intended behavior for multi-file packages which is to read the long description from a README file[1] --- which presumably does not have commentary sections nor double semicolon prefixes. Please, let me know of any changes required. Thanks! PS: For some reason I was not able to use a single regexp within a single invocation of =E2=80=98replace-regexp-in-string=E2=80=99, as would b= e natural. It simply didn=E2=80=99t work as expected. It=E2=80=99s working fine now w= ith nested calls. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=package-x-single-file-package-long-description-sanitization.patch diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index 2815be3..7fe6f6d 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -159,6 +159,7 @@ DESCRIPTION is the text of the news item." (declare-function lm-commentary "lisp-mnt" (&optional file)) (defvar tar-data-buffer) +(defvar lm-commentary-header) (defun package-upload-buffer-internal (pkg-desc extension &optional archive-url) "Upload a package whose contents are in the current buffer. @@ -204,7 +205,17 @@ if it exists." (split-version (package-desc-version pkg-desc)) (commentary (pcase file-type - ('single (lm-commentary)) + ('single (replace-regexp-in-string ; Get rid of... + "[[:blank:]]*$" "" ; trailing white-space + (replace-regexp-in-string + (format "%s\\|%s\\|%s" + ;; commentary header + (concat "^;;;[[:blank:]]*\\(" + lm-commentary-header + "\\):[[:blank:]\n]*") + "^;;[[:blank:]]*" ; double semicolon prefix + "[[:blank:]\n]*\\'") ; trailing new-lines + "" (lm-commentary)))) ('tar nil))) ;; FIXME: Get it from the README file. (extras (package-desc-extras pkg-desc)) (pkg-version (package-version-join split-version)) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Footnotes:=20 [1] I=E2=80=99ve implemented that in bug#37546. --=20 88888 FFFFF Bruno F=C3=A9lix Rezende Ribeiro (oitofelix) [0x28D618AF] 8 8 F http://oitofelix.freeshell.org/ 88888 FFFF mailto:oitofelix@gnu.org 8 8 F irc://chat.freenode.org/oitofelix 88888 F xmpp://oitofelix@riseup.net --=-=-=-- From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 17:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Cc: 37548@debbugs.gnu.org Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.15698644542681 (code B ref 37548); Mon, 30 Sep 2019 17:28:01 +0000 Received: (at 37548) by debbugs.gnu.org; 30 Sep 2019 17:27:34 +0000 Received: from localhost ([127.0.0.1]:60438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEzSQ-0000hB-6h for submit@debbugs.gnu.org; Mon, 30 Sep 2019 13:27:34 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:33290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEzSO-0000gw-8l for 37548@debbugs.gnu.org; Mon, 30 Sep 2019 13:27:32 -0400 Received: by mail-pf1-f178.google.com with SMTP id q10so6005335pfl.0 for <37548@debbugs.gnu.org>; Mon, 30 Sep 2019 10:27:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MvqhGO3E3D6r9Dn6aX5xJ7HLTexONCDXkskfKXH0xK0=; b=P6bPu9EWqHp8xssOHcne6mM93wbmY9wtxYjrDEKLrEL/8hiFt5ALcwtlNu14taOfSh kyDiFLENnVue0osPS5xRg3ZnVEYSBGfuM4nQcstm6GCAurMj0YMv5s9UE8C/ALwQuxJY c2s+biQATBC39AUXfnEDJE5u2zuzMW8OKsH1lzrM3e12cUn41bQZssxcJ1xhRW3Sialq XrHq5CQ4eEfsZXJd5nyS+eBmSbM7a4h7bNDFzfCZP/CCPBBIF/vlhgV0e9BSMKv37lPf JM+Oc8rudaLCXsj/oNHCorqwHjVrFQ/wBAlKTYLqv+5oXuv/WCWwhK1XFhXFQHyPhRgm u5+Q== X-Gm-Message-State: APjAAAWDgwRjZX3jiQuhegacdFj2pcUjCJRKMNk7zX6NkwP3YRbaSWdj /YA8ftd58FM00cI8gZGwxRQCB5KsE/ZpdSwmchyKzrt9u+A= X-Google-Smtp-Source: APXvYqxnhNNqpE7X6G4ldW0r+hwyXqeJqipWPfom4ce70uyoCc4bRpxu4FiJ9YU/BW4PGxkD1FXKDfjrp8hcn+meKOo= X-Received: by 2002:a17:90b:8d1:: with SMTP id ds17mr374922pjb.106.1569864445405; Mon, 30 Sep 2019 10:27:25 -0700 (PDT) MIME-Version: 1.0 References: <87eezzwtcx.fsf@oitofelix.com> In-Reply-To: <87eezzwtcx.fsf@oitofelix.com> From: Stefan Kangas Date: Mon, 30 Sep 2019 19:27:14 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Bruno F=C3=A9lix Rezende Ribeiro writes: > Hello Emacs developers, Hi Bruno, And thanks for your patch. > The inlined patch implements sanitation of single-file package=E2=80=99s = long > description which is derived from the package=E2=80=99s commentary header > section. It removes the commentary header, the double semicolon prefix > of each line, trailing new-lines and trailing white-space. I think this > is the usual practice for packages in GNU ELPA and MELPA repositories. > Furthermore it=E2=80=99s aligned with the intended behavior for multi-fil= e > packages which is to read the long description from a README file[1] --- > which presumably does not have commentary sections nor double semicolon > prefixes. I agree with the change. However, there seems to be code duplication here, since the same is done in package.el: ;; For built-in packages, get the description from the ;; Commentary header. (let ((fn (locate-file (format "%s.el" name) load-path load-file-rep-suffixes)) (opoint (point))) (insert (or (lm-commentary fn) "")) (save-excursion (goto-char opoint) (when (re-search-forward "^;;; Commentary:\n" nil t) (replace-match "")) (while (re-search-forward "^\\(;+ ?\\)" nil t) (replace-match "")))) Maybe it would make more sense to create a new function in package.el that takes care of this? That way we don't have the same functionality in two places. FWIW, I would probably prefer to base it on the code already in package.el, since I find it a bit easier to read when the regular expressions are split up. Best regards, Stefan Kangas From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Cc: 37548@debbugs.gnu.org Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.15698651873846 (code B ref 37548); Mon, 30 Sep 2019 17:40:02 +0000 Received: (at 37548) by debbugs.gnu.org; 30 Sep 2019 17:39:47 +0000 Received: from localhost ([127.0.0.1]:60455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEzeE-0000zx-Iz for submit@debbugs.gnu.org; Mon, 30 Sep 2019 13:39:46 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:33735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEzeC-0000zf-Sf for 37548@debbugs.gnu.org; Mon, 30 Sep 2019 13:39:45 -0400 Received: by mail-pl1-f177.google.com with SMTP id d22so4189391pls.0 for <37548@debbugs.gnu.org>; Mon, 30 Sep 2019 10:39:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sfQTMkONf+nWiQLQsX46lCA2nUpKi8uzLWs85WBW45Q=; b=hUKpkVI4k4cyeiBpmXot7fexlIDHT1H1DNJlJrZq7/x+d+jO/ffHO0Hjxmxvt/04o5 VLDZWkp89MBKGh64DCNPzNUiSYNitJfQsgSP3hnEkOENtvwYtP2swA8ycA6J5DOq9AGJ i4oEf6W+P/Jbj8lQhg+2uBcviP2CRjCvTxh1HfQ36LVQDwoNAbuzsi5fnJGljdqGRkIs dvMdkRANExGqeKB7Eo00uHy8nQ8FfLdJXKNJbGOf89HMWo2c0bN3MyzUBiP3z+ZU/ygX XRBcBUbcpZ1vJowvnMKmZewr7talNmbt94lEkAStmORnCFRTtmaN5rtx2FphCjt1x/0h 48gg== X-Gm-Message-State: APjAAAUilGGXnqzHhaK/XtLyhq86csLHCsfC7nQWgeg3p+hhPz6cAnrH Up8uoHfWRT+OHdRWtR+x5DrihHgtGZmo+XLudI4= X-Google-Smtp-Source: APXvYqwONYpNKJK1Lip7xVWvUxQIB/9wJCBcOoAWSwv/0P+CatocdbsLeSdhC3slVCRhNoCI5a9sBHlFCBGM6uM/F5c= X-Received: by 2002:a17:902:d88f:: with SMTP id b15mr20472300plz.251.1569865178033; Mon, 30 Sep 2019 10:39:38 -0700 (PDT) MIME-Version: 1.0 References: <87eezzwtcx.fsf@oitofelix.com> In-Reply-To: From: Stefan Kangas Date: Mon, 30 Sep 2019 19:39:26 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Kangas writes: > Maybe it would make more sense to create a new function in package.el > that takes care of this? That way we don't have the same > functionality in two places. I noticed something else: There is actually already code duplication in package.el -- there is code to strip the commentary section in both package--get-description and describe-package-1. Perhaps it would make sense to look this all over and see how we can do better? I also have two general questions, which are applicable to both your recent patches: 1. It looks likely that this together with your other patch and your previous contributions will together amount to more than 15 lines of code. That means that you would have to sign Copyright Assignment papers for GNU Emacs. I see you're emailing from gnu.org, so I assume there are no surprises for you here; I guess Eli can help you sort that out if it's not already. 2. Could you please provide a commit message formatted as a changelog entry? Details on this are in the CONTRIBUTE file in the repository. Best regards, Stefan Kangas From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2019 08:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro , 37548@debbugs.gnu.org Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.15705238205426 (code B ref 37548); Tue, 08 Oct 2019 08:37:01 +0000 Received: (at 37548) by debbugs.gnu.org; 8 Oct 2019 08:37:00 +0000 Received: from localhost ([127.0.0.1]:49444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHkzG-0001PM-CQ for submit@debbugs.gnu.org; Tue, 08 Oct 2019 04:37:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHkzD-0001P8-8d for 37548@debbugs.gnu.org; Tue, 08 Oct 2019 04:36:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iHkz7-0000Tj-T5; Tue, 08 Oct 2019 04:36:46 -0400 Received: from [189.15.97.184] (port=49772 helo=felix-laptop) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1iHkz5-0005KU-Sk; Tue, 08 Oct 2019 04:36:44 -0400 From: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro References: <87eezzwtcx.fsf@oitofelix.com> X-Face: %,T7Hsg=SK$Zh)wiU4Qdv9-fZ26Pf5*+}Ld,{LeV'Cq-1?=kA"hc,'i""S85]g; _W+{nZfx 2GnAMS1K\E_E&:{h[wQd+Tqj5#PtH:W&8^crA0>i?nmD7hOL$K".`@An_8.7gaObQLlMy0\%%I0Jp. Lue$J0B Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACcElEQVRYw93YzXHCQAwF4G0h Fw4caYEW0oJbSAtuwa1AldGg8PKQtP+GMHkHxkDG/qLVrtek6x65UCZPleYdH485HA4zrHHQ4R5F cPSTl4L0qigJDoxpoFRpUmMGKzR1sbpB3DTLsnzd83nL+XyeNHWDoBHEeg9YQlQWCtZrSmOa1YVN ktDkiz0FwmDJVbd7CizTUhcXLByDINXIiGyUQqnkL8Nm8iCY5CD1lkf+9UYQFykEhb7UqEGFeLwK Q6YgnXTovEtDZkHGZFpbR21nkLlhlUFqWig63XYGyevxeGSQXFjXG4lclSnyyekW/Ur+jFfzWRD6 31RoeQxAnxQB6cErQBKsywDpW6Yo93UgFAMg3DqgMaCqaRzEc4pBPh50fdxk9oF4zvPCCBDml6fo sIagnClVNTmQn/BAmOXxn4LMXQan45vrJCg07QPC/JI8BeT3BjidLNkGpOu1anSNbgd5U6qWx4Ak DOL1RotkTLMV8ouEWYc8yNzezcBNVchv5MIK8VKEHjKrM0D+malvyFoqxG2kLBHIMCmo3EAjFfLl MSAeNSzZoeZZIH/SHAim3I1MMwvC7syAeBuEyV++s3aA2suDHkI7nyi6UUTCHwLGKxSCsFjzzpV3 ZNUihc+s9QqF7YwtEW88zAMQt5Ec7AkKx4uvWjChwaujFoAay+PLUHhQ5LQXKeVu7y2a0GRY/LZq +gG1jBROap4Sy0XyX1VNyf8Ekav8lom5dqFyocn0k62QOenWkBC05uNNDyCv2fpj2mUtxve7vGZB 21CqI1X1BaBhTfiz1QDL9tAMaN70C8L8ei/Q32rYlN6hgdj0DS+u5+J4AqFYAAAAAElFTkSuQmCC Date: Tue, 08 Oct 2019 05:36:40 -0300 In-Reply-To: (Stefan Kangas's message of "Mon, 30 Sep 2019 19:39:26 +0200") Message-ID: <87d0f7tyzr.fsf@oitofelix.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Stefan Kangas writes: > > I noticed something else: There is actually already code duplication > in package.el -- there is code to strip the commentary section in both > package--get-description and describe-package-1. > > Perhaps it would make sense to look this all over and see how we can do b= etter? I decided to tackle the problem=E2=80=99s root. After figuring out that ev= ery function depending on =E2=80=98lm-commentary=E2=80=99 implemented their own= ad-hoc sanitation for the same effect, I changed =E2=80=98lm-commentary=E2=80=99 t= o return a sanitized string and removed the code/functionality duplication from all callers. > I also have two general questions, which are applicable to both your > recent patches: > > 1. It looks likely that this together with your other patch and your > previous contributions will together amount to more than 15 lines of > code. That means that you would have to sign Copyright Assignment > papers for GNU Emacs. I see you're emailing from gnu.org, so I assume > there are no surprises for you here; I guess Eli can help you sort > that out if it's not already. I=E2=80=99ve assigned my copyright for work on Emacs to the FSF already. > 2. Could you please provide a commit message formatted as a changelog > entry? Details on this are in the CONTRIBUTE file in the repository. Please, find it in the patch attached. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-Globally-sanitize-single-file-package-long-descripti.patch Content-Transfer-Encoding: quoted-printable >From d3e3983fc6cb74900bfa99f0bfcf2497ab396d67 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Bruno=3D20F=3DC3=3DA9lix=3D20Rezende=3D20Ribeiro?=3D Date: Tue, 8 Oct 2019 04:32:18 -0300 Subject: [PATCH] Globally sanitize single-file package long descriptions (Bug#37548) MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Consistent with multi-file package descriptions which don=E2=80=99t have commentary sections nor double semicolon prefixes. * lisp/emacs-lisp/lisp-mnt.el (lm-commentary): Remove commentary header, double semicolon prefixes of each line, trailing new-lines and trailing white-space from commentary. * lisp/emacs-lisp/package.el (package--get-description) (describe-package-1): * lisp/finder.el (finder-commentary): * lisp/info.el (Info-finder-find-node): remove ad-hoc sanitation. --- lisp/emacs-lisp/lisp-mnt.el | 14 +++++++++++++- lisp/emacs-lisp/package.el | 30 ++++++++---------------------- lisp/finder.el | 8 +------- lisp/info.el | 16 ++-------------- 4 files changed, 24 insertions(+), 44 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 91c7615..dda7895 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -4,6 +4,7 @@ ;; Inc. =20 ;; Author: Eric S. Raymond +;; Bruno F=C3=A9lix Rezende Ribeiro ;; Maintainer: emacs-devel@gnu.org ;; Created: 14 Jul 1992 ;; Keywords: docs @@ -485,7 +486,18 @@ absent, return nil." (lm-with-file file (let ((start (lm-commentary-start))) (when start - (buffer-substring-no-properties start (lm-commentary-end)))))) + (replace-regexp-in-string ; Get rid of... + "[[:blank:]]*$" "" ; trailing white-space + (replace-regexp-in-string + (format "%s\\|%s\\|%s" + ;; commentary header + (concat "^;;;[[:blank:]]*\\(" + lm-commentary-header + "\\):[[:blank:]\n]*") + "^;;[[:blank:]]*" ; double semicolon prefix + "[[:blank:]\n]*\\'") ; trailing new-lines + "" (buffer-substring-no-properties + start (lm-commentary-end)))))))) =20 (defun lm-homepage (&optional file) "Return the homepage in file FILE, or current buffer if FILE is nil." diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index ab1fb8b..f65559d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4,6 +4,7 @@ =20 ;; Author: Tom Tromey ;; Daniel Hackney +;; Bruno F=C3=A9lix Rezende Ribeiro ;; Created: 10 Mar 2007 ;; Version: 1.1.0 ;; Keywords: tools @@ -2349,18 +2350,9 @@ The description is read from the installed package f= iles." result =20 ;; Look for Commentary header. - (let ((mainsrcfile (expand-file-name (format "%s.el" (package-desc-na= me desc)) - srcdir))) - (when (file-readable-p mainsrcfile) - (with-temp-buffer - (insert (or (lm-commentary mainsrcfile) "")) - (goto-char (point-min)) - (when (re-search-forward "^;;; Commentary:\n" nil t) - (replace-match "")) - (while (re-search-forward "^\\(;+ ?\\)" nil t) - (replace-match "")) - (buffer-string)))) - ))) + (or (lm-commentary (expand-file-name + (format "%s.el" (package-desc-name desc)) srcdir)) + "")))) =20 (defun describe-package-1 (pkg) "Insert the package description for PKG. @@ -2555,16 +2547,10 @@ Helper function for `describe-package'." (if built-in ;; For built-in packages, get the description from the ;; Commentary header. - (let ((fn (locate-file (format "%s.el" name) load-path - load-file-rep-suffixes)) - (opoint (point))) - (insert (or (lm-commentary fn) "")) - (save-excursion - (goto-char opoint) - (when (re-search-forward "^;;; Commentary:\n" nil t) - (replace-match "")) - (while (re-search-forward "^\\(;+ ?\\)" nil t) - (replace-match "")))) + (insert (or (lm-commentary (locate-file (format "%s.el" name) + load-path + load-file-rep-suffixes)) + "")) =20 (if (package-installed-p desc) ;; For installed packages, get the description from the diff --git a/lisp/finder.el b/lisp/finder.el index 89706cf..02d25ec 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -4,6 +4,7 @@ ;; Inc. =20 ;; Author: Eric S. Raymond +;; Bruno F=C3=A9lix Rezende Ribeiro ;; Created: 16 Jun 1992 ;; Version: 1.0 ;; Keywords: help @@ -394,13 +395,6 @@ FILE should be in a form suitable for passing to `loca= te-library'." (erase-buffer) (insert str) (goto-char (point-min)) - (delete-blank-lines) - (goto-char (point-max)) - (delete-blank-lines) - (goto-char (point-min)) - (while (re-search-forward "^;+ ?" nil t) - (replace-match "" nil nil)) - (goto-char (point-min)) (while (re-search-forward "\\<\\([-[:alnum:]]+\\.el\\)\\>" nil t) (if (locate-library (match-string 1)) (make-text-button (match-beginning 1) (match-end 1) diff --git a/lisp/info.el b/lisp/info.el index 02f3ea5..4262219 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3780,20 +3780,8 @@ Build a menu of the possible matches." ;; there is no "nxml.el" (it's nxml-mode.el). ;; But package.el makes the same assumption. ;; I think nxml is the only exception - maybe it should be just be ren= amed. - (let ((str (ignore-errors (lm-commentary (find-library-name nodename))= ))) - (if (null str) - (insert "Can=E2=80=99t find package description.\n\n") - (insert - (with-temp-buffer - (insert str) - (goto-char (point-min)) - (delete-blank-lines) - (goto-char (point-max)) - (delete-blank-lines) - (goto-char (point-min)) - (while (re-search-forward "^;+ ?" nil t) - (replace-match "" nil nil)) - (buffer-string)))))))) + (insert (or (ignore-errors (lm-commentary (find-library-name nodename)= )) + (insert "Can=E2=80=99t find package description.\n\n")))))) =20 ;;;###autoload (defun info-finder (&optional keywords) --=20 2.7.4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Bruno F=C3=A9lix Rezende Ribeiro (oitofelix) [0x28D618AF] --=-=-=-- From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2019 08:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Cc: 37548@debbugs.gnu.org, oitofelix@gnu.org, stefan@marxist.se Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.15705240805825 (code B ref 37548); Tue, 08 Oct 2019 08:42:02 +0000 Received: (at 37548) by debbugs.gnu.org; 8 Oct 2019 08:41:20 +0000 Received: from localhost ([127.0.0.1]:49449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHl3X-0001Vs-0N for submit@debbugs.gnu.org; Tue, 08 Oct 2019 04:41:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHl3W-0001Vg-0t for 37548@debbugs.gnu.org; Tue, 08 Oct 2019 04:41:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iHl3K-000763-SW; Tue, 08 Oct 2019 04:41:06 -0400 Received: from [176.228.60.248] (port=2443 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iHl3B-0005tL-FJ; Tue, 08 Oct 2019 04:41:00 -0400 Date: Tue, 08 Oct 2019 11:40:52 +0300 Message-Id: <83tv8jy6i3.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87d0f7tyzr.fsf@oitofelix.com> (message from Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro on Tue, 08 Oct 2019 05:36:40 -0300) References: <87eezzwtcx.fsf@oitofelix.com> <87d0f7tyzr.fsf@oitofelix.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Bruno Félix Rezende Ribeiro > Date: Tue, 08 Oct 2019 05:36:40 -0300 > Cc: Bruno Félix Rezende Ribeiro , > 37548@debbugs.gnu.org > > > 1. It looks likely that this together with your other patch and your > > previous contributions will together amount to more than 15 lines of > > code. That means that you would have to sign Copyright Assignment > > papers for GNU Emacs. I see you're emailing from gnu.org, so I assume > > there are no surprises for you here; I guess Eli can help you sort > > that out if it's not already. > > I’ve assigned my copyright for work on Emacs to the FSF already. Right, Bruno's copyright assignment is on file. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 08 13:57:44 2019 Received: (at control) by debbugs.gnu.org; 8 Oct 2019 17:57:44 +0000 Received: from localhost ([127.0.0.1]:51461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHtjz-0006n5-TA for submit@debbugs.gnu.org; Tue, 08 Oct 2019 13:57:44 -0400 Received: from mail-pl1-f180.google.com ([209.85.214.180]:37815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHtjy-0006mq-Eh for control@debbugs.gnu.org; Tue, 08 Oct 2019 13:57:42 -0400 Received: by mail-pl1-f180.google.com with SMTP id u20so8777186plq.4 for ; Tue, 08 Oct 2019 10:57:42 -0700 (PDT) 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; bh=ZR0rrDXNmVjxNDiEZ3XQmp7ET+V54OYp5LlV+l/O40I=; b=QGFuMnPdOQsW3RGcAA8+hOdNiqanczLBJ4WB3fRdFTRNqFw8LV4edHUYMpDeeuuBY0 EkJ1lrte/OpIzj5/g+rCtOwbRqWRWu43LpWtdqhTbfUv/uTTc2oh8uPNCE/IUi+7a5tA r6sUzOctyPpplp5hv8kNbyBP5njXVyv9llqxAcDNY94sp73PsZWaghRaG9ljbVqKAQHM 1GFNHegPwZKymfxzmv5G2mfmLPLpGcxmngoGzq6bRlf6rKq9ake09R2qxnVEfCzHGq+8 jgaXb94ZpZP0FfiFw97ZOHvGcs88o9WKOzT46a0UijoDqjFRiQk8sCdrmLooCqJuShTF 7MeA== X-Gm-Message-State: APjAAAVX+fNjrhDAkzMZTQLqhyfIOVWT+X9FQWCy/8JJe7FM5fsiE8cT 1lkrgjWPxUsCMgsI4byhHEEc8YJMtX6fE9ZVMbWYTVY6 X-Google-Smtp-Source: APXvYqxtju8lm7VmcGPcbkgeEJmYkJeymJ10b+SlNpUPhxplsrpBmn6NP++4V0ZGYP8c2F2n99qCSm7Ybhc60Ti7zHk= X-Received: by 2002:a17:902:6b88:: with SMTP id p8mr30830302plk.251.1570557456211; Tue, 08 Oct 2019 10:57:36 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Tue, 8 Oct 2019 19:57:24 +0200 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 37548 + patch quit Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.214.180 listed in list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 37548 + patch quit Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.214.180 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 2.0 BLANK_SUBJECT Subject is present but empty tags 37548 + patch quit From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Nov 2019 19:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Cc: 37548@debbugs.gnu.org Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.157349893425112 (code B ref 37548); Mon, 11 Nov 2019 19:03:02 +0000 Received: (at 37548) by debbugs.gnu.org; 11 Nov 2019 19:02:14 +0000 Received: from localhost ([127.0.0.1]:55990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUEx3-0006Wy-T4 for submit@debbugs.gnu.org; Mon, 11 Nov 2019 14:02:14 -0500 Received: from host.gofardesign.uk ([208.79.239.190]:46351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUEx2-0006Wj-Fv for 37548@debbugs.gnu.org; Mon, 11 Nov 2019 14:02:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=2RFIvKvhSEhb/aSW35yIn9AptOmTRhhmdLr0KgGu5k8=; b=f/RF4MbVegNnnhLMXH/kCOIhGQ Fw9Wjf0E6eEIH35Dk2vsWriPnHDpiK8j9dNAAd+nzQ78s/Gd3LI1D7/2TlkTS6yD35KGz1MW1Y9Z5 XjreO4X8cWux49qezXEs54d1bcyMDbFgMkuXp3nr6IL8cs2w+0/qL7AKsdhJUQSIlzmg=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:40638 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iUEww-0008La-76; Mon, 11 Nov 2019 13:02:06 -0600 From: Stefan Kangas In-Reply-To: <87d0f7tyzr.fsf@oitofelix.com> ("Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro"'s message of "Tue, 08 Oct 2019 05:36:40 -0300") References: <87eezzwtcx.fsf@oitofelix.com> <87d0f7tyzr.fsf@oitofelix.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Mon, 11 Nov 2019 20:02:04 +0100 Message-ID: <8736eup783.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-OutGoing-Spam-Status: No, score=-0.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Bruno F=C3=A9lix Rezende Ribeiro writes: >> Stefan Kangas writes: >> >> I noticed something else: There is actually already code duplication >> in package.el -- there is code to strip the commentary section in both >> package--get-description and describe-package-1. >> >> Perhaps it would make sense to look this all over and see how we can do = better? > > I decided to tackle the problem=E2=80=99s root. After figuring out that = every > function depending on =E2=80=98lm-commentary=E2=80=99 implemented their o= wn ad-hoc > sanitation for the same effect, I changed =E2=80=98lm-commentary=E2=80=99= to return a > sanitized string and removed the code/functionality duplication from all > callers. Sorry for the late reply here. I think your approach makes sense. > I=E2=80=99ve assigned my copyright for work on Emacs to the FSF already. Great, thanks. > Please, find it in the patch attached. I think the patch looks good, but I didn't test it yet. By the way, it would be very good if you would like to add tests. I don't think a lack of tests should stop us from applying your patch. But it would be a big plus to have them. > --- a/lisp/emacs-lisp/lisp-mnt.el > +++ b/lisp/emacs-lisp/lisp-mnt.el > @@ -4,6 +4,7 @@ > ;; Inc. >=20=20 > ;; Author: Eric S. Raymond > +;; Bruno F=C3=A9lix Rezende Ribeiro > ;; Maintainer: emacs-devel@gnu.org > ;; Created: 14 Jul 1992 > ;; Keywords: docs > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -4,6 +4,7 @@ >=20=20 > ;; Author: Tom Tromey > ;; Daniel Hackney > +;; Bruno F=C3=A9lix Rezende Ribeiro > ;; Created: 10 Mar 2007 > ;; Version: 1.1.0 > ;; Keywords: tools I think we don't usually add our names as authors in every file we change. We have other ways to track that, such as the AUTHORS file. For this file, for instance, I see only one person in the author field, but AFAICT there are 16 contributors with 99 commits in total. Does anyone know if there is a general guideline for when to add your name to the "Author" line at the top of the file? Best regards, Stefan Kangas From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2019 11:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Kangas Cc: oitofelix@gnu.org, 37548@debbugs.gnu.org Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.15737309618924 (code B ref 37548); Thu, 14 Nov 2019 11:30:03 +0000 Received: (at 37548) by debbugs.gnu.org; 14 Nov 2019 11:29:21 +0000 Received: from localhost ([127.0.0.1]:32794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVDJQ-0002Js-So for submit@debbugs.gnu.org; Thu, 14 Nov 2019 06:29:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVDJP-0002JV-L0 for 37548@debbugs.gnu.org; Thu, 14 Nov 2019 06:29:20 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVDJK-00045z-8M; Thu, 14 Nov 2019 06:29:14 -0500 Received: from [176.228.60.248] (port=2751 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iVDJI-0007um-Bi; Thu, 14 Nov 2019 06:29:12 -0500 Date: Thu, 14 Nov 2019 13:28:56 +0200 Message-Id: <83d0du7l3b.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <8736eup783.fsf@marxist.se> (message from Stefan Kangas on Mon, 11 Nov 2019 20:02:04 +0100) References: <87eezzwtcx.fsf@oitofelix.com> <87d0f7tyzr.fsf@oitofelix.com> <8736eup783.fsf@marxist.se> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Mon, 11 Nov 2019 20:02:04 +0100 > Cc: 37548@debbugs.gnu.org > > Does anyone know if there is a general guideline for when to add your > name to the "Author" line at the top of the file? Only when the file is first written, AFAIK. From unknown Fri Jun 13 10:01:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#37548: Implement sanitation of single-file package long description Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jan 2020 22:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Cc: 37548@debbugs.gnu.org Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.157981728524798 (code B ref 37548); Thu, 23 Jan 2020 22:09:01 +0000 Received: (at 37548) by debbugs.gnu.org; 23 Jan 2020 22:08:05 +0000 Received: from localhost ([127.0.0.1]:53289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iukdx-0006Rs-Eq for submit@debbugs.gnu.org; Thu, 23 Jan 2020 17:08:05 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:36330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iukdw-0006RB-7E; Thu, 23 Jan 2020 17:08:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:References:Message-ID:Date: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8IHKF1JFOyIaVUjuZbc0l8AJaXdHmyuALGtIaFf0cGs=; b=YSSchlWPBDXYr7STY0TcBfokD5 +/VoKBXYj3fPA5FN3lMZFT9rBIipoVKsno1L10KIvB508UEVVgy1luFAdzujBWmo26R7cKDp5w2pa hTp2hXqXgg4JiK6apJghNOiZ1649CEUoUZzY+xQEs9KhTIWjzU8uVSb1Est6HkQnt1+XjXfMgwDCT +23iRbOE1Hok6hlDLIIFsu2P9VvuP6gQBeWfEG6L7VxHMwCva7a0f9SWgEfWPzLXzZVBBQiVRUX9b 2wXeCTuvsUmBasksFroJuNWTXV8y89l1ujoHTf/SPb67rsxWNDYzkz2FtAIaRNfVUugx4lVE4+sbR s+x9TI7A==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:42666 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iukdq-0012gH-IL; Thu, 23 Jan 2020 17:07:58 -0500 From: Stefan Kangas In-Reply-To: <8736eup783.fsf@marxist.se> (Stefan Kangas's message of "Mon, 11 Nov 2019 20:02:04 +0100") Date: Thu, 23 Jan 2020 21:56:53 +0100 Message-ID: <87h80lq4bu.fsf@marxist.se> References: <87eezzwtcx.fsf@oitofelix.com> <87d0f7tyzr.fsf@oitofelix.com> <8736eup783.fsf@marxist.se> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 37548 28.1 thanks Stefan Kangas writes: >> Please, find it in the patch attached. > > I think the patch looks good, but I didn't test it yet. Sorry for the long delay here. I have now reviewed and tested your patch again, and also tested all relevant functionality AFAICT. I've pushed it to the master branch with one or two minor stylistic changes, modulo this: > I think we don't usually add our names as authors in every file we > change. We have other ways to track that, such as the AUTHORS file. I'm consequently closing this bug. Thank you again for your contribution to Emacs. Best regards, Stefan Kangas