summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-02-28 09:40:24 -0600
committerCase Duckworth2022-02-28 09:40:24 -0600
commitf65f4387b8f196f63ec78189b69bb337c1c558f3 (patch)
tree62db754ddd527cbbdb2df07b32910a341882fbbf /lisp
parentAdd input method to the modeline (diff)
downloademacs-f65f4387b8f196f63ec78189b69bb337c1c558f3.tar.gz
emacs-f65f4387b8f196f63ec78189b69bb337c1c558f3.zip
Fix elfeed-update-async niceness
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+elfeed.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/+elfeed.el b/lisp/+elfeed.el index 85d9c3b..ac316c4 100644 --- a/lisp/+elfeed.el +++ b/lisp/+elfeed.el
@@ -40,6 +40,10 @@
40 40
41(defvar +elfeed--update-running nil "Whether an update is currently running.") 41(defvar +elfeed--update-running nil "Whether an update is currently running.")
42(defvar +elfeed--update-count 0 "How many times `+elfeed-update-command' has run.") 42(defvar +elfeed--update-count 0 "How many times `+elfeed-update-command' has run.")
43(defcustom +elfeed-update-niceness 15
44 "How \"nice\" `+elfeed-update-command' should be."
45 :type 'integer
46 :group 'elfeed)
43 47
44(defun +elfeed-update-command () 48(defun +elfeed-update-command ()
45 (interactive) 49 (interactive)
@@ -104,7 +108,10 @@
104 (message update-message-format "start") 108 (message update-message-format "start")
105 (set-process-sentinel (start-process-shell-command 109 (set-process-sentinel (start-process-shell-command
106 "Elfeed" "*+elfeed-update-background*" 110 "Elfeed" "*+elfeed-update-background*"
107 (format "nice -%d %s %s" 15 "emacs -Q --script" script)) 111 (format "nice -n %d %s %s"
112 +elfeed-update-niceness
113 "emacs -Q --script"
114 script))
108 (lambda (proc stat) 115 (lambda (proc stat)
109 (advice-remove 'elfeed #'+elfeed--update-message) 116 (advice-remove 'elfeed #'+elfeed--update-message)
110 (setq +elfeed--update-running nil) 117 (setq +elfeed--update-running nil)