remote agenda and notes, optimizations

This commit is contained in:
Levi Neely 2024-09-08 19:31:53 +02:00
parent f45e12cf56
commit f5065eb32f
3 changed files with 15 additions and 13 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/emacs/ellama-sessions/
/emacs/claude/
/emacs/games/
/emacs/tramp

View File

@ -9,6 +9,7 @@
'("9c22d1654fbfed0285a519541b5ea76462d9b03d778d1dc34779fd38613bf7c8" "9fb561389e5ac5b9ead13a24fb4c2a3544910f67f12cfcfe77b75f36248017d0" "88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" "014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" "81f53ee9ddd3f8559f94c127c9327d578e264c574cda7c6d9daddaec226f87bb" "3770d0ae70172461ee0a02edcff71b7d480dc54066e8960d8de9367d12171efb" "f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33" "f079ef5189f9738cf5a2b4507bcaf83138ad22d9c9e32a537d61c9aae25502ef" "835d934a930142d408a50b27ed371ba3a9c5a30286297743b0d488e94b225c5f" default))
'(elfeed-feeds '("https://hnrss.org/newest"))
'(mc/always-run-for-all t)
'(org-agenda-files nil)
'(package-selected-packages
'(org-journal plan9-theme parchment-theme acme-theme wrap-region surround go-playground dired-sidebar consult persistent-scratch scratch cape kind-icon corfu eat eshell-toggle eshell-git-prompt eshell-bookmark eshell-autojump eshell-atuin elfeed vertico orderless plz ace-mc ace-jump-mode flycheck fic-mode kotlin-mode rego-mode protobuf-mode multi-web-mode mmm-mode python-mode php-mode json-mode yaml-mode go-mode plantuml-mode graphviz-dot-mode magit denote unicode-fonts nerd-icons-ibuffer nerd-icons-completion nerd-icons-dired doom-modeline which-key multiple-cursors dash async-status async consult-projectile))
'(tab-width 2))

View File

@ -47,7 +47,7 @@
(defun my/visit-todo ()
"Visit TODO.org in home"
(interactive)
(find-file "~/TODO.org"))
(find-file "/ssh:lkn@alioth.uberspace.de:/home/lkn/TODO.org"))
(defun my/reload-init-file ()
"Reload the Emacs init file."
@ -101,10 +101,6 @@
("TODO" . (:foreground "red" :weight bold))
("DONE" . (:foreground "green" :weight bold))
("CNCL" . (:foreground "gray" :weight bold)))
org-agenda-files
(append (list "~/TODO.org")
(directory-files-recursively "~/notes"
"\\.org$"))
org-agenda-prefix-format '((agenda . "%i %?-12t% s ")
(todo . " %i ")
(tags . " %i ")
@ -122,28 +118,33 @@
(defun my/org-refile-config ()
(setq org-refile-targets
'((nil :maxlevel . 9)
("~/TODO.org" :maxlevel . 9))
("/ssh:lkn@alioth.uberspace.de:/home/lkn/TODO.org" :maxlevel . 9))
org-refile-use-outline-path 'file
org-outline-path-complete-in-steps nil
org-refile-allow-creating-parent-nodes 'confirm))
(defun my/org-capture-config ()
(setq org-capture-templates
'(("t" "TODO" entry (file "~/TODO.org")
'(("t" "TODO" entry (file "/ssh:lkn@alioth.uberspace.de:/home/lkn/TODO.org")
"* TODO %?\n %i" :prepend t))))
(defun my/refresh-org-agenda-files ()
(defun my/add-remote-todo-file ()
"Add remote TODO.org file to org-agenda-files."
(interactive)
(setq org-agenda-files
(append
(list "~/TODO.org")
(directory-files-recursively "~/notes" "\\.org$"))))
(unless org-agenda-files
(setq org-agenda-files
(list "/ssh:lkn@alioth.uberspace.de:/home/lkn/TODO.org"))))
(advice-add 'org-agenda :before #'my/add-remote-todo-file)
(use-package emacs
:init
(tool-bar-mode -1)
(require 'server)
(unless (server-running-p) (server-start))
(setq tramp-persistency-file-name "~/.config/emacs/tramp")
(setq tramp-inline-compress-start-size 1000)
(setq backup-by-copying t
completion-cycle-threshold 3
create-lockfiles nil
@ -251,7 +252,6 @@
(my/org-config)
(my/org-refile-config)
(my/org-capture-config)
(run-with-idle-timer 300 t #'my/refresh-org-agenda-files)
(org-babel-do-load-languages
'org-babel-load-languages
'((shell . t))))