Merge branch 'main' of https://tildegit.org/acdw/emacs
This commit is contained in:
commit
fbc03a1cdf
8
init.el
8
init.el
|
@ -492,7 +492,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
|
||||
"<S-return>" #'+org-table-copy-down
|
||||
|
@ -613,7 +613,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)
|
||||
|
|
|
@ -52,21 +52,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)
|
||||
|
|
Loading…
Reference in New Issue