GNU bug report logs - #36193
26.2; 'set-window-scroll-bars' setting doesn't take effect in emacsclient session

Previous Next

Package: emacs;

Reported by: Andrea Greselin <greselin.andrea <at> gmail.com>

Date: Thu, 13 Jun 2019 14:59:01 UTC

Severity: minor

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 36193 <at> debbugs.gnu.org
Subject: bug#36193: 26.2; 'set-window-scroll-bars' setting doesn't take effect in emacsclient session
Date: Tue, 18 Jun 2019 15:59:53 +0200
[Message part 1 (text/plain, inline)]
> That is if I evaluate with emacs -Q
>   (set-window-scroll-bars (minibuffer-window) 0 nil)
> and then type M-x, I get the scroll bars back just as you do.

The behaviour is different in my case: when I use
'after-make-frame-functions' as in the snippet in my second message, the
scroll bar persists after doing M-x. If I evaluate
  (set-window-scroll-bars (minibuffer-window) 0 nil)
in a running session, they are displayed only as long as the minibuffer is
active, and then they are turned off again.

On Tue, 18 Jun 2019 at 15:42, martin rudalics <rudalics <at> gmx.at> wrote:

>  > Yes. If in 'hide-minibuffer-scrollbar' I replace '(minibuffer-window)'
> with
>  > 'nil', the scratch buffer has no scroll bars and they don't reappear
> even
>  > if the buffer become longer than the window height. They are only
>  > re-enabled if I open another buffer in that window, and then they
> persist.
>
> Ahh...  I should have asked you that so it's good you noticed it.
> This shows that the behavior is not minibuffer window specific.
>
>  > No, messages are shown at startup without the scroll bars being shown.
> if I
>  > do M-x or M-: or anything that moves the point to the minibuffer, then
> they
>  > are re-enabled.
>
> So showing another buffer in the minibuffer window reenables the
> scroll bars.  This is consistent with the first observation.
>
> The behavior (which I would call a bug) is caused by set_window_buffer
> when called with keep_margins_p nil and is completely unrelated to
> whether you do it in emacsclient or in a "normal" session.  That is if
> I evaluate with emacs -Q
>
> (set-window-scroll-bars (minibuffer-window) 0 nil)
>
> and then type M-x, I get the scroll bars back just as you do.  The
> behavior is described in the Elisp manual on 'set-window-scroll-bars'
>
>       The values specified here may be later overridden by invoking
>       ‘set-window-buffer’ (*note Buffers and Windows::) on WINDOW with
>       its KEEP-MARGINS argument ‘nil’ or omitted.
>
> but I consistently forget about it.
>
> If people agree that this is a bug, we can try to find a more general
> fix.  Otherwise, I'll fix the minibuffer window scroll bars with the
> help of a separate variable (I have written the code some time ago and
> would "only" have to find it now).
>
> As a temporary workaround you can try to set the buffer local values
> of 'scroll-bar-width' to zero in all buffers that might eventually
> show up in the minibuffer window, for example, thusly
>
> (progn
>    (set-window-scroll-bars (minibuffer-window) 0 nil)
>    (with-current-buffer (get-buffer-create " *Echo Area 0*")
>      (setq scroll-bar-width 0))
>    (with-current-buffer (get-buffer-create " *Echo Area 1*")
>      (setq scroll-bar-width 0))
>    (with-current-buffer (get-buffer-create " *Minibuf-0*")
>      (setq scroll-bar-width 0))
>    (with-current-buffer (get-buffer-create " *Minibuf-1*")
>      (setq scroll-bar-width 0)))
>
> This should work as long as you don't enable recursive minibuffers.
>
> martin
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 361 days ago.

Previous Next


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