help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mode to display information in the topmost line of a window


From: Geralt
Subject: Re: Mode to display information in the topmost line of a window
Date: Sat, 1 Aug 2009 01:46:06 +0200

On Fri, Jul 31, 2009 at 6:19 PM, Drew Adams<drew.adams@oracle.com> wrote:
> As an alternative, you might want to put the info in the mode line.
> This is what I use:
>
> (defun show-in-mode-line (text &optional buffer)
>  "Display TEXT in BUFFER's mode line for 10 sec (or until user event).
> Note: This sits for 10 sec or until a user event, so call this last in
> a sequence of user-visible actions."
>  (with-current-buffer (or buffer (current-buffer))
>    (make-local-variable 'mode-line-format)
>    (let ((mode-line-format  text))
>     (force-mode-line-update) (sit-for 10))
>    (force-mode-line-update)))
>
>
Hi,

I've already got a lot of information there, especially when I'm
clocking a task with org-mode.


I've finished the changes to eldoc and here's a patch containing them
(but you better try the patch in the attachement since GoogleMail is
doing some changes to whitespace):

--- eldoc.el    2009-07-31 18:03:58.000000000 +0200
+++ eldoc.el    2009-08-01 01:30:34.732647994 +0200
@@ -105,6 +105,11 @@
  enable argument list to fit on one line" truncate-sym-name-if-fit))
   :group 'eldoc)

+(defcustom eldoc-display-in-header-line nil
+  "If set eldoc will display its messages in the topmost line of the
window, called the header-line, instead of the echo area."
+  :type 'boolean
+  :group 'eldoc)
+
 (defface eldoc-highlight-function-argument
   '((t (:inherit bold)))
   "Face used for the argument at point in a function's argument list.
@@ -201,7 +206,9 @@
     ;; they are Legion.
     ;; Emacs way of preventing log messages.
     (let ((message-log-max nil))
-      (cond (eldoc-last-message (message "%s" eldoc-last-message))
+      (cond (eldoc-last-message (if eldoc-display-in-header-line
+                                   (setq header-line-format eldoc-last-message)
+                                 (message "%s" eldoc-last-message)))
            (omessage (message nil)))))
   eldoc-last-message)




Do you think that's good enough for a submission?




Geralt.

Attachment: eldoc-display-in-header-line.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]