all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Dark mode by default
@ 2020-09-12 22:01 Stefan Monnier
  2020-09-12 22:39 ` Tim Van den Langenbergh
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Stefan Monnier @ 2020-09-12 22:01 UTC (permalink / raw)
  To: emacs-devel

The recent proposal to use dark mode by default brings up a technical
question: I thought Emacs's default foreground and background colors
were not hardcoded by Emacs but were taken from the user's "general"
config (i.e. the desktop environment).

Does this mechanism fail to work for some reason, or have desktop
environments just stopped providing that info?


        Stefan




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

* Re: Dark mode by default
  2020-09-12 22:01 Dark mode by default Stefan Monnier
@ 2020-09-12 22:39 ` Tim Van den Langenbergh
  2020-09-13 13:59   ` Eli Zaretskii
  2020-09-13  7:21 ` tomas
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: Tim Van den Langenbergh @ 2020-09-12 22:39 UTC (permalink / raw)
  To: emacs-devel

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

On Sunday, 13 September 2020 00:01:59 CEST Stefan Monnier wrote:
> The recent proposal to use dark mode by default brings up a technical
> question: I thought Emacs's default foreground and background colors
> were not hardcoded by Emacs but were taken from the user's "general"
> config (i.e. the desktop environment).
>
> Does this mechanism fail to work for some reason, or have desktop
> environments just stopped providing that info?
>
>
>         Stefan
>
>
>

Under KDE on OpenSUSE Tumbleweed Emacs gets default colours from
my Desktop Environment settings.

I have also noticed that if I define background, foreground, as well as
color0, color1,..., color15 in my .Xresources file Emacs prefers those settings
over my DE settings.

