GNU bug report logs - #74828
ELPA release note summary strips one line

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Thu, 12 Dec 2024 13:06:02 UTC

Severity: normal

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 74828 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Arash Esbati <arash <at> gnu.org>, Philip Kaludercic <philipk <at> posteo.net>,
 74828 <at> debbugs.gnu.org
Subject: Re: bug#74828: ELPA release note summary strips one line
Date: Wed, 01 Jan 2025 22:13:35 -0500
>> 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  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2011-2024  Free Software Foundation, Inc
+;; Copyright (C) 2011-2025  Free Software Foundation, Inc
 
 ;; Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
 
@@ -2652,12 +2652,16 @@ If WITH-CORE is non-nil, it means we manage :core packages as well."
             (insert (if (not readme)
                         "[Not provided 🙁]"
                       (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))





This bug report was last modified 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.