GNU bug report logs - #54237
Disabling `scroll-bar-mode' fails when setting `default-frame-alist'

Previous Next

Package: emacs;

Reported by: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>

Date: Thu, 3 Mar 2022 14:46:02 UTC

Severity: normal

Tags: moreinfo

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54237 in the body.
You can then email your comments to 54237 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54237; Package emacs. (Thu, 03 Mar 2022 14:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 03 Mar 2022 14:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>
To: bug-gnu-emacs <at> gnu.org
Subject: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
Date: Thu, 03 Mar 2022 15:44:56 +0100
Running

  emacs -Q --daemon -l test.el

where the content of test.el is

  (scroll-bar-mode -1)
  (setq default-frame-alist '((cursor-color . "#007fff")))

fails to disable `scroll-bar-mode'.  When opening an Emacs client, I
have to toggle `scroll-bar-mode' two times to disable it.  The first
time it is "enabled" again (no visible change) and the second time it's
disabled.  The problem disappears if I remove the second line.

I'm using Emacs 29 built from master earlier today.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54237; Package emacs. (Thu, 03 Mar 2022 14:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 54237 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>
Cc: 54237 <at> debbugs.gnu.org
Subject: Re: bug#54237: Disabling `scroll-bar-mode' fails when setting
 `default-frame-alist'
Date: Thu, 03 Mar 2022 15:55:40 +0100
Tor Kringeland <tor.a.s.kringeland <at> ntnu.no> writes:

>   emacs -Q --daemon -l test.el
>
> where the content of test.el is
>
>   (scroll-bar-mode -1)
>   (setq default-frame-alist '((cursor-color . "#007fff")))
>
> fails to disable `scroll-bar-mode'.  When opening an Emacs client, I
> have to toggle `scroll-bar-mode' two times to disable it.  The first
> time it is "enabled" again (no visible change) and the second time it's
> disabled.  The problem disappears if I remove the second line.
>
> I'm using Emacs 29 built from master earlier today.

`scroll-bar-mode' disables itself by altering default-frame-alist, so I
think what you're seeing is predictable?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 03 Mar 2022 14:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54237; Package emacs. (Thu, 03 Mar 2022 15:15:01 GMT) Full text and rfc822 format available.

Message #13 received at 54237 <at> debbugs.gnu.org (full text, mbox):

From: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54237 <at> debbugs.gnu.org
Subject: Re: bug#54237: Disabling `scroll-bar-mode' fails when setting
 `default-frame-alist'
Date: Thu, 03 Mar 2022 16:14:10 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> `scroll-bar-mode' disables itself by altering default-frame-alist, so I
> think what you're seeing is predictable?

I see, I didn't know.  Can I disable `scroll-bar-mode' via
`default-frame-alist' directly?

The problem arose since `set-cursor-color' doesn't work when starting
Emacs as a server so I changed `default-frame-alist' but that enabled
`scroll-bar-mode' ...

Feel free to close this as it's not a bug, then.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54237; Package emacs. (Thu, 03 Mar 2022 15:22:01 GMT) Full text and rfc822 format available.

Message #16 received at 54237 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>
Cc: 54237 <at> debbugs.gnu.org
Subject: Re: bug#54237: Disabling `scroll-bar-mode' fails when setting
 `default-frame-alist'
Date: Thu, 03 Mar 2022 16:20:53 +0100
Tor Kringeland <tor.a.s.kringeland <at> ntnu.no> writes:

>> `scroll-bar-mode' disables itself by altering default-frame-alist, so I
>> think what you're seeing is predictable?
>
> I see, I didn't know.  Can I disable `scroll-bar-mode' via
> `default-frame-alist' directly?

Yes, for new frames, you can just set:

(setq default-frame-alist '((vertical-scroll-bars)))

> The problem arose since `set-cursor-color' doesn't work when starting
> Emacs as a server so I changed `default-frame-alist' but that enabled
> `scroll-bar-mode' ...
>
> Feel free to close this as it's not a bug, then.

Perhaps this quirk should be documented in the scroll-bar-mode doc
string, though?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54237; Package emacs. (Thu, 03 Mar 2022 15:54:02 GMT) Full text and rfc822 format available.

Message #19 received at 54237 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Tor Kringeland
 <tor.a.s.kringeland <at> ntnu.no>
Cc: "54237 <at> debbugs.gnu.org" <54237 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#54237: Disabling `scroll-bar-mode' fails when
 setting `default-frame-alist'
Date: Thu, 3 Mar 2022 15:53:05 +0000
> Perhaps this quirk should be documented in the scroll-bar-mode doc
> string, though?

Yes, +1.  Users shouldn't need to look in the code to
find out that "`scroll-bar-mode' disables itself by
altering default-frame-alist".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54237; Package emacs. (Fri, 04 Mar 2022 15:58:02 GMT) Full text and rfc822 format available.

Message #22 received at 54237 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>
Cc: 54237 <at> debbugs.gnu.org
Subject: Re: bug#54237: Disabling `scroll-bar-mode' fails when setting
 `default-frame-alist'
Date: Fri, 04 Mar 2022 16:56:58 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> The problem arose since `set-cursor-color' doesn't work when starting
>> Emacs as a server so I changed `default-frame-alist' but that enabled
>> `scroll-bar-mode' ...
>>
>> Feel free to close this as it's not a bug, then.
>
> Perhaps this quirk should be documented in the scroll-bar-mode doc
> string, though?

I've now done so in Emacs 29 in both the scroll-bar-mode and
default-frame-alist doc strings.  (The latter already hinted at there
being problems with setting it directly, but I've made it more
explicit.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 54237 <at> debbugs.gnu.org and Tor Kringeland <tor.a.s.kringeland <at> ntnu.no> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 04 Mar 2022 15:58:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 02 Apr 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 74 days ago.

Previous Next


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