Subject: Re: bug#34147: 27.0.50; M-x describe-package groovy-mode breaks

From: Federico Tedin <[email-masked]>
Date: Tue, 12 Mar 2019 21:39:11 -0300

I'm attaching a small patch with the changes I suggested above.

>From b842f54518a6565edd78a363b65e8a8b690dbdf8 Mon Sep 17 00:00:00 2001
From: Federico Tedin <[email-masked]>
Date: Tue, 12 Mar 2019 21:34:31 -0300
Subject: [PATCH 1/1] Correctly handle packages without description in
 describe-package

* lisp/emacs-lisp/package.el (describe-package-1): Do not call insert
  if package description is nil (Bug#34147).
---
 lisp/emacs-lisp/package.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 5e8864ec73..ad1fb363f1 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2482,7 +2482,8 @@ describe-package-1
                 (insert ?\n)))
             (setq readme-string (buffer-string))
             t)
-          (insert readme-string))
+          (when readme-string
+            (insert readme-string)))
         ))))
 
 (defun package-install-button-action (button)
-- 
2.17.1