all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Andrea Greselin <greselin.andrea@gmail.com>
Cc: 36193@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	[thread overview]
Message-ID: <659801cd-2b07-32b2-db96-de4470078f7d@gmx.at> (raw)
In-Reply-To: <CAJ_oJbYUMGD1nZ7hZx_WCH7NLdjZkmqne2q1bz=+xTEDzP-0-Q@mail.gmail.com>

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





  reply	other threads:[~2019-06-19  9:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 14:57 bug#36193: 26.2; 'set-window-scroll-bars' setting doesn't take effect in emacsclient session Andrea Greselin
2019-06-13 16:11 ` Eli Zaretskii
2019-06-13 18:48   ` Andrea Greselin
2019-06-16  8:17     ` martin rudalics
2019-06-18 12:46       ` Andrea Greselin
2019-06-18 13:42         ` martin rudalics
2019-06-18 13:59           ` Andrea Greselin
2019-06-19  9:14             ` martin rudalics [this message]
2019-07-17  8:38           ` martin rudalics
2019-07-18  8:12             ` Andrea Greselin
2019-07-19  8:15               ` martin rudalics
2019-07-19  9:09                 ` Eli Zaretskii
2019-07-22  7:41                   ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=659801cd-2b07-32b2-db96-de4470078f7d@gmx.at \
    --to=rudalics@gmx.at \
    --cc=36193@debbugs.gnu.org \
    --cc=greselin.andrea@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.