Git Product home page Git Product logo

circadian.el's Introduction

Hey 👋

I'm a programmer & creative technologist from Germany.

In 2016 I got my masters degree at the University of Koblenz in Computational Visualistics, a computer science program with a special focus on computer graphics and image processing mixed with courses from interdisciplinary fields such as art history, drawing and media art.

Currently pushing bits and pixels @ FIELD

My interest lies in connecting technology with creative disciplines. I love to build generative visuals and interactive visual systems. I am a member of a hobbyists light artist collective Pendeloque, which mainly performs in the area of Mannheim and Heidelberg.

www.guidoschmidt.cc

Get in touch

I'm open for projects, collaborations and teaching! Feel free to drop me a line at [email protected].

Social Media

top langs

circadian.el's People

Contributors

berhoel avatar guidoschmidt avatar jumper047 avatar sarg avatar tangxinfa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circadian.el's Issues

Emacs is freezed at switch

Hello!
I have a problem - Emacs is completely freezed while swithing process. Theme is swithed but Emacs doesn't respond at all.

Related config:

(use-package ef-themes
  :straight (:host github :repo "protesilaos/ef-themes")
  :defer)

(use-package circadian
  :straight (:host github :repo "guidoschmidt/circadian.el")
  :requires (local-config)
  :custom
  ;; (circadian-themes '(("7:30" . ef-light)
  ;;                     ("19:30" . ef-night)))
  (calendar-latitude 44.786568)
  (calendar-longitude 20.448921)
  (circadian-themes '((:sunrise . ef-light)
                      (:sunset  . ef-night)))
  :config
  (circadian-setup))

Full config

  1. GNU Emacs 29.0.90 (build 1, aarch64-apple-darwin22.4.0, NS
    appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a)) of 2023-05-04
    MacOS 13.4.1 (22F82)
    Circadian: 52e336d
    Ef-themes: 27bf0ff4d9218c382fbaa512efb754f19b667678
  2. GNU Emacs 29.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
    cairo version 1.16.0) of 2023-06-04
    Ubuntu 20.04.6 LTS
    Circadian: 52e336d
    Ef-themes: 27bf0ff4d9218c382fbaa512efb754f19b667678

hibernate system on weekend use wrong theme after system up

My sunrise time is 6:11, sunset time is 18:25, the system is hibernated at
2018-09-15 21:44:23, and up at 2018-09-17 10:10:23.

In *Messages* we can see it switch themes one by one, and finally use the
wrong theme tao-yin. When i reevaluate my circadian configurations the right
theme tao-yang is used.

My circadian emacs configuration:

;; circadian
(use-package circadian
  :custom
  (circadian-themes (if t
                        ;;; colorless
                        '((:sunrise . tao-yang)
                          ("14:00" . base16-grayscale-dark)
                          (:sunset . tao-yin))
                      ;;; colorful
                      '((:sunrise . base16-summerfruit-light)
                        ("14:00" . base16-gruvbox-dark-medium)
                        (:sunset . base16-summerfruit-dark))))
  :config
  (cancel-function-timers #'circadian-enable-theme)
  (circadian-setup))

Message output:

[2018-09-15 21:44:23.396] Mark set
[2018-09-17 10:10:23.927] Preparing diary...
[2018-09-17 10:10:23.959] Preparing diary...done
[2018-09-17 10:10:25.450] Emacs color theme tao-yang
[2018-09-17 10:10:25.567] circadian.el — enabled tao-yang
[2018-09-17 10:10:26.267] Emacs color theme tao-yang
[2018-09-17 10:10:26.524] circadian.el — enabled tao-yang
[2018-09-17 10:10:28.238] Emacs color theme base16-grayscale-dark
[2018-09-17 10:10:28.268] circadian.el — enabled base16-grayscale-dark
[2018-09-17 10:10:29.286] Emacs color theme tao-yin
[2018-09-17 10:10:29.340] circadian.el — enabled tao-yin

saving desktop: theme wouldn't switch

I use circadian happily and also desktop-save-mode.
When I shut down emacs in the evening and open it up in the morning, the dark theme is saved (and vice versa with the light theme). Is there a way to reload the correct theme with desktop-save-mode?
Thanks.

