unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
@ 2022-03-03 14:44 Tor Kringeland
  2022-03-03 14:55 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Tor Kringeland @ 2022-03-03 14:44 UTC (permalink / raw)
  To: 54237

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
  2022-03-03 14:44 bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist' Tor Kringeland
@ 2022-03-03 14:55 ` Lars Ingebrigtsen
  2022-03-03 15:14   ` Tor Kringeland
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-03 14:55 UTC (permalink / raw)
  To: Tor Kringeland; +Cc: 54237

Tor Kringeland <tor.a.s.kringeland@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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
  2022-03-03 14:55 ` Lars Ingebrigtsen
@ 2022-03-03 15:14   ` Tor Kringeland
  2022-03-03 15:20     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Tor Kringeland @ 2022-03-03 15:14 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 54237

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
  2022-03-03 15:14   ` Tor Kringeland
@ 2022-03-03 15:20     ` Lars Ingebrigtsen
  2022-03-03 15:53       ` bug#54237: [External] : " Drew Adams
  2022-03-04 15:56       ` Lars Ingebrigtsen
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-03 15:20 UTC (permalink / raw)
  To: Tor Kringeland; +Cc: 54237

Tor Kringeland <tor.a.s.kringeland@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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#54237: [External] : bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
  2022-03-03 15:20     ` Lars Ingebrigtsen
@ 2022-03-03 15:53       ` Drew Adams
  2022-03-04 15:56       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 6+ messages in thread
From: Drew Adams @ 2022-03-03 15:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Tor Kringeland; +Cc: 54237@debbugs.gnu.org

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist'
  2022-03-03 15:20     ` Lars Ingebrigtsen
  2022-03-03 15:53       ` bug#54237: [External] : " Drew Adams
@ 2022-03-04 15:56       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-04 15:56 UTC (permalink / raw)
  To: Tor Kringeland; +Cc: 54237

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-04 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 14:44 bug#54237: Disabling `scroll-bar-mode' fails when setting `default-frame-alist' Tor Kringeland
2022-03-03 14:55 ` Lars Ingebrigtsen
2022-03-03 15:14   ` Tor Kringeland
2022-03-03 15:20     ` Lars Ingebrigtsen
2022-03-03 15:53       ` bug#54237: [External] : " Drew Adams
2022-03-04 15:56       ` Lars Ingebrigtsen

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