From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Arash Esbati <arash@gnu.org>,
Philip Kaludercic <philipk@posteo.net>,
74828@debbugs.gnu.org
Subject: bug#74828: ELPA release note summary strips one line
Date: Wed, 01 Jan 2025 22:13:35 -0500 [thread overview]
Message-ID: <jwvttahsycf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADwFkmnBXc1runtR=BpJsOBVor3sCafKxcSR-CwJPHASWTzuDg@mail.gmail.com> (Stefan Kangas's message of "Wed, 1 Jan 2025 19:34:41 -0600")
>> 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@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))
next prev parent reply other threads:[~2025-01-02 3:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 13:05 bug#74828: ELPA release note summary strips one line Arash Esbati
2025-01-02 1:34 ` Stefan Kangas
2025-01-02 3:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2025-01-02 17:02 ` Arash Esbati
2025-01-02 17:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvttahsycf.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=74828@debbugs.gnu.org \
--cc=arash@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=philipk@posteo.net \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).