GNU bug report logs - #30887
27.0.50; fortune-message occupys two lines of height for one line message

Previous Next

Package: emacs;

Reported by: Xu Chunyang <mail <at> xuchunyang.me>

Date: Tue, 20 Mar 2018 19:16:02 UTC

Severity: minor

Found in version 27.0.50

Fixed in version 27.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30887 in the body.
You can then email your comments to 30887 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#30887; Package emacs. (Tue, 20 Mar 2018 19:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Xu Chunyang <mail <at> xuchunyang.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 20 Mar 2018 19:16:02 GMT) Full text and rfc822 format available.

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

From: Xu Chunyang <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50;
 fortune-message occupys two lines of height for one line message
Date: Wed, 21 Mar 2018 03:14:44 +0800
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.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 21 Mar 2018 18:17:02 GMT) Full text and rfc822 format available.

Notification sent to Xu Chunyang <mail <at> xuchunyang.me>:
bug acknowledged by developer. (Wed, 21 Mar 2018 18:17:02 GMT) Full text and rfc822 format available.

Message #10 received at 30887-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 30887-done <at> debbugs.gnu.org
Subject: Re: bug#30887: 27.0.50;
 fortune-message occupys two lines of height for one line message
Date: Wed, 21 Mar 2018 14:16:10 -0400
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 19 Apr 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 119 days ago.

Previous Next


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