GNU bug report logs - #62676
Setting `scroll-bar-width` Doesn't Take Effect Immediately

Previous Next

Package: emacs;

Reported by: Shynur Xie <one.last.kiss <at> outlook.com>

Date: Wed, 5 Apr 2023 08:24:01 UTC

Severity: normal

Tags: notabug

Done: Eli Zaretskii <eliz <at> gnu.org>

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 62676 in the body.
You can then email your comments to 62676 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 bug-gnu-emacs <at> gnu.org:
bug#62676; Package emacs. (Wed, 05 Apr 2023 08:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Shynur Xie <one.last.kiss <at> outlook.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 05 Apr 2023 08:24:01 GMT) Full text and rfc822 format available.

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

From: Shynur Xie <one.last.kiss <at> outlook.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Setting `scroll-bar-width` Doesn't Take Effect Immediately
Date: Wed, 5 Apr 2023 08:18:00 +0000
Example:

```
$ emacs -Q
```

Now the current buffer is "*scratch*", evaluating:

```
(setq scroll-bar-width 50)
```

changes nothing.

Instead, user need to switch to another buffer and then switch back:

```
(progn
  (setq scroll-bar-width 50)
  (switch-to-buffer "*Messages*")
  (switch-to-buffer "*scratch*"))
```

________________________________________

emacs-version: 28.2
system-configuration: x86_64-w64-mingw32




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62676; Package emacs. (Wed, 05 Apr 2023 09:03:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Shynur Xie <one.last.kiss <at> outlook.com>
Cc: 62676 <at> debbugs.gnu.org
Subject: Re: bug#62676: Setting `scroll-bar-width` Doesn't Take Effect
 Immediately
Date: Wed, 05 Apr 2023 12:02:25 +0300
tags 62676 notabug
thank

> From: Shynur Xie <one.last.kiss <at> outlook.com>
> Date: Wed, 5 Apr 2023 08:18:00 +0000
> 
> Example:
> 
> ```
> $ emacs -Q
> ```
> 
> Now the current buffer is "*scratch*", evaluating:
> 
> ```
> (setq scroll-bar-width 50)
> ```
> 
> changes nothing.
> 
> Instead, user need to switch to another buffer and then switch back:
> 
> ```
> (progn
>   (setq scroll-bar-width 50)
>   (switch-to-buffer "*Messages*")
>   (switch-to-buffer "*scratch*"))
> ```

This is the expected and documented behavior.  From the ELisp
Reference manual:

     If you do not specify a window’s scroll bar settings via
  ‘set-window-scroll-bars’, the buffer-local variables
  ‘vertical-scroll-bar’, ‘horizontal-scroll-bar’, ‘scroll-bar-width’ and
  ‘scroll-bar-height’ in the buffer being displayed control the window’s
  scroll bars.  The function ‘set-window-buffer’ examines these variables.
  If you change them in a buffer that is already visible in a window, you
  can make the window take note of the new values by calling
  ‘set-window-buffer’ specifying the same buffer that is already
  displayed.

Your last recipe calls set-window-buffer indirectly, so it succeeds
where the original recipe failed.




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 05 Apr 2023 09:03:02 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 05 Apr 2023 09:55:02 GMT) Full text and rfc822 format available.

Notification sent to Shynur Xie <one.last.kiss <at> outlook.com>:
bug acknowledged by developer. (Wed, 05 Apr 2023 09:55:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Shynur Xie <one.last.kiss <at> outlook.com>
Cc: 62676-done <at> debbugs.gnu.org
Subject: Re: bug#62676: Setting `scroll-bar-width` Doesn't Take Effect
 Immediately
Date: Wed, 05 Apr 2023 12:55:09 +0300
> From: Shynur Xie <one.last.kiss <at> outlook.com>
> Date: Wed, 5 Apr 2023 09:18:58 +0000
> 
> Thanks.  No further questions.

Thanks, closing.




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

This bug report was last modified 2 years and 46 days ago.

Previous Next


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