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: martin rudalics <rudalics <at> gmx.at>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
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: Wed, 19 Jun 2019 11:14:04 +0200
>> 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,

This one, I suppose

(defun hide-minibuffer-scrollbar (frame)
  (with-selected-frame frame
    (set-window-scroll-bars (minibuffer-window) 0 nil)))

(if (daemonp)
    (add-hook 'after-make-frame-functions #'hide-minibuffer-scrollbar) ; Only for client sessions
  (set-window-scroll-bars (minibuffer-window) 0 nil))

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

Since I never use emacsclient I can't tell and have no idea how this
is supposed to work.  It could be caused by this part in minibuf.c

  if ((noninteractive
       /* In case we are running as a daemon, only do this before
	  detaching from the terminal.  */
       || (IS_DAEMON && DAEMON_RUNNING))
      && NILP (Vexecuting_kbd_macro))
    {
      val = read_minibuf_noninteractive (prompt, expflag, defalt);
      return unbind_to (count, val);
    }

which avoids saving and restoring the window configuration and thus
removing the scroll bar when restoring.

Maybe someone else can clarify how this is supposed to work.

In a normal session the scroll bar gets removed after M-x is done so
apparently restoring the old window configuration also removes the
scroll bar.

martin




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.