From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74828: ELPA release note summary strips one line Date: Wed, 01 Jan 2025 22:13:35 -0500 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 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="18990"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Arash Esbati , Philip Kaludercic , 74828@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 04:14:31 2025 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 1tTBfJ-0004la-72 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 04:14:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTBf0-0003gp-4p; Wed, 01 Jan 2025 22:14:10 -0500 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 1tTBes-0003fc-Sr for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2025 22:14:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTBes-0007LG-07 for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2025 22:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=8cP9OhNcpdJjzVFmtK6vG59u3jxEdfVQJTTkJTpYGpo=; b=I5y2eBCgQUxOWgWvIG66ASdkxeedzgc1Po2/sp8LrZ6O86xhg1FII4pQZqDWyC4FslRH6vei/dMpMghUiOVDRDBhOUNOYu/RL87Lt6wADYOq7gIft9EOs+YSEcjTtyiXACautCTOF2mvyRpY7PFuL1FSqUKIhgI7I//TsSXFt61U/cS9G+v9Wq9KmXRH42rGhTmd1keT7NzDK0uGrfegh/fyuUTVDEizcXsfFEyeHy8zPg8V0dGoqiOlKTpwT0sQRY3oiemfSpIf/kRu0cjlrHdKq6s3MU+pHIGz2PR4c4azZc1QcREJnwCwUjGhUOBOw6TLHaHo21k7mn6H7aVagw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTBer-0005rw-QK for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2025 22:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jan 2025 03:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74828 X-GNU-PR-Package: emacs Original-Received: via spool by 74828-submit@debbugs.gnu.org id=B74828.173578762722529 (code B ref 74828); Thu, 02 Jan 2025 03:14:01 +0000 Original-Received: (at 74828) by debbugs.gnu.org; 2 Jan 2025 03:13:47 +0000 Original-Received: from localhost ([127.0.0.1]:41632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTBed-0005rJ-Ae for submit@debbugs.gnu.org; Wed, 01 Jan 2025 22:13:47 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27029) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTBea-0005r5-TA for 74828@debbugs.gnu.org; Wed, 01 Jan 2025 22:13:45 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5CE71441F33; Wed, 1 Jan 2025 22:13:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735787617; bh=kUme9wtsfuQ0WozUno36T1dYUn/ygL+sp3ojcqMK/wM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=a3Mr8EpAXA1KMBclrupCQaJETgJ2VUTHXDyWI8erKVYqXcUHLNToxP72kxA8PuLEF +tthivjyzyzRFtlwv+hV+G6mCMC4zPH+Qa26aksF1DaEgrHdtRXJqJR+Mp2ARCPas2 LrJofAQm73uP+9pwjEdl286cC2fxbFjmVO3BeWRbjfQUn4qB86vgf/IOIba3XGleYK lOOC2iF7114BT8+IA3brD2WEf/5h/zZeBx46lerHteMrYPsXUo7G+e9Zd+5dnYZxoZ 4JD5kO7C9BfjQDuyATD8wNAQodLC9Lg7FjiyzDRAaPi+EfU2SW0oyr6nQL3FsO1TMx PUWC5wqMr3p5g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1AA44440709; Wed, 1 Jan 2025 22:13:37 -0500 (EST) Original-Received: from pastel (104-195-200-87.cpe.teksavvy.com [104.195.200.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DDD5A1201F3; Wed, 1 Jan 2025 22:13:36 -0500 (EST) In-Reply-To: (Stefan Kangas's message of "Wed, 1 Jan 2025 19:34:41 -0600") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298106 Archived-At: >> ELPA sends a note when a new package version is released. IIUC, the >> "Summary" part in this note is gathered from the ";;; Commentary:" >> section of the file where the version is bumped. >> >> I have the impression that one line is left out when the "Summary" is >> generated. See for example: Yup, sure enough. I believe I have fixed it with the patch below. Stefan diff --git a/elpa-admin.el b/elpa-admin.el index 72ff400c4f..c291c04448 100644 --- a/elpa-admin.el +++ b/elpa-admin.el @@ -1,6 +1,6 @@ ;;; elpa-admin.el --- Auto-generate an Emacs Lisp package archive -*- lex= ical-binding:t -*- =20 -;; Copyright (C) 2011-2024 Free Software Foundation, Inc +;; Copyright (C) 2011-2025 Free Software Foundation, Inc =20 ;; Author: Stefan Monnier =20 @@ -2652,12 +2652,16 @@ If WITH-CORE is non-nil, it means we manage :core p= ackages as well." (insert (if (not readme) "[Not provided =F0=9F=99=81]" (elpaa--section-to-plain-text readme))) + ;; It's import to terminate lines properly so we can detect + ;; truncated lines below to throw away the leftovers. + (unless (bolp) (insert "\n")) ;; Keep a max of about 10 lines of full-length text. (delete-region (min (+ beg 800) (point)) (point)) (let ((end (point))) (delete-region ;; Truncate at the end of the nearest paragraph. (or (re-search-backward "\n[ \t]*$" beg t) + ;; Throw away leftovers from truncated lines. (re-search-backward "\n" beg t) (point)) end))