Compare commits

...

4 commits

Author SHA1 Message Date
ca8e491ef3 chore(emacs): use notmuch from straight and use it remotely 2025-02-10 18:02:10 +00:00
221d2427be feat(emacs): show only long term scheduled tasks not all of them
When viewing the org agenda I have a section to view all the scheduled
tasks. That is not that helpful as most of them are shown in the agenda
view on the calendar.

This now limits the scheduled tasks to be only tasks that are not on the
calendar view for this week, to remove duplicate task from being shown.
2025-02-10 17:57:25 +00:00
8679a006f9 feat(emacs): enable ob for evaluating code blocks 2025-02-10 17:56:25 +00:00
7b3ed93c0c fix(nu): crash in the user propt 2025-02-10 17:53:59 +00:00
2 changed files with 34 additions and 9 deletions

View file

@ -91,6 +91,20 @@ just in in the current buffer."
(require 'org-id) (require 'org-id)
(require 'org-protocol) (require 'org-protocol)
(require 'org-tempo) (require 'org-tempo)
(require 'ob)
(use-package ob-nushell
:straight '(ob-nushell :type git :host github :repo "ln-nl/ob-nushell")
:config
(require 'ob-nushell)
(setq org-babel-nushell-command "~/.cargo/bin/nu"
ob-nushell-command-options "--error-style p")
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t) ; Enable Emacs Lisp
(shell . t)
(nushell . t))))
(defun aa/org-roam-update-tasklist-tag () (defun aa/org-roam-update-tasklist-tag ()
"Add or remove the 'tasklist' filetag based on the presence of TODO items in "Add or remove the 'tasklist' filetag based on the presence of TODO items in
@ -179,14 +193,25 @@ just in in the current buffer."
((agenda "" ((org-deadline-warning-days 7))) ((agenda "" ((org-deadline-warning-days 7)))
(todo "WAITING" (todo "WAITING"
((org-agenda-overriding-header "Waiting on External"))) ((org-agenda-overriding-header "Waiting on External")))
(todo "TODO"
((org-agenda-overriding-header "Scheduled")
(org-agenda-skip-function '(org-agenda-skip-entry-if 'nottimestamp))))
(todo "TODO" (todo "TODO"
((org-agenda-overriding-header "Backlog") ((org-agenda-overriding-header "Backlog")
(org-agenda-todo-list-sublevels nil) (org-agenda-todo-list-sublevels nil)
(org-agenda-skip-function '(org-agenda-skip-entry-if 'timestamp)))))))) (org-agenda-skip-function '(org-agenda-skip-entry-if 'timestamp))))
(todo "TODO"
((org-agenda-overriding-header "Scheduled After This Week")
(org-agenda-skip-function
(lambda ()
(let* ((scheduled (org-get-scheduled-time (point)))
(end-of-week
(time-add (current-time)
(days-to-time
(- 7 (string-to-number (format-time-string "%u")))))))
(if (and scheduled
(time-less-p end-of-week scheduled))
nil
(org-end-of-subtree t)))))))
))))
(setq org-capture-templates (setq org-capture-templates
'(("t" "Todo" entry (file+headline "Todo.org" "Inbox") '(("t" "Todo" entry (file+headline "Todo.org" "Inbox")
"* TODO %?\n\n %a"))) "* TODO %?\n\n %a")))
@ -337,13 +362,13 @@ just in in the current buffer."
:defer t) :defer t)
(use-package notmuch (use-package notmuch
;; Use the notmuch package that is installed :straight t
:load-path "/usr/share/emacs/site-lisp"
:config :config
(setq notmuch-command "~/.local/bin/notmuch-remote")
(setq notmuch-saved-searches '((:name "inbox" (setq notmuch-saved-searches '((:name "inbox"
:key "i" :key "i"
:query "query:inbox" :query "query:inbox"
:sort-order oldest-first))) :sort-order oldest-first))))
(defun aa/notmuch-open-github-link () (defun aa/notmuch-open-github-link ()
"Open the first GitHub Pull Request or Issue link in the current notmuch message or thread. "Open the first GitHub Pull Request or Issue link in the current notmuch message or thread.
@ -380,7 +405,7 @@ Works in both `notmuch-show-mode` and `notmuch-search-mode`."
"b" 'aa/notmuch-open-github-link) "b" 'aa/notmuch-open-github-link)
(evil-define-key 'visual notmuch-search-mode-map (evil-define-key 'visual notmuch-search-mode-map
"d" 'aa/notmuch-search-delete) "d" 'aa/notmuch-search-delete
"b" 'aa/notmuch-open-github-link) "b" 'aa/notmuch-open-github-link)
(evil-define-key 'normal notmuch-show-mode-map (evil-define-key 'normal notmuch-show-mode-map

View file

@ -7,7 +7,7 @@
# The format of the prompt is: username@hostname:current_path # The format of the prompt is: username@hostname:current_path
def create_left_prompt [] { def create_left_prompt [] {
let username = $env.USER let username = $env.USER
let hostname = $env.HOSTNAME | str downcase let hostname = (sys host | get hostname) | str downcase # $env.HOSTNAME | str downcase
let formatted_path = $env.PWD let formatted_path = $env.PWD
| str replace $env.HOME '~' | str replace $env.HOME '~'