Subject: bug#30887: closed (Re: bug#30887: 27.0.50; fortune-message occupys two lines of height for one line message)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 21 Mar 2018 18:17:02 +0000

Your bug report

#30887: 27.0.50; fortune-message occupys two lines of height for one line message

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
30887: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30887
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#30887: 27.0.50; fortune-message occupys two lines of height for one line message
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Wed, 21 Mar 2018 14:16:10 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 27.1

commit 03a27fa
Date:   Wed Mar 21 14:10:05 2018 -0400

    * lisp/play/fortune.el (fortune-message):
    Avoid trailing newline.  (Bug#30887)

diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el
index 74ace06..740f436 100644
--- a/lisp/play/fortune.el
+++ b/lisp/play/fortune.el
@@ -313,6 +313,8 @@ fortune-message
   (with-temp-buffer
     (let ((fortune-buffer-name (current-buffer)))
       (fortune-in-buffer t file)
+      ;; Avoid trailing newline.
+      (if (bolp) (delete-char -1))
       (message "%s" (buffer-string)))))
 
 ;;;###autoload

Subject: 27.0.50; fortune-message occupys two lines of height for one line message
From: Xu Chunyang <[email-masked]>
To: [email-masked]
Date: Wed, 21 Mar 2018 03:14:44 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

For a very simple message such as "You now have Asian Flu.", M-x
fortune-message shows it in two lines of height

> You now have Asian Flu.

It is annoying because it changes the height of minibuffer/echo area.
The final newline is really unnecessary at least for message.