From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#37548: Implement sanitation of single-file package long description Date: Mon, 11 Nov 2019 20:02:04 +0100 Message-ID: <8736eup783.fsf@marxist.se> References: <87eezzwtcx.fsf@oitofelix.com> <87d0f7tyzr.fsf@oitofelix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243981"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 37548@debbugs.gnu.org To: Bruno =?UTF-8?Q?F=C3=A9lix?= Rezende Ribeiro Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 11 20:03:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iUEyA-0011BI-HN for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 20:03:22 +0100 Original-Received: from localhost ([::1]:56436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUEy8-0001GE-W4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2019 14:03:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36766) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUExs-0001G3-2C for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 14:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUExq-0005Bg-SU for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 14:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47169) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iUExq-0005BZ-NS for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 14:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iUExq-0006Y5-I4 for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2019 14:03:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 37548-submit@debbugs.gnu.org id=B37548.157349893425112 (code B ref 37548); Mon, 11 Nov 2019 19:03:02 +0000 Original-Received: (at 37548) by debbugs.gnu.org; 11 Nov 2019 19:02:14 +0000 Original-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 Original-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=; Original-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 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") 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171437 Archived-At: 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