config:

(desktop-save-mode` 1)
(setq desktop-restore-frame nil)

;; ALSO: saving the window configuration; maybe that's the issue here 

(defvar pre-ediff-window-configuration nil
  "window configuration to use")
(defvar new-ediff-frame-to-use nil
  "new frame for ediff to use")
(defun save-my-window-configuration ()
  (interactive)
  (setq pre-ediff-window-configuration (current-window-configuration))
  (select-frame-set-input-focus (setq new-ediff-frame-to-use (new-frame))))
(add-hook 'ediff-before-setup-hook 'save-my-window-configuration)
(defun restore-my-window-configuration ()
  (interactive)
  (when (framep new-ediff-frame-to-use)
    (delete-frame new-ediff-frame-to-use)
    (setq new-ediff-frame-to-use nil))
  (when (window-configuration-p pre-ediff-window-configuration)
    (set-window-configuration pre-ediff-window-configuration)))
(add-hook 'ediff-after-quit-hook-internal 'restore-my-window-configuration)

(use-package circadian
  :config
  (setq calendar-latitude 48.2)
  (setq calendar-longitude 16.37)
  (setq circadian-themes '((:sunrise . leuven)
                           (:sunset  . wombat)))
  (circadian-setup))

how it overrides previous theme?

Hi,

Before, when I switch off the last theme I get emacs default theme selected. It is not longer true with this package - instead of showing up emacs default theme it shows previous one. As result, next theme colors get inherited from previous one (and not from default), making themes look different and unusable. So, basically the effect is the same as if you check "select more then one theme at a time" checkbox - instead of switching theme fully, it will combine previous and next one.

Expected behavior: when theme deselected, emacs default theme appears.

WBR,
Alex

Improve code

Three minor things:

  1. Use -*- lexical-binding: t; -*-.

  2. The functions first, fourth, third, second, and remove-if all belong to the deprecated cl package. You should add a cl- prefix to each and require cl-lib. Currently your package will only work if the user had already loaded cl for some reason.

  3. Change mapcar to mapc in circadian-setup.

The last two issues are caught trivially with the byte compiler. You can do a spot check like so:

emacs -Q -batch -f batch-byte-compile circadian.el

Thanks to skeeto via reddit for these proposals.

keep current theme if there is no time slot defintion

I would like to suggest to keep current selected theme if the current time don't match time intervals.
E.g. I've tried this:

(use-package circadian
  :load-path "~/.emacs.d/config/circadian/"
  :ensure t
  :config
  (setq circadian-themes '(("11:00" . avk-daylight)
                           ("18:30" . avk-darkblue-yellow)
                           ("22:00" . warm-night)))
  (circadian-setup))

but it fails with this error:

Error (use-package): circadian :config: Invalid theme name ‘nil’

... because it is 07.43 on clock so first time slot is not started

For this case there should be some workaround. I suggest to not switch theme, another idea is to get previous one.

sunrise-sunset returns string not parseble by Circadian in Germany

When running this very snipped (with calendar-latitude/longitude set)

(setq circadian-themes '((:sunrise . whiteboard)
                         (:sunset . tsdh-dark)))
(circadian-setup)

I recieve the following error:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string(".m" "" nil)
  circadian-clear-12h-postfix(nil)
  circadian-parse-time-string("Wed")
  circadian-match-sun(:sunrise)
  circadian-mapc((:sunrise . whiteboard))
  mapc(circadian-mapc ((:sunrise . whiteboard) (:sunset . tsdh-dark)))
  circadian-setup()
  (progn (setq circadian-themes (quote ((:sunrise . whiteboard) (:sunset . tsdh-dark)))) (circadian-setup))
  (condition-case err (progn (setq circadian-themes (quote ((:sunrise . whiteboard) (:sunset . tsdh-dark)))) (circadian-setup)) ((debug error) (ignore (display-warning (quote use-package) (format "%s %s: %s" "circadian" ":config" (error-message-string err)) :error))))
  (if (not (require (quote circadian) nil (quote t))) (ignore (message (format "Cannot load %s" (quote circadian)))) (condition-case err (progn (setq circadian-themes (quote ((:sunrise . whiteboard) (:sunset . tsdh-dark)))) (circadian-setup)) ((debug error) (ignore (display-warning (quote use-package) (format "%s %s: %s" "circadian" ":config" (error-message-string err)) :error)))) t)
  (progn (use-package-ensure-elpa (quote circadian) (quote t) (quote nil) :ensure) (if (not (require (quote circadian) nil (quote t))) (ignore (message (format "Cannot load %s" (quote circadian)))) (condition-case err (progn (setq circadian-themes (quote ((:sunrise . whiteboard) (:sunset . tsdh-dark)))) (circadian-setup)) ((debug error) (ignore (display-warning (quote use-package) (format "%s %s: %s" "circadian" ":config" (error-message-string err)) :error)))) t))
  eval((progn (use-package-ensure-elpa (quote circadian) (quote t) (quote nil) :ensure) (if (not (require (quote circadian) nil (quote t))) (ignore (message (format "Cannot load %s" (quote circadian)))) (condition-case err (progn (setq circadian-themes (quote ((:sunrise . whiteboard) (:sunset . tsdh-dark)))) (circadian-setup)) ((debug error) (ignore (display-warning (quote use-package) (format "%s %s: %s" "circadian" ":config" (error-message-string err)) :error)))) t)) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

The problem appears to be that Circadian is expecting some string format from (sunrise-sunset) but the function returns the following for me:
#("Wed, Apr 18, 2018: Sunrise 6:41am (Mitteleuropäische Sommerzeit), sunset 8:38pm (Mitteleuropäische Sommerzeit) at Aachen, DE (13:57 hours daylight)" 35 63 (charset windows-1252) 81 109 (charset windows-1252)).

Sadly, this breaks the whole package for me

Infinite loop when running `(circadian-activate-current)`

Hello. I am on the latest version of Emacs 30 and running the following code from emacs -Q:

(defvar bootstrap-version)

(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
                                    'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'circadian)

(require 'calendar)
(setq calendar-latitude 28
      calendar-longitude -96)

(require 'circadian)

(setq circadian-themes
      '((:sunrise . modus-operandi-tinted)
        (:sunset  . modus-vivendi-tinted)))

(circadian-activate-current)

causes the package to reload the current theme in an infinite loop and consequently this makes the screen flicker a lot.

circadian-themes switch interval problem

(use-package circadian
  :config
  (setq circadian-themes '(
			   ("8:00" . doom-outrun-electric)
			   ("9:00" . alect-dark-alt)
			   ("10:00" . misterioso)
			   ("11:00" . doom-snazzy)
			   ("12:00" . birds-of-paradise-plus)
			   ("13:00" . doom-oceanic-next)
			   ("14:00" . wombat)
			   ("15:00" . wheatgrass)
			   ("16:00" . doom-palenight)
			   ("17:00" . doom-nova)
			   ("18:00" . doom-acario-dark)
			   (:sunset  . github-modern) ; 19:05
			   ("21:00" . adwaita)
			   ("22:00" . dichromacy)
			   ("23:00" . doom-acario-light)
			   ))
  (circadian-setup))

At current time 2020-08-25 13:10:00 . I eval last config then the theme doom-oceanic-next enabled, but when I checked timer-list variable

( [nil 24388 40706 309167 nil undo-auto--boundary-timer nil nil 0]
  [nil 24388 40737 26724 60 ac-clear-variables-every-minute nil nil 0]
  [nil 24389 6496 0 nil circadian-activate-latest-theme nil nil 0])
;; (format-time-string
;;  "%Y-%m-%d %H:%M:%S %z"
;;  '(24389 6496 0)
;; )
;; => "2020-08-25 22:00:00 +0800"  run circadian-activate-latest-theme function

I saw the circadian-activate-latest-theme function next run at 2020-08-25 22:00:00

but it should not be running at 14:00 (for wombat theme) as circadian-themes variable defined

How to override or stop circadian?

I set up and initialized Circadian as suggested, but then decided I wanted for the moment to use a different theme. However, circadian doesn't allow the theme to be reset -- it's not that attempting to set the theme fails exactly, but after load-theme completes, circadian changes it back.

I don't even seem to be able to figure out how to turn off circadian so I can set a different theme, temporarily or permanently. Even uninstalling the package doesn't seem to kill it--or allow me to change themes....

So,

  1. How does one override or pause circadian so you can change to a different theme temporarily?
  2. How does one stop or disable circadian? Once started, does it just run without end until emacs itself is terminated or restarted?

Circadian crashes above arctic circle

Hi! Thanks for the nice package, I'm happily using it.

I have an annoying edge case for you... I current live somewhere north of the arctic circle, and this means that there are currently no sunsets or sunrises. This means that (solar-sunrise-sunset (calendar-current-date)) evaluates to (nil nil "0:00") instead of the usual ((6.8833333337679505 "CET") (16.283333332277834 "CET") "9:24") (for example). This means that circadian--frac-to-time receives a value of nil when circadian is set up, and raises and error.

Could you possibly add a test for this somewhere? Ideally, of course, circadian should just use the "sunset" theme when the sun is currently down (which should be checked for somehow, since solar-sunrise-sunset will return nil regardless) and the "sunrise" theme when the sun is currently up.

Let me know if you would like me to have a stab at fixing this!

Backtrace:

Debugger entered--Lisp error: (wrong-type-argument numberp nil)
  floor(nil nil)
  cl-floor(nil)
  circadian--frac-to-time(nil)
  circadian-sunrise()
  circadian-match-sun(:sunrise)
  #f(compiled-function (entry) #<bytecode -0x85fcd1b0ef7a79>)((:sunrise . modus-operandi))
  mapcar(#f(compiled-function (entry) #<bytecode -0x85fcd1b0ef7a79>) ((:sunrise . modus-operandi) (:sunset . modus-vivendi)))
  circadian-themes-parse()
  circadian-activate-latest-theme()
  circadian-setup()
  (progn (setq circadian-themes '((:sunrise . modus-operandi) (:sunset . modus-vivendi))) (circadian-setup) t)
  ...

Problems with switching themes

I tried leuven and distinguished as themes switched by circadian. Switching from leuven (MELPA version) to distinguished left some settings from leuven in the new theme, i.E. in gnus groups buffer the topic header were not readable because leuven sets bold to bold/black and distinguished leaves it this way

Use `enable-theme` in favor of `load-theme`

It would be a good idea to check, if the designated theme in circadian-enable-theme was loaded before in the current Emacs session and if that's the case, rather use enable-theme than load-theme

UTC Time Only?

This is mostly just a question. I was playing around with circadian and I love the idea of it! However, right now it is reading only UTC time. I have the time displayed in my emacs and that is the correct local time. But when setting circadian it was always my dark theme when it should have been the light theme. After playing around I realized it is UTC (which I am in UTC -6). So I would have to set the times to +6 hours from my actual time. It shouldn't be an issue, but wondered if there was a way to set the time circadian uses or where it derives its's time from?

circadian-setup is very heavy

When I execute (circadian-setup), Emacs is suspended a few minutes, lot of I/O. (why circadian-setup has heavy I/O?)

So I take a profiling with Emacs profiler:

CPU profiler report

- timer-event-handler                                          103854  70%
 - apply                                                       103846  70%
  - circadian-enable-theme                                     103772  70%
   - load-theme                                                 53783  36%
    - apply                                                     53783  36%
     - #<compiled 0x2267db>                                     53783  36%
      - enable-theme                                            53707  36%
       - apply                                                  53707  36%
        - ad-Advice-enable-theme                                53707  36%
         - #<compiled 0x226a5f>                                 53703  36%
          - custom-theme-recalc-face                            53690  36%
           - face-spec-recalc                                   53553  36%
            - face-spec-set-2                                   48746  32%
             - apply                                            48733  32%
              - set-face-attribute                              48638  32%
               - internal-set-lisp-face-attribute               47961  32%
                - frame-set-background-mode                     47876  32%
                 - face-attr-match-p                            23974  16%
                    face-attribute                              23078  15%
                 - face-spec-recalc                             23150  15%
                  - face-spec-reset-face                        20658  13%
                   - apply                                      20639  13%
                      set-face-attribute                        19378  13%
                  - face-spec-set-2                              1954   1%
                   - apply                                       1918   1%
                      set-face-attribute                         1672   1%
                  + face-spec-choose                              158   0%
                 + face-spec-choose                               167   0%
                 + face-list                                       37   0%
            + face-spec-reset-face                               4555   3%
            + face-spec-choose                                    101   0%
             facep                                                 91   0%
      + eval-buffer                                                64   0%
      + insert-file-contents                                        6   0%
        #<compiled 0x22688b>                                        3   0%
   - mapc                                                       49937  33%
    - disable-theme                                             49937  33%
     - apply                                                    49937  33%
      - ad-Advice-disable-theme                                 49937  33%
       - #<compiled 0x226b77>                                   49931  33%
        - face-set-after-frame-default                          27319  18%
         - face-spec-recalc                                     23514  15%
          - face-spec-reset-face                                20963  14%
           - apply                                              20922  14%
              set-face-attribute                                19707  13%
          - face-spec-set-2                                      1993   1%
           - apply                                               1933   1%
              set-face-attribute                                 1650   1%
          - face-spec-choose                                      162   0%
           + face-spec-set-match-display                           58   0%
         + face-list                                               19   0%
        - set-frame-parameter                                   22492  15%
         - modify-frame-parameters                              22226  15%
          - frame-set-background-mode                           22075  14%
           - face-attr-match-p                                  10966   7%
              face-attribute                                    10505   7%
           - face-spec-recalc                                   10512   7%
            - face-spec-reset-face                               9309   6%
             - apply                                             9293   6%
                set-face-attribute                               8870   5%
            + face-spec-set-2                                     925   0%
            + face-spec-choose                                     84   0%
           + face-spec-choose                                      80   0%
             face-list                                             19   0%
             color-values                                           6   0%
        + custom--frame-color-default                              12   0%
   + run-hook-with-args                                            52   0%
  + auto-revert-buffers                                            14   0%
  + beacon--dec                                                    13   0%
  + save-some-buffers                                               3   0%
 + timer-activate-when-idle                                         3   0%
- command-execute                                               41670  28%
 - call-interactively                                           41670  28%
  - funcall-interactively                                       40939  27%
   - eval-expression                                            38589  26%
    - eval                                                      38580  26%
     - circadian-setup                                          38580  26%
      - circadian-activate-latest-theme                         38551  26%
       - circadian-enable-theme                                 38529  26%
        - mapc                                                  36074  24%
         - disable-theme                                        36074  24%
          - apply                                               36074  24%
           - ad-Advice-disable-theme                            36074  24%
            - #<compiled 0x226b77>                              36074  24%
             - set-frame-parameter                              22388  15%
              - modify-frame-parameters                         22282  15%
               - frame-set-background-mode                      22105  14%
                - face-attr-match-p                             10916   7%
                   face-attribute                               10487   7%
                - face-spec-recalc                              10568   7%
                 - face-spec-reset-face                          9307   6%
                  - apply                                        9288   6%
                     set-face-attribute                          8825   5%
                 + face-spec-set-2                                981   0%
                 + face-spec-choose                               133   0%
                + face-spec-choose                                107   0%
                + face-list                                        10   0%
             - face-set-after-frame-default                     13651   9%
              - face-spec-recalc                                11833   8%
               - face-spec-reset-face                           10482   7%
                - apply                                         10455   7%
                   set-face-attribute                            9881   6%
               - face-spec-set-2                                 1087   0%
                + apply                                          1066   0%
               + face-spec-choose                                  80   0%
              + internal-merge-in-global-face                      17   0%
              + face-list                                          15   0%
             + custom--frame-color-default                         10   0%
        + load-theme                                             2432   1%
        + run-hook-with-args                                       23   0%
       + circadian-filter-inactivate-themes                        22   0%
      + mapc                                                       29   0%
   + counsel-M-x                                                 2340   1%
   + handle-focus-in                                               10   0%
  + byte-code                                                     731   0%
+ ...                                                            2286   1%
+ redisplay_internal (C function)                                  33   0%
+ sp--save-pre-command-state                                       11   0%
  global-project-shells-mode-check-buffers                          4   0%

Memory profiler report:

- timer-event-handler                                      55,590,275  52%
 - apply                                                   55,535,640  52%
  - circadian-enable-theme                                 54,416,671  51%
   - mapc                                                  28,572,095  26%
    - disable-theme                                        28,572,095  26%
     - apply                                               28,572,095  26%
      - ad-Advice-disable-theme                            28,572,095  26%
       - #<compiled 0x226b77>                              28,572,095  26%
        - face-set-after-frame-default                     18,777,534  17%
         - face-spec-recalc                                17,779,558  16%
          - face-spec-reset-face                           14,994,446  14%
           - apply                                         14,990,222  14%
            - set-face-attribute                               23,534   0%
               purecopy                                         9,022   0%
          - face-spec-set-2                                 1,361,184   1%
             apply                                          1,361,184   1%
          - face-spec-choose                                   58,520   0%
             face-spec-set-match-display                       19,448   0%
           face-list                                          505,824   0%
        - set-frame-parameter                               9,793,505   9%
         - modify-frame-parameters                          8,996,117   8%
          - frame-set-background-mode                       8,926,421   8%
           - face-spec-recalc                               8,234,773   7%
            - face-spec-reset-face                          7,101,485   6%
             - apply                                        7,101,485   6%
              - set-face-attribute                            981,629   0%
                 purecopy                                       4,514   0%
            - face-spec-set-2                                 529,056   0%
               apply                                          529,056   0%
            + face-spec-choose                                 67,784   0%
             face-list                                        545,952   0%
             face-attr-match-p                                114,048   0%
           + face-spec-choose                                  27,216   0%
             color-values                                       2,112   0%
   - load-theme                                            25,839,296  24%
    - apply                                                25,839,296  24%
     - #<compiled 0x2267db>                                25,839,296  24%
      - enable-theme                                       25,549,490  24%
       - apply                                             25,549,490  24%
        - ad-Advice-enable-theme                           25,549,490  24%
         - #<compiled 0x226a5f>                            25,539,986  24%
          - custom-theme-recalc-face                       25,535,762  24%
           - face-spec-recalc                              25,366,802  23%
            - face-spec-set-2                              19,467,860  18%
             - apply                                       19,467,860  18%
              - set-face-attribute                         18,821,588  17%
               - internal-set-lisp-face-attribute          17,939,906  16%
                - frame-set-background-mode                17,936,738  16%
                 - face-spec-recalc                        16,728,674  15%
                  - face-spec-reset-face                   14,146,706  13%
                   + apply                                 14,146,706  13%
                  + face-spec-set-2                         1,286,256   1%
                  + face-spec-choose                           30,624   0%
                   face-list                                  963,072   0%
                   face-attr-match-p                          203,808   0%
                 + face-spec-choose                            35,904   0%
                   color-values                                 5,280   0%
            + face-spec-reset-face                          5,091,102   4%
          + enable-theme                                        4,224   0%
         + cider-scale-background-color                         1,056   0%
      + insert-file-contents                                  216,472   0%
      + eval-buffer                                            46,816   0%
      + #<compiled 0x22688b>                                    6,336   0%
        generate-new-buffer                                     2,122   0%
        custom-theme--load-path                                 1,684   0%
   + run-hook-with-args                                         5,280   0%
  + beacon--dec                                             1,104,656   1%
  + auto-revert-buffers                                        11,120   0%
    jit-lock-context-fontify                                    2,112   0%
  + save-some-buffers                                           1,081   0%
 + timer-inc-time                                              19,008   0%
   timer-until                                                  7,558   0%
 + timer-activate-when-idle                                     4,224   0%
 + timer-activate                                               3,168   0%
- command-execute                                          50,308,500  47%
 - call-interactively                                      50,308,500  47%
  - funcall-interactively                                  48,293,474  45%
   - counsel-M-x                                           30,625,261  28%
    - ivy-read                                             29,484,034  27%
     - ivy-call                                            24,273,592  22%
      - #<compiled 0x39b9921>                              24,273,592  22%
       - command-execute                                   24,273,592  22%
        - call-interactively                               24,273,592  22%
         - funcall-interactively                           24,273,576  22%
          + profiler-report                                24,273,576  22%
     + read-from-minibuffer                                 5,004,550   4%
     + ivy--reset-state                                       200,520   0%
    + require                                                   2,048   0%
      counsel--M-x-prompt                                       2,043   0%
   - eval-expression                                       17,416,317  16%
    - eval                                                 17,415,225  16%
     - circadian-setup                                     17,415,225  16%
      - circadian-activate-latest-theme                    17,278,509  16%
       + circadian-enable-theme                            17,152,997  16%
       - circadian-filter-inactivate-themes                   124,488   0%
        - cl-remove-if                                        124,488   0%
         - apply                                              124,488   0%
          - cl-remove                                         124,488   0%
           - #<compiled 0x366f1dd>                            124,488   0%
            - circadian-match-sun                             124,488   0%
             - circadian-sunset                                62,776   0%
              - sunrise-sunset                                 62,776   0%
               - solar-sunrise-sunset-string                   62,776   0%
                - solar-sunrise-sunset                         62,776   0%
                 + solar-sunrise-and-sunset                    60,648   0%
                 + solar-exact-local-noon                       1,064   0%
                 + solar-sidereal-time                          1,064   0%
             + circadian-sunrise                               61,712   0%
       + circadian-now-time-string                              1,024   0%
      + mapc                                                  136,716   0%
    + prin1                                                     1,092   0%
   + handle-focus-in                                          251,896   0%
  + byte-code                                               2,015,026   1%
+ redisplay_internal (C function)                             152,136   0%
+ ...                                                           8,188   0%
+ winner-save-old-configurations                                4,136   0%
+ yas--post-command-handler                                     3,360   0%
+ sclang-document-post-command-hook-function                    3,156   0%
  xselect-convert-to-targets                                    2,112   0%
+ xselect-convert-to-string                                     1,048   0%

Timezone/time on Windows seems to be off by one hour

Describe the bug
Using circardian--encode-time on Windows seems to offset the time by 1 hour.

To Reproduce
Steps to reproduce the behavior:

  • Execute eval-expression and enter (decode-time (circadian--encode-time 11 54))
  • Result is one hour off, eg (0 54 12 22 4 2024 1 t 7200)

Expected behavior
Using (decode-time (circadian--encode-time 11 54)) should not offset time by one hour.

Environment (please complete the following information):

  • OS: Windows 11
  • Emacs: Emacs 29.3

Integration with macOS system theme preference?

I'm looking for a way to synchronise the Emacs theme with light/dark/auto mode on macOS. I understand the current method is completely cross-platform, but it would be great to integrate with specific platforms' capabilities.

Theme not fully loaded on switch

Thanks for this great package! And for the theme suggestions, I love them!

I'm using a very similar setup as the one from the README:

  (setq calendar-latitude 26.084534)
  (setq calendar-longitude -80.238454)
  (setq circadian-themes '((:sunrise . apropospriate-light)
                           (:sunset  . nord)))
  (circadian-setup)

The switch as sunrise/sunset does occur, but leaves me with a theme not fully loaded. Here is a screenshot of a session using Polymode on a RMarkdown file (so essentially mixing Markdown and ESS mode), after a sunset switch to Nord theme:

screenshot from 2017-12-01 17-29-06

Simply closing and restarting Emacs shows what I should have:

screenshot from 2017-12-01 17-33-33

What's missing is the correct background in the ESS chunk. Not too sure where to starts from here…

Theme change scheduled to wrong day.

I have two entries in circadian themes:

(setq circadian-themes '(("09:00" . 'theme-one) ("18:00". 'theme-two)))

When I launched my Emacs in 08:30, theme-two was applied, but switch to theme-one was planned on 09:00 of the next day.
Just in case I'll put here workaround (until proper bugfix) - just add entry ("00:01" . 'theme-two) to circadian themes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.