GNU bug report logs - #37546
26.3; Implement multi-file package README long description generation as described by elisp manual

Previous Next

Package: emacs;

Reported by: oitofelix <at> gnu.org (Bruno Félix Rezende Ribeiro)

Date: Sun, 29 Sep 2019 03:53:02 UTC

Severity: normal

Found in version 26.3

Full log


View this message in rfc822 format

From: oitofelix <at> gnu.org (Bruno Félix Rezende Ribeiro)
To: 37546 <at> debbugs.gnu.org
Subject: bug#37546: 26.3; Implement multi-file package README long description generation as described by elisp manual
Date: Sun, 29 Sep 2019 00:52:04 -0300
[Message part 1 (text/plain, inline)]
Hello Emacs developers,

The inlined patch implements the (already expected) generation of
multi-file package long description from a potential README file
residing inside the package’s content directory.  Currently Emacs only
implements the long description generation from commentary sections and
for single-file packages.

This behavior is documented in ‘(elisp) Multi-file Packages’ and the
function ‘package-upload-buffer-internal’ from ‘package-x.el’ had a
‘FIXME: Get it from the README file.’ right on the spot of this
implementation.


Let me know if any change is necessary.  Thanks!


[package-x-multi-file-README-long-description.patch (text/x-diff, inline)]
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el
index 2815be3..d929cf5 100644
--- a/lisp/emacs-lisp/package-x.el
+++ b/lisp/emacs-lisp/package-x.el
@@ -205,7 +205,10 @@ if it exists."
 	       (commentary
                 (pcase file-type
                   ('single (lm-commentary))
-                  ('tar nil))) ;; FIXME: Get it from the README file.
+                  ('tar (when (file-exists-p "README")
+                          (with-temp-buffer
+                            (insert-file-contents "README")
+                            (buffer-string))))))
                (extras (package-desc-extras pkg-desc))
 	       (pkg-version (package-version-join split-version))
 	       (pkg-buffer (current-buffer)))
[Message part 3 (text/plain, inline)]

-- 
 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/
 88888  FFFF  mailto:oitofelix <at> gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     xmpp://oitofelix <at> riseup.net


This bug report was last modified 5 years and 143 days ago.

Previous Next


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