unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27091: Request: Toggle scroll bar on each window separately
@ 2017-05-26 22:01 Alex
  2017-05-27  8:16 ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Alex @ 2017-05-26 22:01 UTC (permalink / raw)
  To: 27091


It would be nice if one could enable/disable scroll bars on a per-window
basis.

The new side windows are good examples of windows in which one may not
want a scroll bar. They may be used for persistent info that doesn't
take up enough vertical space to warrant a scroll bar, and may look odd
with a scroll bar.

It seems unlikely that this is feasible, but since I couldn't find other
bug reports relating to this I felt it was worth it to ask.





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-26 22:01 bug#27091: Request: Toggle scroll bar on each window separately Alex
@ 2017-05-27  8:16 ` martin rudalics
  2017-05-27  8:37   ` Eli Zaretskii
  2017-05-27 17:43   ` Alex
  0 siblings, 2 replies; 10+ messages in thread
From: martin rudalics @ 2017-05-27  8:16 UTC (permalink / raw)
  To: Alex, 27091

 > It would be nice if one could enable/disable scroll bars on a per-window
 > basis.
 >
 > The new side windows are good examples of windows in which one may not
 > want a scroll bar. They may be used for persistent info that doesn't
 > take up enough vertical space to warrant a scroll bar, and may look odd
 > with a scroll bar.
 >
 > It seems unlikely that this is feasible, but since I couldn't find other
 > bug reports relating to this I felt it was worth it to ask.

Please read section 39.14 Scroll Bars of the Elisp manual which will
tell you how to control all scroll bar settings for individual windows
and buffers.

Thanks, martin





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27  8:16 ` martin rudalics
@ 2017-05-27  8:37   ` Eli Zaretskii
  2017-05-27  9:06     ` martin rudalics
  2017-05-27 17:43   ` Alex
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2017-05-27  8:37 UTC (permalink / raw)
  To: martin rudalics; +Cc: agrambot, 27091

> Date: Sat, 27 May 2017 10:16:43 +0200
> From: martin rudalics <rudalics@gmx.at>
> 
> Please read section 39.14 Scroll Bars of the Elisp manual which will
> tell you how to control all scroll bar settings for individual windows
> and buffers.

Right.

But it looks like switching buffers in a window whose vertical scroll
bar has been disabled by a call to set-window-scroll-bars restores the
scroll bar, unless I also set the buffer-local variable
vertical-scroll-bars to nil.  What am I doing wrong?





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27  8:37   ` Eli Zaretskii
@ 2017-05-27  9:06     ` martin rudalics
  2017-05-27  9:28       ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2017-05-27  9:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: agrambot, 27091

 > But it looks like switching buffers in a window whose vertical scroll
 > bar has been disabled by a call to set-window-scroll-bars restores the
 > scroll bar, unless I also set the buffer-local variable
 > vertical-scroll-bars to nil.  What am I doing wrong?

Nothing, I presume.  ‘set-window-buffer’ calls set_window_scroll_bars
just like ‘set-window-scroll-bars’ called it before.  You should see the
same "problem" with fringes and margins.  I always hated the ideology of
buffer-local values that override window-local values but would not dare
to question it in public.

martin






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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27  9:06     ` martin rudalics
@ 2017-05-27  9:28       ` Eli Zaretskii
  2017-05-27  9:57         ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2017-05-27  9:28 UTC (permalink / raw)
  To: martin rudalics; +Cc: agrambot, 27091

> Date: Sat, 27 May 2017 11:06:58 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: agrambot@gmail.com, 27091@debbugs.gnu.org
> 
>  > But it looks like switching buffers in a window whose vertical scroll
>  > bar has been disabled by a call to set-window-scroll-bars restores the
>  > scroll bar, unless I also set the buffer-local variable
>  > vertical-scroll-bars to nil.  What am I doing wrong?
> 
> Nothing, I presume.  ‘set-window-buffer’ calls set_window_scroll_bars
> just like ‘set-window-scroll-bars’ called it before.  You should see the
> same "problem" with fringes and margins.  I always hated the ideology of
> buffer-local values that override window-local values but would not dare
> to question it in public.

I think this should be added to the documentation in the ELisp manual.

Thanks.





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27  9:28       ` Eli Zaretskii
@ 2017-05-27  9:57         ` martin rudalics
  2017-05-27 10:35           ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2017-05-27  9:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: agrambot, 27091

 > I think this should be added to the documentation in the ELisp manual.

The doc-string of ‘set-window-buffer’ has this:

   Optional third argument KEEP-MARGINS non-nil means that WINDOW's current
   display margins, fringe widths, and scroll bar settings are preserved;
   the default is to reset these from the local settings for BUFFER-OR-NAME
   or the frame defaults.

The Elisp doc of ‘set-window-buffer’ has this:

      By default, this function resets WINDOW's position, display
      margins, fringe widths, and scroll bar settings, based on the local
      variables in the specified buffer.  However, if the optional
      argument KEEP-MARGINS is non-`nil', it leaves the display margins
      and fringe widths unchanged.

