From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geralt Newsgroups: gmane.emacs.help Subject: Re: Mode to display information in the topmost line of a window Date: Sat, 1 Aug 2009 01:46:06 +0200 Message-ID: References: <87r5vyw653.fsf@thinkpad.tsdh.de> <87tz0tl40h.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e6d99c20259c16047009060d X-Trace: ger.gmane.org 1249084009 25040 80.91.229.12 (31 Jul 2009 23:46:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 23:46:49 +0000 (UTC) Cc: Tassilo Horn , kevin.d.rodgers@gmail.com, help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 01:46:42 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MX1o9-0005T1-86 for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2009 01:46:41 +0200 Original-Received: from localhost ([127.0.0.1]:44936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX1o8-00032x-PX for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 19:46:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MX1nh-00031X-Q5 for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:46:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MX1nc-00031C-LC for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:46:12 -0400 Original-Received: from [199.232.76.173] (port=38821 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX1nc-000319-HZ for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:46:08 -0400 Original-Received: from mail-ew0-f211.google.com ([209.85.219.211]:48847) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MX1nb-0001Pp-Sf for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:46:08 -0400 Original-Received: by ewy7 with SMTP id 7so1802067ewy.42 for ; Fri, 31 Jul 2009 16:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=fz7Dso5E3N+2LMI1bVVA1SFiQBTH+fkrLN21EYA9BSA=; b=IZgloaTiSpw9RyDPWhiR0ifFg57M/07bHfGoEJtwicslLvbZ8trp0LWSXezQdew3+p I3KlzfGGVMnmWEe4Y6bCnzYosJ0US9Nhr2lOAOgHGKaqyAAPDKE9/S0UQVbj1ObEUndF qDpxUWCYTqd2Tb3n9dJJda0Gddm/blskcQArU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=EIJzcz2xO6sdtjmm7yUjPdzsn5LL4ZyLc7luyv64+RkBDPAIRBBcnL7bfcQPSlMjec zuof/NFcnfIq7SlfJLU5+HTQDJx8tPMQN6zREvYOe+FHxm3at0pkZoKFXB94xEV5MBKH x5dIYN1nZk8WbN0sXI74LxtjEYV9ia/EqK+uQ= Original-Received: by 10.216.88.84 with SMTP id z62mr623032wee.40.1249083966986; Fri, 31 Jul 2009 16:46:06 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66599 Archived-At: --0016e6d99c20259c16047009060d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Jul 31, 2009 at 6:19 PM, Drew Adams 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) > =A0"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." > =A0(with-current-buffer (or buffer (current-buffer)) > =A0 =A0(make-local-variable 'mode-line-format) > =A0 =A0(let ((mode-line-format =A0text)) > =A0 =A0 (force-mode-line-update) (sit-for 10)) > =A0 =A0(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. --0016e6d99c20259c16047009060d Content-Type: application/octet-stream; name="eldoc-display-in-header-line.patch" Content-Disposition: attachment; filename="eldoc-display-in-header-line.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fxtkbn540 LS0tI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