all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Getting `load-theme` to work in `-batch` mode?
@ 2024-02-13 15:06 Konstantin Kharlamov
  2024-02-14 14:59 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Kharlamov @ 2024-02-13 15:06 UTC (permalink / raw)
  To: help-gnu-emacs

I'm writing tests for color-identifiers-mode, and as part of the
testing I need to check it reacts correctly to theme being changed.

There are already tests that work fine so far, but it turns out `load-
theme` doesn't work as is. More specifically, even though `(load-theme
'adwait)` works fine, but background/foreground have no color:

   emacs -batch --eval "(progn (load-theme 'adwaita) (print (face-
   attribute 'default :foreground)) (print (face-attribute 'default
   :background)))"
   
   "unspecified-fg"
   
   "unspecified-bg"

I asked on Emacs stackexchange¹ and I was hinted that it's because
batch-mode doesn't initialize a windowing system.

But is there no function I can call to make `load-theme` assign colors
as in non-batch mode?

P.S.: pls keep in in CC

1:
https://emacs.stackexchange.com/questions/80358/unspecified-fg-bg-in-batch-mode-when-querying-foreground-background-colors/80370#80370



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

end of thread, other threads:[~2024-02-14 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 15:06 Getting `load-theme` to work in `-batch` mode? Konstantin Kharlamov
2024-02-14 14:59 ` Eli Zaretskii
2024-02-14 15:14   ` Konstantin Kharlamov
2024-02-14 15:34     ` Eli Zaretskii

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.