emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: ruler-mode is broken


From: Lute Kamstra
Subject: Re: ruler-mode is broken
Date: Fri, 10 Oct 2003 11:51:10 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Miles Bader <address@hidden> writes:

> Lute Kamstra <address@hidden> writes:
>> (2) use a character with the exact same width as the fringe in the
>> mode line.  If memory serves me, you can make a space of any length
>> using the display text property.
>
> Yup:
>
>   (setq header-line-format
>         (concat (propertize "|" 'display '(space :width 1)) "hello world"))
>
> That makes the first character of the header-line exactly one `default'
> character wide -- even if the header-line is displayed in a different
> font....
>
> You can use a floating-point number (> 0 < 1) instead of `1' to make it
> smaller, but annoyingly there's no way to specify exact pixel widths
> (which is what I gather would be needed to work well with fringes).

Mwah, this seems to work:

(setq header-line-format
      (concat "ss"              ; To cover my scrollbar.
              (propertize "f"   ; To cover the fringe.
                          'display 
                          `(space :width ,(/ (float (car (window-fringes))) 
                                             (frame-char-width))))
              "hello world"))



  Lute.




reply via email to

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