unofficial mirror of bug-gnu-emacs@gnu.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: Tue, 18 Jun 2019 15:42:39 +0200	[thread overview]
Message-ID: <e9ddd67c-8a80-a5a0-aec0-2db3dffc0942@gmx.at> (raw)
In-Reply-To: <CAJ_oJbb5TW1dHrTE4DJD-Q6tTRC=FzKWYEP+guN6rKLoa1=czg@mail.gmail.com>

 > 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






  reply	other threads:[~2019-06-18 13:42 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 [this message]
2019-06-18 13:59           ` Andrea Greselin
2019-06-19  9:14             ` martin rudalics
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=e9ddd67c-8a80-a5a0-aec0-2db3dffc0942@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).