I have noticed there are users who are unfortunately stuck on Apple's MacOS, I
think they may have issues setting a colour scheme (I once had a job where
MacOS Yosemite was required, I couldn't find a way to change theming settings).

As for Microsoft Windows, I unfortunately don't know if it has any sort of
standard for theming settings.

-Tim Van den Langenbergh

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* RE: Dark mode by default
@ 2020-09-12 23:58 arthur miller
  0 siblings, 0 replies; 16+ messages in thread
From: arthur miller @ 2020-09-12 23:58 UTC (permalink / raw)
  To: Tim Van den Langenbergh, emacs-devel@gnu.org

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


-------- Originalmeddelande --------
Från: Tim Van den Langenbergh <tmt_vdl@gmx.com>
Datum: 2020-09-13 00:41 (GMT+01:00)
Till: emacs-devel@gnu.org
Ämne: Re: Dark mode by default

On Sunday, 13 September 2020 00:01:59 CEST Stefan Monnier wrote:
> The recent proposal to use dark mode by default brings up a technical
> question: I thought Emacs's default foreground and background colors
> were not hardcoded by Emacs but were taken from the user's "general"
> config (i.e. the desktop environment).
>
> Does this mechanism fail to work for some reason, or have desktop
> environments just stopped providing that info?
>
>
>         Stefan
>
>
>

Under KDE on OpenSUSE Tumbleweed Emacs gets default colours from
my Desktop Environment settings.

I have also noticed that if I define background, foreground, as well as
color0, color1,..., color15 in my .Xresources file Emacs prefers those settings
over my DE settings.

I have noticed there are users who are unfortunately stuck on Apple's MacOS, I
think they may have issues setting a colour scheme (I once had a job where
MacOS Yosemite was required, I couldn't find a way to change theming settings).

As for Microsoft Windows, I unfortunately don't know if it has any sort of
standard for theming settings.

-Tim Van den Langenbergh
‐—
There are users like me who don't run a desktop like KDE or Gnome on their shiny GNU/Linux OS either but prefer a simpler window manager instead.

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

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

* Re: Dark mode by default
  2020-09-12 22:01 Dark mode by default Stefan Monnier
  2020-09-12 22:39 ` Tim Van den Langenbergh
@ 2020-09-13  7:21 ` tomas
  2020-09-13 14:24   ` Eli Zaretskii
  2020-09-13 10:02 ` Daniel Martín
  2020-09-13 13:56 ` Eli Zaretskii
  3 siblings, 1 reply; 16+ messages in thread
From: tomas @ 2020-09-13  7:21 UTC (permalink / raw)
  To: emacs-devel

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

On Sat, Sep 12, 2020 at 06:01:59PM -0400, Stefan Monnier wrote:
> The recent proposal to use dark mode by default brings up a technical
> question: I thought Emacs's default foreground and background colors
> were not hardcoded by Emacs but were taken from the user's "general"
> config (i.e. the desktop environment).
> 
> Does this mechanism fail to work for some reason, or have desktop
> environments just stopped providing that info?

Yikes!

So it turns out, after all that discussion (what /is/ better these
days, anyway? Dark or light?) that Emacs was doing the right thing,
after all?

Hm.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Dark mode by default
  2020-09-12 22:01 Dark mode by default Stefan Monnier
  2020-09-12 22:39 ` Tim Van den Langenbergh
  2020-09-13  7:21 ` tomas
@ 2020-09-13 10:02 ` Daniel Martín
  2020-09-13 11:19   ` 황병희
                     ` (2 more replies)
  2020-09-13 13:56 ` Eli Zaretskii
  3 siblings, 3 replies; 16+ messages in thread
From: Daniel Martín @ 2020-09-13 10:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> The recent proposal to use dark mode by default brings up a technical
> question: I thought Emacs's default foreground and background colors
> were not hardcoded by Emacs but were taken from the user's "general"
> config (i.e. the desktop environment).

In the case of macOS, Emacs does not use the system settings. Dark mode
only darkens the menu bar and tool bar, but the buffer is still black
text over white background. Some faces, like "region" *do* respect the
macOS color setting, though.

Most recent macOS applications usually offer three options for the
default color theme, just in case someone wants to override the system
setting for a particular application:

- Light
- Dark
- Auto (just use the system setting)



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

* Re: Dark mode by default
  2020-09-13 10:02 ` Daniel Martín
@ 2020-09-13 11:19   ` 황병희
  2020-09-13 11:52   ` Ricardo Wurmus
  2020-09-13 14:35   ` Stefan Monnier
  2 siblings, 0 replies; 16+ messages in thread
From: 황병희 @ 2020-09-13 11:19 UTC (permalink / raw)
  To: emacs-devel

> - Light
> - Dark
> - Auto (just use the system setting)

Well still i prefer to have "Light".

Sincerely, Byung-Hee

-- 
^고맙습니다 _布德天下_ 감사합니다_^))//

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

* Re: Dark mode by default
  2020-09-13 10:02 ` Daniel Martín
  2020-09-13 11:19   ` 황병희
@ 2020-09-13 11:52   ` Ricardo Wurmus
  2020-09-13 14:36     ` Stefan Monnier
  2020-09-13 14:35   ` Stefan Monnier
  2 siblings, 1 reply; 16+ messages in thread
From: Ricardo Wurmus @ 2020-09-13 11:52 UTC (permalink / raw)
  To: Daniel Martín; +Cc: Stefan Monnier, emacs-devel


Daniel Martín <mardani29@yahoo.es> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> The recent proposal to use dark mode by default brings up a technical
>> question: I thought Emacs's default foreground and background colors
>> were not hardcoded by Emacs but were taken from the user's "general"
>> config (i.e. the desktop environment).
>
> In the case of macOS, Emacs does not use the system settings. Dark mode
> only darkens the menu bar and tool bar, but the buffer is still black
> text over white background. Some faces, like "region" *do* respect the
> macOS color setting, though.

It is exactly the same here on GNU+Linux with Gnome.

-- 
Ricardo



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

* Re: Dark mode by default
  2020-09-12 22:01 Dark mode by default Stefan Monnier
                   ` (2 preceding siblings ...)
  2020-09-13 10:02 ` Daniel Martín
@ 2020-09-13 13:56 ` Eli Zaretskii
  3 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2020-09-13 13:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sat, 12 Sep 2020 18:01:59 -0400
> 
> The recent proposal to use dark mode by default brings up a technical
> question: I thought Emacs's default foreground and background colors
> were not hardcoded by Emacs but were taken from the user's "general"
> config (i.e. the desktop environment).
> 
> Does this mechanism fail to work for some reason, or have desktop
> environments just stopped providing that info?

Not sure which mechanism you alluded to.  We supported, and still do
support, default color specification in X resources, in particular in
~/.Xdefaults.



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

* Re: Dark mode by default
  2020-09-12 22:39 ` Tim Van den Langenbergh
@ 2020-09-13 13:59   ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2020-09-13 13:59 UTC (permalink / raw)
  To: Tim Van den Langenbergh; +Cc: emacs-devel

> From: Tim Van den Langenbergh <tmt_vdl@gmx.com>
> Date: Sun, 13 Sep 2020 00:39:26 +0200
> 
> As for Microsoft Windows, I unfortunately don't know if it has any sort of
> standard for theming settings.

MS-Windows does support desktop themes and global default colors for
various UI elements.  Emacs on MS-Windows first looks in the Registry
for Emacs-specific settings of colors (this emulates X resources, so
the names of the settings are identical to their X counterparts), and
if not found, defaults to the system-default colors (whose names can
be seen at the end of the buffer produced by list-colors-display).



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

* Re: Dark mode by default
  2020-09-13  7:21 ` tomas
@ 2020-09-13 14:24   ` Eli Zaretskii
  2020-09-13 14:36     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2020-09-13 14:24 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

> Date: Sun, 13 Sep 2020 09:21:08 +0200
> From: <tomas@tuxteam.de>
> 
> On Sat, Sep 12, 2020 at 06:01:59PM -0400, Stefan Monnier wrote:
> > The recent proposal to use dark mode by default brings up a technical
> > question: I thought Emacs's default foreground and background colors
> > were not hardcoded by Emacs but were taken from the user's "general"
> > config (i.e. the desktop environment).
> > 
> > Does this mechanism fail to work for some reason, or have desktop
> > environments just stopped providing that info?
> 
> Yikes!
> 
> So it turns out, after all that discussion (what /is/ better these
> days, anyway? Dark or light?) that Emacs was doing the right thing,
> after all?

Emacs always does the right thing.  By definition.

Anyway, I think we should stop the dispute about the colors.  Color
preferences are deeply individual, and whatever we do, someone will
want to change the defaults.  So we should simply offer enough color
themes to cover most of the spectrum (pun intended), and let the users
choose what they like, preferably from the "intro" buffer that is
being discussed in a parallel thread, or from some other command that
shows the available themes and asks the user to pick one.



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

* Re: Dark mode by default
  2020-09-13 10:02 ` Daniel Martín
  2020-09-13 11:19   ` 황병희
  2020-09-13 11:52   ` Ricardo Wurmus
@ 2020-09-13 14:35   ` Stefan Monnier
  2020-09-13 16:38     ` Daniel Martín
  2 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2020-09-13 14:35 UTC (permalink / raw)
  To: Daniel Martín; +Cc: emacs-devel

> In the case of macOS, Emacs does not use the system settings. Dark mode
> only darkens the menu bar and tool bar, but the buffer is still black
> text over white background.

Could you report this as a bug?


        Stefan




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

* Re: Dark mode by default
  2020-09-13 11:52   ` Ricardo Wurmus
@ 2020-09-13 14:36     ` Stefan Monnier
  0 siblings, 0 replies; 16+ messages in thread
From: Stefan Monnier @ 2020-09-13 14:36 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: emacs-devel, Daniel Martín

>> In the case of macOS, Emacs does not use the system settings. Dark mode
>> only darkens the menu bar and tool bar, but the buffer is still black
>> text over white background. Some faces, like "region" *do* respect the
>> macOS color setting, though.
>
> It is exactly the same here on GNU+Linux with Gnome.

Then I think this should also be reported as a bug.


        Stefan




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

* Re: Dark mode by default
  2020-09-13 14:24   ` Eli Zaretskii
@ 2020-09-13 14:36     ` Lars Ingebrigtsen
  2020-09-13 14:59       ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 14:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tomas, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Anyway, I think we should stop the dispute about the colors.  Color
> preferences are deeply individual, and whatever we do, someone will
> want to change the defaults.

Well, the question here was what Emacs should do if the user has
specified that they want an OS-level "dark theme".  Emacs doesn't
currently respect that choice, I think?  (At least Emacs comes up, by
default, with a white background here on a Debian/Gnome Shell platform,
while everything else comes up with a dark background.)

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



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

* Re: Dark mode by default
  2020-09-13 14:36     ` Lars Ingebrigtsen
@ 2020-09-13 14:59       ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2020-09-13 14:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: tomas, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: <tomas@tuxteam.de>,  emacs-devel@gnu.org
> Date: Sun, 13 Sep 2020 16:36:45 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Anyway, I think we should stop the dispute about the colors.  Color
> > preferences are deeply individual, and whatever we do, someone will
> > want to change the defaults.
> 
> Well, the question here was what Emacs should do if the user has
> specified that they want an OS-level "dark theme".

That wasn't my impression regarding the question we've been
discussing.

> Emacs doesn't currently respect that choice, I think?

No, it doesn't, AFAIK.



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

* Re: Dark mode by default
  2020-09-13 14:35   ` Stefan Monnier
@ 2020-09-13 16:38     ` Daniel Martín
  2020-09-13 19:05       ` Stefan Monnier
  0 siblings, 1 reply; 16+ messages in thread
From: Daniel Martín @ 2020-09-13 16:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> Could you report this as a bug?
>

I'm not sure if it's a bug or a feature request. What's the mechanism
you described that should work, at least on GNU/Linux? If it's based on
~/.Xresources, then it's normal that it doesn't work on macOS because
macOS, by default, does not use the X Window System.

We could consider it a feature request, though, where we may want to do,
for example:

- Support on macOS a similar system than the one we have for Windows to
  emulate ~/.Xresources using the Windows Registry.

- Use the native Apple APIs to detect if the system is using light or
  dark mode and change the background color of Emacs accordingly. This
  seems a much more controversial change.



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

* Re: Dark mode by default
  2020-09-13 16:38     ` Daniel Martín
@ 2020-09-13 19:05       ` Stefan Monnier
  0 siblings, 0 replies; 16+ messages in thread
From: Stefan Monnier @ 2020-09-13 19:05 UTC (permalink / raw)
  To: Daniel Martín; +Cc: emacs-devel

>> Could you report this as a bug?
> I'm not sure if it's a bug or a feature request.

Same difference.  ;-)

> What's the mechanism you described that should work, at least on
> GNU/Linux?  If it's based on ~/.Xresources, then it's normal that it
> doesn't work on macOS because macOS, by default, does not use the
> X Window System.

Xresources were simply the standard way to specify such preferences in
GNU/Linux back in the day.  Of course, it needs to be adapted to each
system (and apparently it also needs to be adapted to new conventions
under GNU/Linux).


        Stefan




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

end of thread, other threads:[~2020-09-13 19:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 22:01 Dark mode by default Stefan Monnier
2020-09-12 22:39 ` Tim Van den Langenbergh
2020-09-13 13:59   ` Eli Zaretskii
2020-09-13  7:21 ` tomas
2020-09-13 14:24   ` Eli Zaretskii
2020-09-13 14:36     ` Lars Ingebrigtsen
2020-09-13 14:59       ` Eli Zaretskii
2020-09-13 10:02 ` Daniel Martín
2020-09-13 11:19   ` 황병희
2020-09-13 11:52   ` Ricardo Wurmus
2020-09-13 14:36     ` Stefan Monnier
2020-09-13 14:35   ` Stefan Monnier
2020-09-13 16:38     ` Daniel Martín
2020-09-13 19:05       ` Stefan Monnier
2020-09-13 13:56 ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2020-09-12 23:58 arthur miller

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.