Subject: bug#6933: 24.0.50; fringe-mode value of `half' is broken

From: "Drew Adams" <[email-masked]>
Date: Sat, 28 Aug 2010 08:15:29 -0700

> > emacs -Q
> >  
> > M-x fringe-mode
> > Enter `half'.
> >  
> > The fringe values (both left and right) should each be 5, 
> > according to the code and comments.  Instead, it is still 8,
> > as shown by (frame-parameters).  There is no difference in behavior 
> > between `half' and `default'.  Dunno whether this is Windows-specific.
> 
> This happens because fringe.el has this customization form for "half"
> in the defcustom for fringe-mode:
> 
> 		 (const :tag "Half width" (5 . 5))
> 
> And the doc string for fringe-mode says this, among the rest:
> 
>                                This command may round up the left and
>     right width specifications to ensure that their sum is a multiple
>     of the character width of a frame.
> 
> So 5 is rounded up to 8, and the rest is history.
> 
> I don't know why the values are 5 instead of 4.  The default fringe
> width is 8 on all GUI displays, so half of that should have been 4,
> not 5.  Maybe I'm missing some subtlety here.
> 
> Can someone please check on X whether (fringe-mode '(4 . 4)) does TRT?
> If it does, I think we should use 4 instead of 5 in the above
> defcustom.

Thanks.  Default is 8; half is 5, which results in 8 (same as default); and
minimal is 4.  If we have 3 values (choices) and the default is 8, then the
values should ideally give 3 different appearances (effects).  Neither {8,8,4}
and {8,4,4} is a good set.

But since both minimal and half show both left and right fringes, and the sum
must be a multiple of the frame char width (default 8), that doesn't leave a lot
of choice. Presumably, for both minimal and half you want the left and right to
be the same, and 8/2 = 4.

So I guess there is no good solution.  But perhaps this could be better
explained in the doc.  I'd suggest making half be 4, at least, since users
expect it to be less than default (whole) in appearance.  It is less
disconcerting if users see no difference between half and minimal when using the
default frame-char size: "minimal" does not imply less than half, but "half"
implies less than whole (default).

Also, "default" might not be the best term here.  I don't have a great
suggestion, however.  Maybe "full", "whole", or "maximal", but each of those has
its drawbacks too.