From ef5719915d06ed55a1b372098ce2c8df0c3dab09 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 21 Jan 2022 09:28:33 -0600 Subject: Add logging to CANCELED state Maybe? This isn't working right for /some reason/ --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index f28da00..e05148f 100644 --- a/init.el +++ b/init.el @@ -488,7 +488,7 @@ org-tags-column (- (- fill-column (length org-ellipsis))) org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(d!)") - (sequence "|" "CANCELED(k!)") + (sequence "|" "CANCELED(k@)") (sequence "MEETING(m)"))) (:bind "RET" #'+org-return-dwim "" #'+org-table-copy-down -- cgit 1.4.1-21-gabe81 From 6ae55c4a36b124eb99c8cd1fb67d9813cc00380d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 21 Jan 2022 09:28:52 -0600 Subject: Change display of tab-bar buttons --- init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index e05148f..15b3768 100644 --- a/init.el +++ b/init.el @@ -609,7 +609,11 @@ (:option tab-bar-tab-name-function '+tab-bar-basename tab-bar-tab-name-truncated-max 20 tab-bar-tab-name-ellipsis truncate-string-ellipsis - tab-bar-show t) + tab-bar-show t + tab-bar-close-button-show t + tab-bar-close-button (propertize " ✕ " 'display t + 'close-tab t) + tab-bar-new-button (propertize "+ " 'display t)) (tab-bar-mode +1) (if (version< emacs-version "28.0") (+tab-bar-misc-info-mode +1) -- cgit 1.4.1-21-gabe81 From 40a6acaf56f5525c683942665b9231085412cda9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 21 Jan 2022 09:29:49 -0600 Subject: Being working on +elfeed-update-async --- init.el | 1 + lisp/+elfeed.el | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/init.el b/init.el index 15b3768..3e023db 100644 --- a/init.el +++ b/init.el @@ -1093,6 +1093,7 @@ See also `crux-reopen-as-root-mode'." "&" #'+elfeed-show-browse-generic "RET" #'shr-browse-url) (:hook #'reading-mode) + (:option +elfeed--update-first-time 60) (+elfeed-update-async-mode +1))) (setup (:straight elfeed-org) diff --git a/lisp/+elfeed.el b/lisp/+elfeed.el index ef93347..4a874c3 100644 --- a/lisp/+elfeed.el +++ b/lisp/+elfeed.el @@ -40,7 +40,7 @@ (defun +elfeed-update-command () (interactive) - (let ((script (expand-file-name "~/.local/bin/elfeed"))) + (let ((script (expand-file-name "~/.local/bin/elfeed-update.el"))) (message "[Elfeed] Updating in the background.") (setq +elfeed--update-running t) (elfeed-db-save) @@ -51,21 +51,46 @@ (unless (file-exists-p script) (make-directory (file-name-directory script) :parents) (with-temp-buffer - (insert "(progn\n" - " (load (locate-user-emacs-file \"early-init\"))\n" - " (straight-use-package 'elfeed)\n" - " (require 'elfeed)\n" - " (elfeed)\n" - " (elfeed-update)\n" - " (while (> (elfeed-queue-count-total) 0)\n" - " (sleep-for 5)\n" - " (message \"%s\" (elfeed-queue-count-total))\n" - " (accept-process-output))\n" - " (elfeed-db-save-safe)\n" - " (elfeed-db-gc-safe))") - (write-file script))) + (insert + (nconcat nil + "#!/usr/bin/env -S emacs --script" + ;; I have to load the necessary files + "(load (locate-user-emacs-file \"early-init\"))" + "(straight-use-package 'elfeed)" + "(straight-use-package 'elfeed-org)" + "(require 'elfeed)" + "(require 'elfeed-org)" + ;; And set needed variables + `("(setq rmh-elfeed-org-files '(" + ,(mapconcat (lambda (el) + (format "\"%s\"" el)) + rmh-elfeed-org-files + " ") + "))") + ;; Overwrite log function to go to stdout + "(defun elfeed-log (level fmt &rest objects)" + " (princ (format \"[%s] [%s]: %s\\n\"" + " (format-time-string \"%F %T\")" + " level" + " (apply #'format fmt objects))))" + ;; Load elfeed + "(elfeed-org)" + "(elfeed-db-load)" + "(elfeed)" + ;; Update elfeed + "(elfeed-update)" + ;; Wait to finish ... I think. + "(while (> (elfeed-queue-count-total) 0)" + " (sleep-for 5)" + " (message \"%s\" (elfeed-queue-count-total))" + " (accept-process-output))" + ;; Save and garbage-collect + "(elfeed-db-save)" + "(elfeed-db-gc)")) + (write-file script)) + (chmod script #o777)) (set-process-sentinel (start-process-shell-command - "Elfeed" nil (concat "emacs --script " script)) + "Elfeed" nil script) (lambda (a b) (advice-remove 'elfeed #'+elfeed--update-message) (setq +elfeed--update-running nil) -- cgit 1.4.1-21-gabe81