I can amend the last sentence.  What else do you want to add?

martin






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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27  9:57         ` martin rudalics
@ 2017-05-27 10:35           ` Eli Zaretskii
  2017-05-27 13:26             ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2017-05-27 10:35 UTC (permalink / raw)
  To: martin rudalics; +Cc: agrambot, 27091

> Date: Sat, 27 May 2017 11:57:56 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: agrambot@gmail.com, 27091@debbugs.gnu.org
> 
>  > I think this should be added to the documentation in the ELisp manual.
> 
> The doc-string of ‘set-window-buffer’ has this:
> 
>    Optional third argument KEEP-MARGINS non-nil means that WINDOW's current
>    display margins, fringe widths, and scroll bar settings are preserved;
>    the default is to reset these from the local settings for BUFFER-OR-NAME
>    or the frame defaults.
> 
> The Elisp doc of ‘set-window-buffer’ has this:
> 
>       By default, this function resets WINDOW's position, display
>       margins, fringe widths, and scroll bar settings, based on the local
>       variables in the specified buffer.  However, if the optional
>       argument KEEP-MARGINS is non-`nil', it leaves the display margins
>       and fringe widths unchanged.
> 
> I can amend the last sentence.  What else do you want to add?

The above are just fine.  The problem is on the other end: the
set-window-scroll-bars function doesn't mention that switching buffers
in the window for which that function was called will reinstate the
scroll bar.  (It also doesn't say what is the meaning of
VERTICAL-TYPE's nil value.)  And neither does the manual.





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27 10:35           ` Eli Zaretskii
@ 2017-05-27 13:26             ` martin rudalics
  2017-05-27 13:43               ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2017-05-27 13:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: agrambot, 27091

 > The above are just fine.  The problem is on the other end: the
 > set-window-scroll-bars function doesn't mention that switching buffers
 > in the window for which that function was called will reinstate the
 > scroll bar.  (It also doesn't say what is the meaning of
 > VERTICAL-TYPE's nil value.)  And neither does the manual.

I tried to fix these.  Please have a look.

martin





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27 13:26             ` martin rudalics
@ 2017-05-27 13:43               ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2017-05-27 13:43 UTC (permalink / raw)
  To: martin rudalics; +Cc: agrambot, 27091

> Date: Sat, 27 May 2017 15:26:58 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: agrambot@gmail.com, 27091@debbugs.gnu.org
> 
>  > The above are just fine.  The problem is on the other end: the
>  > set-window-scroll-bars function doesn't mention that switching buffers
>  > in the window for which that function was called will reinstate the
>  > scroll bar.  (It also doesn't say what is the meaning of
>  > VERTICAL-TYPE's nil value.)  And neither does the manual.
> 
> I tried to fix these.  Please have a look.

Thanks, looks good to me.





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

* bug#27091: Request: Toggle scroll bar on each window separately
  2017-05-27  8:16 ` martin rudalics
  2017-05-27  8:37   ` Eli Zaretskii
@ 2017-05-27 17:43   ` Alex
  1 sibling, 0 replies; 10+ messages in thread
From: Alex @ 2017-05-27 17:43 UTC (permalink / raw)
  To: martin rudalics; +Cc: 27091

close 27091
quit

martin rudalics <rudalics@gmx.at> writes:

>> It would be nice if one could enable/disable scroll bars on a per-window
>> basis.
>>
>> The new side windows are good examples of windows in which one may not
>> want a scroll bar. They may be used for persistent info that doesn't
>> take up enough vertical space to warrant a scroll bar, and may look odd
>> with a scroll bar.
>>
>> It seems unlikely that this is feasible, but since I couldn't find other
>> bug reports relating to this I felt it was worth it to ask.
>
> Please read section 39.14 Scroll Bars of the Elisp manual which will
> tell you how to control all scroll bar settings for individual windows
> and buffers.
>
> Thanks, martin

Ah, sorry. I somehow missed the Elisp manual and only looked at the
Emacs manual for scroll bars. Then I saw the emacswiki page for scroll
bars, which I suppose is out of date.

Thanks, and sorry for the noise.





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

end of thread, other threads:[~2017-05-27 17:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 22:01 bug#27091: Request: Toggle scroll bar on each window separately Alex
2017-05-27  8:16 ` martin rudalics
2017-05-27  8:37   ` Eli Zaretskii
2017-05-27  9:06     ` martin rudalics
2017-05-27  9:28       ` Eli Zaretskii
2017-05-27  9:57         ` martin rudalics
2017-05-27 10:35           ` Eli Zaretskii
2017-05-27 13:26             ` martin rudalics
2017-05-27 13:43               ` Eli Zaretskii
2017-05-27 17:43   ` Alex

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