1
0
Fork 0

Compare commits

..

No commits in common. "a91df5e4ae9acd4a7796cdf0c6dbd1912cd79646" and "3b26004f8bffea707487b0a332381b59362143d4" have entirely different histories.

4 changed files with 98 additions and 21 deletions

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2024.0202.103900
;; Version: 2024.0105.212344
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview mixed-pitch ace-window vertico marginalia orderless consult embark docstr mini-frame)
;; This program is free software; you can redistribute it and/or modify
@ -321,6 +321,7 @@ _s_: String list"
(with-eval-after-load 'sort (require 'oni-sort))
(with-eval-after-load 'tramp (require 'oni-tramp))
(with-eval-after-load 'web-mode (require 'oni-web))
(with-eval-after-load 'yaml-mode (require 'oni-yaml))
(with-eval-after-load 'yasnippet
(require 'oni-yasnippet)

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2024.0131.224609
;; Version: 2022.0318.110741
;; Package-Requires: (lsp-mode lsp-ui)
;; This program is free software; you can redistribute it and/or modify
@ -50,9 +50,6 @@
(setq lsp-signature-function 'lsp-signature-posframe)
(setq lsp-ui-doc-enable nil)
(setq lsp-ui-sideline-enable nil)
(setq lsp-enable-suggest-server-download nil)
(setq lsp-headerline-breadcrumb-enable nil)
(setq lsp-lens-enable nil)
(add-hook 'lsp-mode-hook 'lsp-lens-mode)

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2024.0201.163746
;; Version: 2023.1114.143023
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-bullets org-edna diminish all-the-icons olivetti form-feed org-pretty-table ob-async)
;; This program is free software; you can redistribute it and/or modify
@ -69,15 +69,11 @@
"The directory where oni-org stores its icons.")
(defconst oni-org-todo-dir
(expand-file-name "documents/exocortex-novus/tasks" (getenv "HOME"))
(expand-file-name "documents/gtd" (getenv "HOME"))
"The directory where all the TODO notes are stored.")
(defconst oni-org-todo-inbox-file
(expand-file-name "inbox.org" oni-org-todo-dir)
"The inbox file for any notes.")
(defconst oni-org-todo-main-file
(expand-file-name "todo.org" oni-org-todo-dir)
(expand-file-name "everything.org" oni-org-todo-dir)
"The main file for TODO notes.")
(defconst oni-org-todo-someday-file
@ -259,7 +255,7 @@ located at the start of the line."
(defun oni-org-open-index ()
"Open the index of my org-based personal wiki."
(interactive)
(find-file (oni-org-expand-to-home "documents/exocortex-novus/index.org")))
(find-file (oni-org-expand-to-home "documents/gtd/index.org")))
(defun oni-org-color-for (object)
"Generate a color for OBJECT by using its hash as a parameter for an LCh color."
@ -1049,7 +1045,7 @@ placed above TARGET. Otherwise it will be placed below it."
;;; Inbox management
(defun oni-org-should-dump-tickler-p ()
(with-current-buffer (find-file-noselect oni-org-todo-tickler-file)
(with-current-buffer (find-file-noselect "~/documents/gtd/tickler.org")
(goto-char (point-min))
(search-forward "#+last-dumped: ")
(let ((dumped-date (org-timestamp-to-time (org-timestamp-from-string (buffer-substring-no-properties (point) (line-end-position)))))
@ -1057,14 +1053,14 @@ placed above TARGET. Otherwise it will be placed below it."
(time-less-p dumped-date current-date))))
(defun oni-org-update-tickler-dumped-date ()
(with-current-buffer (find-file-noselect oni-org-todo-tickler-file)
(with-current-buffer (find-file-noselect "~/documents/gtd/tickler.org")
(goto-char (point-min))
(search-forward "#+last-dumped: ")
(delete-region (point) (line-end-position))
(insert (format-time-string "[%Y-%m-%d]"))))
(defun oni-org-dump-tickler-1 ()
(with-current-buffer (find-file-noselect oni-org-todo-tickler-file)
(with-current-buffer (find-file-noselect "~/documents/gtd/tickler.org")
(save-excursion
(goto-char (point-min))
(org-forward-heading-same-level 1)
@ -1080,7 +1076,7 @@ placed above TARGET. Otherwise it will be placed below it."
(org-mode)
(org-map-entries 'org-promote-subtree)
(setq text (buffer-substring-no-properties (point-min) (point-max))))
(with-current-buffer (find-file-noselect oni-org-todo-inbox-file)
(with-current-buffer (find-file-noselect "~/documents/gtd/inbox.org")
(save-excursion
(let ((max-point (point-max)))
(goto-char max-point)
@ -1107,7 +1103,7 @@ placed above TARGET. Otherwise it will be placed below it."
(oni-org-dump-tickler)
(catch 'done
(while t
(find-file oni-org-todo-inbox-file)
(find-file "~/documents/gtd/inbox.org")
(goto-char (point-min))
(org-forward-heading-same-level 1)
(when (not (org-at-heading-p))
@ -1136,7 +1132,7 @@ placed above TARGET. Otherwise it will be placed below it."
(throw 'continue t))
(?a (org-archive-subtree-default)
(throw 'continue t))
(?d (let ((org-refile-targets `((,oni-org-todo-tickler-file :maxlevel . 10))))
(?d (let ((org-refile-targets '(("~/documents/gtd/tickler.org" :maxlevel . 10))))
(org-refile))
(throw 'continue t))
(?t (org-todo))
@ -1228,6 +1224,86 @@ same code all the time."
(map-insert ,collection ,key-name ,value-name))
,value-name)))))
(oni-org--map-put org-agenda-custom-commands "o"
'("Overview" ((tags-todo "TODO=\"WAITING\""
((org-agenda-overriding-header (oni-org--center-align "Waiting"))))
(tags-todo "TODO=\"WIP\""
((org-agenda-overriding-header (oni-org--center-align "In Progress"))))
(agenda "" ((org-agenda-span 'day)))
(tags-todo "TODO=\"TODO\"+#todo"
((org-agenda-max-todos 10)
(org-agenda-overriding-header (oni-org--center-align "To Do"))))
(tags-todo "TODO=\"TODO\"+#reading"
((org-agenda-max-todos 5)
(org-agenda-overriding-header (oni-org--center-align "Read"))))
(tags-todo "TODO=\"TODO\"+#watching"
((org-agenda-max-todos 5)
(org-agenda-overriding-header (oni-org--center-align "Watch"))))
(tags-todo "TODO=\"TODO\"+#listening"
((org-agenda-max-todos 5)
(org-agenda-overriding-header (oni-org--center-align "Listen")))))))
(oni-org--map-put org-agenda-custom-commands "t"
'("To Do" ((tags-todo "TODO=\"WAITING\"+#todo"
((org-agenda-overriding-header (oni-org--center-align "Waiting To Do"))))
(tags-todo "TODO=\"WIP\"+#todo"
((org-agenda-overriding-header (oni-org--center-align "Doing"))))
(tags-todo "TODO=\"TODO\"+#todo"
((org-agenda-overriding-header (oni-org--center-align "To Do")))))))
(oni-org--map-put org-agenda-custom-commands "r"
'("Reading" ((tags-todo "TODO=\"WAITING\"+#reading"
((org-agenda-overriding-header (oni-org--center-align "Waiting To Read"))))
(tags-todo "TODO=\"WIP\"+#reading"
((org-agenda-overriding-header (oni-org--center-align "Reading"))))
(tags-todo "TODO=\"TODO\"+#reading"
((org-agenda-overriding-header (oni-org--center-align "To Read")))))))
(oni-org--map-put org-agenda-custom-commands "w"
'("Watching" ((tags-todo "TODO=\"WAITING\"+#watching"
((org-agenda-overriding-header (oni-org--center-align "Waiting To Watch"))))
(tags-todo "TODO=\"WIP\"+#watching"
((org-agenda-overriding-header (oni-org--center-align "Watching"))))
(tags-todo "TODO=\"TODO\"+#watching"
((org-agenda-overriding-header (oni-org--center-align "To Watch")))))))
(oni-org--map-put org-agenda-custom-commands "l"
'("Listening" ((tags-todo "TODO=\"WAITING\"+#listening"
((org-agenda-overriding-header (oni-org--center-align "Waiting To Listen To"))))
(tags-todo "TODO=\"WIP\"+#listening"
((org-agenda-overriding-header (oni-org--center-align "Listening"))))
(tags-todo "TODO=\"TODO\"+#listening"
((org-agenda-overriding-header (oni-org--center-align "To Listen To")))))))
(oni-org--map-put org-capture-templates "sE"
'("Questions for Emacs packages" plain (function ignore)
"- Do I want to integrate this in my configuration?
- %?
- What will it add / What advantage will it bring?
-
- How would I integrate it with my config?
- "
:empty-lines 1
:immediate-finish t
:jump-to-captured t))
(oni-org--map-put org-capture-templates-contexts "sE"
'(((in-mode . "org-mode"))))
(oni-org--map-put org-capture-templates "se"
'("Questions for Emacs articles" plain (function ignore)
"- What can I add to my config from this?
- %?"
:empty-lines 1
:immediate-finish t
:jump-to-captured t))
(oni-org--map-put org-capture-templates-contexts "se"
'(((in-mode . "org-mode"))))
(oni-org--map-put org-capture-templates "s"
'("Snippets"))
(oni-org--map-put org-capture-templates-contexts "s"
'(((in-mode . "org-mode"))))
(oni-org--map-put org-capture-templates "t"
'("A simple TODO item." entry (file "") "* TODO %?
:PROPERTIES:

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2024.0202.110614
;; Package-Requires: (yaml-mode oni-flycheck oni-highlight-indent-guides indent-tools yaml-imenu yaml-pro)
;; Version: 2022.0718.085034
;; Package-Requires: (yaml-mode oni-flycheck oni-highlight-indent-guides flycheck-yamllint indent-tools yaml-imenu yaml-pro)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@ -28,6 +28,7 @@
(require 'indent-tools)
(require 'yaml-imenu)
(require 'flycheck-yamllint)
(defun oni-yaml--auto-fill-mode ()
"Enable auto-fill-mode only for comments."
@ -44,5 +45,7 @@
(add-hook 'yaml-mode-hook 'yaml-imenu-enable)
(add-hook 'yaml-mode-hook 'yaml-pro-mode)
(flycheck-yamllint-setup)
(provide 'oni-yaml)
;;; oni-yaml.el ends here