Closed 0x4d6165 closed 11 months ago
doom-modeline
emacs -Q
Defining a custom segment results in emacs slowing to a crawl. I don't think my custom segment is overly complex but maybe it's being polled too much?
(use-package doom-modeline :straight t :after nerd-icons :config (setq doom-modeline-battery t) (setq doom-modeline-time t) (add-hook 'doom-modeline-mode-hook (lambda () (doom-modeline-set-modeline 'my-custom-modeline 'default))) (doom-modeline-def-segment todo-count "Display the remaining number of todo items." (let ((todo-count (count-todos-in-org-files))) (propertize (format " %s" todo-count) 'face '(:foreground "yellow")))) (doom-modeline-def-modeline 'my-custom-modeline '(bar workspace-name window-number modals matches buffer-info remote-host buffer-position word-count parrot selection-info) '(objed-state misc-info persp-name grip todo-count irc mu4e gnus github debug input-method indent-info buffer-encoding lsp major-mode process vcs checker battery time)) (setq doom-modeline-modeline 'my-custom-modeline) (add-hook 'doom-modeline-mode-hook (lambda () (doom-modeline-set-modeline 'my-custom-modeline 'default))) :hook (after-init . doom-modeline-mode))
Define a custom segment and add it to the modeline.
I expected the current number of org todos to be output to the modeline without introducing noticeable latency
Linux
29
https://git.sr.ht/~x4d6165/.emacs.d
No response
Is count-todos-in-org-files the bottle-neck? Do profiling, then you will find out the root cause.
count-todos-in-org-files
Thank you for the bug report
doom-modeline
related packages.emacs -Q
.Bug description
Defining a custom segment results in emacs slowing to a crawl. I don't think my custom segment is overly complex but maybe it's being polled too much?
Steps to reproduce
Define a custom segment and add it to the modeline.
Expected behavior
I expected the current number of org todos to be output to the modeline without introducing noticeable latency
OS
Linux
Emacs Version
29
Emacs Configurations
https://git.sr.ht/~x4d6165/.emacs.d
Error callstack
No response
Anything else
No response