unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* customizing header-line face
@ 2007-03-20 15:40 Ralf Mattes
  2007-03-20 15:54 ` Kim F. Storm
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Mattes @ 2007-03-20 15:40 UTC (permalink / raw)
  To: emacs-devel

Hello list,

is there any convenient way to customize the face used for header-lines
buffer-local? I'm trying to get header lines with different backgrund
color for different buffers (on the same frame).
I discovered the 'header-line face but since faces seem to dwell in the
plist of a symbol making 'header-line buffer-local doesn't work.
Any ideas?

 tia Ralf Mattes

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: customizing header-line face
  2007-03-20 15:40 customizing header-line face Ralf Mattes
@ 2007-03-20 15:54 ` Kim F. Storm
  2007-03-20 16:30   ` Ralf Mattes
  0 siblings, 1 reply; 7+ messages in thread
From: Kim F. Storm @ 2007-03-20 15:54 UTC (permalink / raw)
  To: Ralf Mattes; +Cc: emacs-devel

Ralf Mattes <rm@mh-freiburg.de> writes:

> Hello list,
>
> is there any convenient way to customize the face used for header-lines
> buffer-local? I'm trying to get header lines with different backgrund
> color for different buffers (on the same frame).

You can add the face explicitly to the header-line-format string, e.g.

(setq header-line-format (propertize "MY HEADERLINE %-" 'face 'mode-line))


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: customizing header-line face
  2007-03-20 15:54 ` Kim F. Storm
@ 2007-03-20 16:30   ` Ralf Mattes
  2007-03-21  9:13     ` Kim F. Storm
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Mattes @ 2007-03-20 16:30 UTC (permalink / raw)
  To: emacs-devel

On Tue, 20 Mar 2007 16:54:02 +0100, Kim F. Storm wrote:

> Ralf Mattes <rm@mh-freiburg.de> writes:
> 
>> Hello list,
>>
>> is there any convenient way to customize the face used for header-lines
>> buffer-local? I'm trying to get header lines with different backgrund
>> color for different buffers (on the same frame).
> 
> You can add the face explicitly to the header-line-format string, e.g.
> 
> (setq header-line-format (propertize "MY HEADERLINE %-" 'face 'mode-line))

Yes, i tried that too but unfortunately this will only change the
face/color of the text span itself. I'd prefer a solution that affects
the complete header line.

 Cheers, RalfD

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: customizing header-line face
  2007-03-20 16:30   ` Ralf Mattes
@ 2007-03-21  9:13     ` Kim F. Storm
  2007-03-21 14:25       ` Stefan Monnier
  2007-03-21 23:35       ` Ralf Mattes
  0 siblings, 2 replies; 7+ messages in thread
From: Kim F. Storm @ 2007-03-21  9:13 UTC (permalink / raw)
  To: Ralf Mattes; +Cc: emacs-devel

Ralf Mattes <rm@mh-freiburg.de> writes:

>> (setq header-line-format (propertize "MY HEADERLINE %-" 'face 'mode-line))
>
> Yes, i tried that too but unfortunately this will only change the
> face/color of the text span itself. I'd prefer a solution that affects
> the complete header line.

Did you TRY the above example??

The %- at the end makes it fill the whole line.

But you may like this better:

(setq header-line-format
      (propertize (concat "MY HEADERLINE" (make-string 200 ?\s)) 'face 'mode-line))

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: customizing header-line face
  2007-03-21  9:13     ` Kim F. Storm
@ 2007-03-21 14:25       ` Stefan Monnier
  2007-03-21 23:35       ` Ralf Mattes
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2007-03-21 14:25 UTC (permalink / raw)
  To: Kim F. Storm; +Cc: Ralf Mattes, emacs-devel

> (setq header-line-format
>       (propertize (concat "MY HEADERLINE" (make-string 200 ?\s)) 'face 'mode-line))

With my default font setting on my default screen, my full-width windows
have a bit more than 260 columns.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: customizing header-line face
  2007-03-21  9:13     ` Kim F. Storm
  2007-03-21 14:25       ` Stefan Monnier
@ 2007-03-21 23:35       ` Ralf Mattes
  2007-03-22  0:45         ` Miles Bader
  1 sibling, 1 reply; 7+ messages in thread
From: Ralf Mattes @ 2007-03-21 23:35 UTC (permalink / raw)
  To: emacs-devel

On Wed, 21 Mar 2007 10:13:05 +0100, Kim F. Storm wrote:

> Ralf Mattes <rm@mh-freiburg.de> writes:
> 
>>> (setq header-line-format (propertize "MY HEADERLINE %-" 'face 'mode-line))
>>
>> Yes, i tried that too but unfortunately this will only change the
>> face/color of the text span itself. I'd prefer a solution that affects
>> the complete header line.dssi-vst-server.cpp:
> 
> Did you TRY the above example??
> 
> The %- at the end makes it fill the whole line.

Yes, but unfortunately i don't need a header line filled with ?\-
characters ;-/

> 
> But you may like this better:
> 
> (setq header-line-format
>       (propertize (concat "MY HEADERLINE" (make-string 200 ?\s)) 'face
>       'mode-line))

IIRC I didn't ask for a quick (and quirky ...) hack. Yes, i can actually
twiddle my way around  this (i need to calculate the buffer size anyway) -
i was more interested in a correct/generic soultion.

 Thanks anyway, RalfD

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: customizing header-line face
  2007-03-21 23:35       ` Ralf Mattes
@ 2007-03-22  0:45         ` Miles Bader
  0 siblings, 0 replies; 7+ messages in thread
From: Miles Bader @ 2007-03-22  0:45 UTC (permalink / raw)
  To: Ralf Mattes; +Cc: emacs-devel

Ralf Mattes <rm@mh-freiburg.de> writes:
> IIRC I didn't ask for a quick (and quirky ...) hack. Yes, i can actually
> twiddle my way around  this (i need to calculate the buffer size anyway) -
> i was more interested in a correct/generic soultion.

I have a patch that allows buffer-specific faces, but it's not part of
the main sources.

-Miles

-- 
Somebody has to do something, and it's just incredibly pathetic that it
has to be us.  -- Jerry Garcia

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-03-22  0:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 15:40 customizing header-line face Ralf Mattes
2007-03-20 15:54 ` Kim F. Storm
2007-03-20 16:30   ` Ralf Mattes
2007-03-21  9:13     ` Kim F. Storm
2007-03-21 14:25       ` Stefan Monnier
2007-03-21 23:35       ` Ralf Mattes
2007-03-22  0:45         ` Miles Bader

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).