all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Oteiza <mvoteiza@udel.edu>
To: 19859@debbugs.gnu.org
Subject: bug#19859: 25.0.50; [PATCH] calendar/solar.el (sunrise-sunset): Remove temp-buffer output.
Date: Fri, 13 Feb 2015 17:05:20 -0500	[thread overview]
Message-ID: <87h9upcvrz.fsf@udel.edu> (raw)


---
 lisp/ChangeLog         |  4 ++++
 lisp/calendar/solar.el | 16 ++--------------
 2 files changed, 6 insertions(+), 14 deletions(-)

Having a temp buffer pop up for something that isn't going to be more
than two lines (wrapped) in the echo area is pretty annoying.  It
doesn't make much sense either that the output in the temp buffer is
split over two lines, so now one has two lines of output in a new buffer
instead of just the minibuffer, and now one has to hit keys (do work) to
make the buffer go away.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 030d572..3a7f27d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-13  Mark Oteiza  <mvoteiza@udel.edu>
+
+	* calendar/solar.el (sunrise-sunset): Remove temp-buffer output.
+
 2015-02-13  Artur Malabarba  <bruce.connor.am@gmail.com>
 
 	* emacs-lisp/package.el (package--compatibility-table): New var.
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 46cd8d3..9e6bc5e 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -847,20 +847,8 @@ This function is suitable for execution in an init file."
          (date (if (< arg 4) (calendar-current-date) (calendar-read-date)))
          (date-string (calendar-date-string date t))
          (time-string (solar-sunrise-sunset-string date))
-         (msg (format "%s: %s" date-string time-string))
-         (one-window (one-window-p t)))
-    (if (<= (length msg) (frame-width))
-        (message "%s" msg)
-      (with-output-to-temp-buffer "*temp*"
-        (princ (concat date-string "\n" time-string)))
-      (message "%s"
-               (substitute-command-keys
-                (if one-window
-                    (if pop-up-windows
-                        "Type \\[delete-other-windows] to remove temp window."
-                      "Type \\[switch-to-buffer] RET to remove temp window.")
-                  "Type \\[switch-to-buffer-other-window] RET to restore old \
-contents of temp window."))))))
+         (msg (format "%s: %s" date-string time-string)))
+    (message "%s" msg)))
 
 ;;;###cal-autoload
 (defun calendar-sunrise-sunset (&optional event)
-- 
2.3.0






             reply	other threads:[~2015-02-13 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 22:05 Mark Oteiza [this message]
2015-02-20  6:25 ` bug#19859: 25.0.50; [PATCH] calendar/solar.el (sunrise-sunset): Remove temp-buffer output Glenn Morris

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9upcvrz.fsf@udel.edu \
    --to=mvoteiza@udel.edu \
    --cc=19859@debbugs.gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.