all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrea Greselin <greselin.andrea@gmail.com>
To: martin rudalics <rudalics@gmx.at>
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:59:53 +0200	[thread overview]
Message-ID: <CAJ_oJbYUMGD1nZ7hZx_WCH7NLdjZkmqne2q1bz=+xTEDzP-0-Q@mail.gmail.com> (raw)
In-Reply-To: <e9ddd67c-8a80-a5a0-aec0-2db3dffc0942@gmx.at>

[-- Attachment #1: Type: text/plain, Size: 3104 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3768 bytes --]

  reply	other threads:[~2019-06-18 13:59 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 [this message]
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

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

  git send-email \
    --in-reply-to='CAJ_oJbYUMGD1nZ7hZx_WCH7NLdjZkmqne2q1bz=+xTEDzP-0-Q@mail.gmail.com' \
    --to=greselin.andrea@gmail.com \
    --cc=36193@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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.