GNU bug report logs - #6930
24.0.50; (elisp) Layout Parameters: What is ""the standard fringe width"?

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 27 Aug 2010 22:24:02 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6930 in the body.
You can then email your comments to 6930 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6930; Package emacs. (Fri, 27 Aug 2010 22:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 27 Aug 2010 22:24:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50;
	(elisp) Layout Parameters: What is ""the standard fringe width"?
Date: Fri, 27 Aug 2010 15:22:49 -0700
The text says this:
 
     The default width of the left and right fringes of windows in this
     frame (*note Fringes::).  If either of these is zero, that
     effectively removes the corresponding fringe.  A value of `nil'
     stands for the standard fringe width, which is the width needed to
     display the fringe bitmaps.
 
If Lisp code wants to know how wide the left fringe is for a certain
frame, it can look at the value of parameter `left-fringe' (and at
variable `fringe-mode').  But if parameter `left-fringe' is nil, then
the fringe width is what?  It says the width is "the standard fringe
width".
 
Well, what's that?  "The width needed to display the fringe bitmaps."
Huh?  And how does it find out how wide that is for the target frame?
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-08-16 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 28 Aug 2010 08:15:02 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sat, 28 Aug 2010 08:15:03 GMT) Full text and rfc822 format available.

Message #10 received at 6930-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 6930-done <at> debbugs.gnu.org
Subject: Re: bug#6930: 24.0.50;
	(elisp) Layout Parameters: What is ""the standard fringe width"?
Date: Sat, 28 Aug 2010 11:18:14 +0300
> From: "Drew Adams" <drew.adams <at> oracle.com>
> Date: Fri, 27 Aug 2010 15:22:49 -0700
> Cc: 
> 
> The text says this:
>  
>      The default width of the left and right fringes of windows in this
>      frame (*note Fringes::).  If either of these is zero, that
>      effectively removes the corresponding fringe.  A value of `nil'
>      stands for the standard fringe width, which is the width needed to
>      display the fringe bitmaps.
>  
> If Lisp code wants to know how wide the left fringe is for a certain
> frame, it can look at the value of parameter `left-fringe' (and at
> variable `fringe-mode').  But if parameter `left-fringe' is nil, then
> the fringe width is what?

This works for me:

   (frame-parameter FRAME 'left-fringe) => 8

FRAME can be nil, meaning the currently selected frame.

Calling frame-parameter is the standard way of accessing values of
frame parameters.

So I'm closing this bug.




Message #11 received at 6930-done <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Eli Zaretskii'" <eliz <at> gnu.org>
Cc: 6930-done <at> debbugs.gnu.org
Subject: RE: bug#6930: 24.0.50;
	(elisp) Layout Parameters: What is ""the standard fringe width"?
Date: Sat, 28 Aug 2010 08:06:03 -0700
> > The text says this:
> >  
> >      The default width of the left and right fringes of 
> >      windows in this
> >      frame (*note Fringes::).  If either of these is zero, that
> >      effectively removes the corresponding fringe.  A value of `nil'
> >      stands for the standard fringe width, which is the 
> >      width needed to display the fringe bitmaps.
> >  
> > If Lisp code wants to know how wide the left fringe is for a certain
> > frame, it can look at the value of parameter `left-fringe' (and at
> > variable `fringe-mode').  But if parameter `left-fringe' is 
> > nil, then the fringe width is what?
> 
> This works for me:
> 
>    (frame-parameter FRAME 'left-fringe) => 8
> 
> FRAME can be nil, meaning the currently selected frame.
> 
> Calling frame-parameter is the standard way of accessing values of
> frame parameters.
> 
> So I'm closing this bug.

Yes, either `frame-parameter' or `frame-parameters' will show the actual fringe
width.  I know that.  I wasn't clear enough in my report.

1. The product is not clear/consistent wrt setting frame parameters such as the
fringe params.  We speak here of setting the `left-fringe' parameter to nil, and
calling `set-frame-parameter' or `modify-frame-parameters' passing nil for that
parameter should, according to the description of those functions, set the value
to...(drum roll) nil.  But it does not.  In fact, fringe params are exceptional.
"Setting" them to nil actually sets them to the default width, which is 8.

Should this exceptional behavior be corrected?  Dunno.  At the very least, the
doc should tell users about such exceptions.  We cannot honestly tell users that
they are setting the param value to nil and say it's not a bug if they see that
the result is that the value was set to 8.

Such exceptional behavior needs to be mentioned when documenting these fringe
params - but also when documenting any function that changes frame params, and
when documenting Customize.  We need to say that for some exceptional params,
even though you think you are setting the value to one thing the actual setting
might become something else.

2. The doc is not clear here, in any case.  It should not speak about "the
standard fringe width", with no explanation of what that might be.  (There is no
standard fringe width.)  It should say clearly that there is a `default' width
of 8 (chosen via Customize or `fringe-mode' using the name `default'), and that
that value is what is actually used when you _try_ to set the value to nil.  (It
should not speak of actually setting the value to nil, since that is
impossible.)

Thx.





Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 Aug 2010 15:29:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6930; Package emacs. (Sun, 10 Apr 2011 20:45:02 GMT) Full text and rfc822 format available.

Message #16 received at 6930 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 6930 <at> debbugs.gnu.org
Subject: Re: bug#6930: 24.0.50;
	(elisp) Layout Parameters: What is ""the standard fringe width"?
Date: Sun, 10 Apr 2011 16:44:14 -0400
"Drew Adams" <drew.adams <at> oracle.com> writes:

> We speak here of setting the `left-fringe' parameter to nil, and
> calling `set-frame-parameter' or `modify-frame-parameters' passing nil
> for that parameter should, according to the description of those
> functions, set the value to...(drum roll) nil.  But it does not.  In
> fact, fringe params are exceptional.  "Setting" them to nil actually
> sets them to the default width, which is 8.

> Such exceptional behavior needs to be mentioned when documenting these
> fringe params

I have updated the documentation appropriately.  Thanks for the bug
report.




bug closed, send any further explanations to 6930 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 10 Apr 2011 20:45:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 May 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.