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: Thu, 30 Jul 2009 17:47:42 +0200 Message-ID: References: <87r5vyw653.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1248969024 8267 80.91.229.12 (30 Jul 2009 15:50:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2009 15:50:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 30 17:50:18 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 1MWXtY-0005sd-Qp for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jul 2009 17:50:17 +0200 Original-Received: from localhost ([127.0.0.1]:45129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWXtY-0000ym-Ap for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jul 2009 11:50:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWXrA-00079i-QR for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 11:47:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWXr6-000789-B4 for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 11:47:48 -0400 Original-Received: from [199.232.76.173] (port=57680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWXr6-000784-2x for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 11:47:44 -0400 Original-Received: from mail-ew0-f211.google.com ([209.85.219.211]:57283) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWXr5-0004xA-L6 for help-gnu-emacs@gnu.org; Thu, 30 Jul 2009 11:47:43 -0400 Original-Received: by ewy7 with SMTP id 7so499291ewy.42 for ; Thu, 30 Jul 2009 08:47:42 -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 :content-transfer-encoding; bh=myJVVU+Ko02/gJ609AagYcbPquB4gXmtc6H7DcQBofo=; b=Bp7bhGOu0WfoiwbguaSiy1ABJaKxfHTQ3h2ELYmipZU4oU+kuAprb6OzG3NuBn/b1U 8MhOb7EYOXAa2+9UwL3It87+NWQbd8AA2i14uPWfsLO2RhGNxPrqYFYN03h5gSlOP/Cz 2ikvkJBTkAe04fdcvDUEQxz7bGzevAZoPRvCQ= 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:content-transfer-encoding; b=SzYKhIR3Aw37WpWDTS1n3mnAFabVkPKxVYCy54yvi2zofY9XD8lju/xnFyvqvzmhVn JBaBOupYHS7FvmE8AEb3mALm4JjS1fMZHTtTGJModFTP/rTQNcr6vGLwvjfuiO4Ma1Tz K3lOvkrK5/SbR/3c0rqEiRimQP1rfvXltLSfA= Original-Received: by 10.216.89.141 with SMTP id c13mr252322wef.66.1248968862141; Thu, 30 Jul 2009 08:47:42 -0700 (PDT) In-Reply-To: <87r5vyw653.fsf@thinkpad.tsdh.de> 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:66520 Archived-At: On Thu, Jul 30, 2009 at 5:19 PM, Tassilo Horn wrote= : > Geralt writes: > > Hi Geralt, > >> iirc there's a mode in Emacs to display some information in the >> topmost line of a window, but I don't recall its name anymore. =A0Do you >> know what I'm talking about? > > Yes, but it's no mode, it's a simple variable you can set. > > ,----[ C-h v header-line-format RET ] > | header-line-format is a variable defined in `C source code'. > | Its value is nil > | > | =A0 Automatically becomes buffer-local when set in any fashion. > | =A0 This variable is potentially risky when used as a file local variab= le. > | > | Documentation: > | Analogous to `mode-line-format', but controls the header line. > | The header line appears, optionally, at the top of a window; > | the mode line appears at the bottom. > `---- > >> And if yes do you know if it's possible to display ElDoc's output in >> this line instead of the echo area? > > I guess you could redefine the function `eldoc-message' and set > `header-line-format' there. > > Bye, > Tassilo > > > > Hi Tassilo, thanks, that helped me a lot! From what I've found it's as simple as changing eldoc-message to: (defun eldoc-message (&rest args) (let ((omessage eldoc-last-message)) (setq eldoc-last-message (cond ((eq (car args) eldoc-last-message) eldoc-last-message) ((null (car args)) nil) ;; If only one arg, no formatting to do, so put it in ;; eldoc-last-message so eq test above might succeed on ;; subsequent calls. ((null (cdr args)) (car args)) (t (apply 'format args)))) ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages ;; are recorded in a log. Do not put eldoc messages in that log since ;; they are Legion. ;; Emacs way of preventing log messages. (let ((message-log-max nil)) (cond (eldoc-last-message (setq header-line-format eldoc-last-message= )) (omessage (message nil))))) eldoc-last-message) What's the prefered way to overwrite a function? Just putting this one into .emacs? Geralt.