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: Wed, 08 Oct 2003 19:41:59 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

>> I seems that set-fringe-style insists on setting the sum of the
>> widths of the left and right fringe to a multiple of
>> `(frame-char-width)', but does so in a (for me) counterintuitive
>> way.
>
> At least it works exactly as I designed it to do ;-)

So it's not a bug then.  ;-)

>> If one can only set the left and right fringe width width to a pair
>> (l-allowed .  r-allowed) for which (% (+ l-allowed r-allowed)
>> (frame-char-width)) is zero, I would expect an arbitrary width pair
>> (l . r) to be mapped a pair (l-allowed . r-allowed) for which the
>> Euclidean distance is minimal.  This is not the case as, for
>> example:
>> 
>> (l . r)  |-->  (l-allowed . r-allowed)
>> 
>> (0 . 0)  |-->  (0 . 0)
>> (0 . 1)  |-->  (0 . 11)
>> (1 . 1)  |-->  (5 . 6)
>> 
>> Shall we change the behavior of set-fringe-style so that it minimizes
>> the Euclidean distance?  
>
> What results would you expect in the above examples ?
> (0 . 0) in all cases?

Yes.  Maybe this is a better example of the strange rounding:

(frame-char-width) => 11

(set-fringe-style (cons 3 8)) 
(window-fringes) => (3 8 nil)

(set-fringe-style (cons 4 8)) 
(window-fringes) => (9 13 nil)

Why not (3 8)?  It's definitely closer to (4 8) than (9 13).

> What generic values would you use then to get the effect of
> 'miminal' (1 . 1) and 'half' (5 . 5) fringes ?

I think they should be defined in terms of frame-char-width.  I even
think that this is already necessary in the current situation.  I
observe the following:

  character width  6: minimal < half    < default 
                      (3 . 3)   (6 . 6)   (9 . 9)

  character width  7: minimal < half    < default 
                      (3 . 4)   (7 . 7)   (10 . 11)

  character width  8: minimal < half    = default
                      (4 . 4)   (8 . 8)   (8 . 8)

  character width  9: minimal < half    = default
                      (4 . 5)   (9 . 9)   (9 . 9)

  character width 10: minimal = half    < default  
                      (5 . 5)   (5 . 5)   (10 . 10)

  character width 11: minimal = half    < default  
                      (5 . 6)   (5 . 6)   (11 . 11)

  character width 12: minimal = half    < default  
                      (6 . 6)   (6 . 6)   (12 . 12)

This doesn't make much sense to me.

  Lute.




reply via email to

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