all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Geralt <usr.gentoo@googlemail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Tassilo Horn <tassilo@member.fsf.org>,
	kevin.d.rodgers@gmail.com, help-gnu-emacs@gnu.org
Subject: Re: Mode to display information in the topmost line of a window
Date: Sat, 1 Aug 2009 01:46:06 +0200	[thread overview]
Message-ID: <fbdd0e50907311646g3c95c4egb16d33f1df8a9a22@mail.gmail.com> (raw)
In-Reply-To: <BEA9E09A295048E4A616C1F7126FDB9D@us.oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1998 bytes --]

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 #2: eldoc-display-in-header-line.patch --]
[-- Type: application/octet-stream, Size: 977 bytes --]

--- 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)
 

  reply	other threads:[~2009-07-31 23:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 12:38 Mode to display information in the topmost line of a window Geralt
2009-07-30 15:19 ` Tassilo Horn
2009-07-30 15:47   ` Geralt
2009-07-30 15:58     ` Lennart Borgman
2009-07-30 16:00     ` Tassilo Horn
2009-07-31  4:08     ` Kevin Rodgers
2009-07-31  7:12       ` Tassilo Horn
2009-07-31 16:03         ` Geralt
2009-07-31 16:19           ` Drew Adams
2009-07-31 23:46             ` Geralt [this message]
2009-07-31 23:51               ` Lennart Borgman
2009-08-01  9:30                 ` Geralt
2009-07-31 23:56               ` Drew Adams

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=fbdd0e50907311646g3c95c4egb16d33f1df8a9a22@mail.gmail.com \
    --to=usr.gentoo@googlemail.com \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kevin.d.rodgers@gmail.com \
    --cc=tassilo@member.fsf.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.