unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fringes
@ 2005-10-02  9:17 Nick Roberts
  2005-10-03  5:09 ` Fringes Richard M. Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2005-10-02  9:17 UTC (permalink / raw)



If a buffer uses the default left fringe width, the variable left-fringe-width
is nil while the function window-fringes returns information about the fringes
of a window.  So there appears to be no way to determine the fringe width of a
buffer that is not currently displayed.  I've noticed this problem because
gdb-ui.el uses window-fringes in gdb-put-breakpoint-icon.  Since the speedbar
now has no left fringe, if I expand the display of a watch expression in the
speedbar (an array, say), the breakpoint icon shifts from the fringe to the
display margin (because window-fringes uses the selected window by default,
the speedbar in this case).

Nick


Here's a suggestion/correction for the Fringes section of the lisp
manual.

(caution if applying diff - remove line with ^^^^^^)

*** display.texi.~1.188.~       2005-10-01 00:57:51.000000000 +1200
--- display.texi        2005-10-02 21:55:21.174050936 +1300
***************
*** 2730,2752 ****
  @node Fringe Size/Pos
  @subsection Fringe Size and Position

!   Here's how to control the position and width of the window fringes.

  @defvar fringes-outside-margins
! If the value is non-@code{nil}, the frames appear outside the display
                                      ^^^^^^
! margins.  The fringes normally appear between the display margins and
! the window text.  It works to set @code{fringes-outside-margins}
! buffer-locally.  @xref{Display Margins}.
  @end defvar

  @defvar left-fringe-width
  This variable, if non-@code{nil}, specifies the width of the left
! fringe in pixels.
  @end defvar

  @defvar right-fringe-width
  This variable, if non-@code{nil}, specifies the width of the right
! fringe in pixels.
  @end defvar

    The values of these variables take effect when you display the
--- 2730,2754 ----
  @node Fringe Size/Pos
  @subsection Fringe Size and Position

!   The following buffer-local variables control the position and width
! of the window fringes.

  @defvar fringes-outside-margins
! The fringes normally appear between the display margins and the window
! text.  If the value is non-@code{nil}, they appear outside the display
! margins.  @xref{Display Margins}.
  @end defvar

  @defvar left-fringe-width
  This variable, if non-@code{nil}, specifies the width of the left
! fringe in pixels.  A value of @code{nil} means to use the left fringe
! width from the window's frame.
  @end defvar

  @defvar right-fringe-width
  This variable, if non-@code{nil}, specifies the width of the right
! fringe in pixels.  A value of @code{nil} means to use the right fringe
! width from the window's frame.
  @end defvar

    The values of these variables take effect when you display the

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

* Re: Fringes
  2005-10-02  9:17 Fringes Nick Roberts
@ 2005-10-03  5:09 ` Richard M. Stallman
  2005-10-03  5:27   ` Fringes Nick Roberts
  0 siblings, 1 reply; 4+ messages in thread
From: Richard M. Stallman @ 2005-10-03  5:09 UTC (permalink / raw)
  Cc: emacs-devel

    If a buffer uses the default left fringe width, the variable
    left-fringe-width is nil while the function window-fringes returns
    information about the fringes of a window.  So there appears to be
    no way to determine the fringe width of a buffer that is not
    currently displayed.

What does it mean to speak of the "fringe width of a buffer that is
not currently displayed"?

If it means the fringe width that would be in effect if that buffer is
displayed in a window, then if left-fringe-width is nil in that
buffer, it should use the default.  So couldn't you just use the
default value?

That ought to be easy, so if you think this problem is hard, perhaps I
have missed the point.


Anyway, your changes in the Lisp Manual look good.
Please install them.

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

* Re: Fringes
  2005-10-03  5:09 ` Fringes Richard M. Stallman
@ 2005-10-03  5:27   ` Nick Roberts
  2005-10-03 16:13     ` Fringes Richard M. Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Roberts @ 2005-10-03  5:27 UTC (permalink / raw)
  Cc: emacs-devel

 >     If a buffer uses the default left fringe width, the variable
 >     left-fringe-width is nil while the function window-fringes returns
 >     information about the fringes of a window.  So there appears to be
 >     no way to determine the fringe width of a buffer that is not
 >     currently displayed.
 > 
 > What does it mean to speak of the "fringe width of a buffer that is
 > not currently displayed"?

You're right, it doesn't mean anything, the fringe width will depend on
the frame that it's displayed in.

 > If it means the fringe width that would be in effect if that buffer is
 > displayed in a window, then if left-fringe-width is nil in that
 > buffer, it should use the default.  So couldn't you just use the
 > default value?

I assumed that all frames have the same fringe width, which was previously
true by default, so I didn't notice a problem.  The default value for the
speedbar is 0 now, which isn't generally what I want.

 > That ought to be easy, so if you think this problem is hard, perhaps I
 > have missed the point.

If the buffers that hold breakpoint icons are visible, it's straightforward.
If they are not visible then I'm not sure what to do.

Nick

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

* Re: Fringes
  2005-10-03  5:27   ` Fringes Nick Roberts
@ 2005-10-03 16:13     ` Richard M. Stallman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard M. Stallman @ 2005-10-03 16:13 UTC (permalink / raw)
  Cc: emacs-devel

     > That ought to be easy, so if you think this problem is hard, perhaps I
     > have missed the point.

    If the buffers that hold breakpoint icons are visible, it's straightforward.
    If they are not visible then I'm not sure what to do.

Why do anything?  What's the real problem?

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

end of thread, other threads:[~2005-10-03 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-02  9:17 Fringes Nick Roberts
2005-10-03  5:09 ` Fringes Richard M. Stallman
2005-10-03  5:27   ` Fringes Nick Roberts
2005-10-03 16:13     ` Fringes Richard M. Stallman

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).