all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#62676: Setting `scroll-bar-width` Doesn't Take Effect Immediately
@ 2023-04-05  8:18 Shynur Xie
  2023-04-05  9:02 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Shynur Xie @ 2023-04-05  8:18 UTC (permalink / raw)
  To: 62676

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





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

* bug#62676: Setting `scroll-bar-width` Doesn't Take Effect Immediately
  2023-04-05  8:18 bug#62676: Setting `scroll-bar-width` Doesn't Take Effect Immediately Shynur Xie
@ 2023-04-05  9:02 ` Eli Zaretskii
       [not found]   ` <SA0PR04MB74332C1E5B0C1C8BC6FBC379D7909@SA0PR04MB7433.namprd04.prod.outlook.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2023-04-05  9:02 UTC (permalink / raw)
  To: Shynur Xie; +Cc: 62676

tags 62676 notabug
thank

> From: Shynur Xie <one.last.kiss@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.





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

* bug#62676: Setting `scroll-bar-width` Doesn't Take Effect Immediately
       [not found]   ` <SA0PR04MB74332C1E5B0C1C8BC6FBC379D7909@SA0PR04MB7433.namprd04.prod.outlook.com>
@ 2023-04-05  9:55     ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2023-04-05  9:55 UTC (permalink / raw)
  To: Shynur Xie; +Cc: 62676-done

> From: Shynur Xie <one.last.kiss@outlook.com>
> Date: Wed, 5 Apr 2023 09:18:58 +0000
> 
> Thanks.  No further questions.

Thanks, closing.





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

end of thread, other threads:[~2023-04-05  9:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05  8:18 bug#62676: Setting `scroll-bar-width` Doesn't Take Effect Immediately Shynur Xie
2023-04-05  9:02 ` Eli Zaretskii
     [not found]   ` <SA0PR04MB74332C1E5B0C1C8BC6FBC379D7909@SA0PR04MB7433.namprd04.prod.outlook.com>
2023-04-05  9:55     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.