Compare commits
No commits in common. "3a3460b0d7283a45c54330f589c52e4c441423e4" and "fb767b39948483fceb8fe83698933f13f79f1a93" have entirely different histories.
3a3460b0d7
...
fb767b3994
3 changed files with 18 additions and 46 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0227.150230
|
;; Version: 2023.0112.144039
|
||||||
;; 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)
|
;; 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)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -423,13 +423,13 @@ _s_: String list"
|
||||||
(defvar oni-core-related-places-source
|
(defvar oni-core-related-places-source
|
||||||
'(:name "Related File"
|
'(:name "Related File"
|
||||||
:category file
|
:category file
|
||||||
:items oni-core-related-files
|
:items oni-related-files
|
||||||
:enabled buffer-file-name
|
:enabled buffer-file-name
|
||||||
:action find-file))
|
:action find-file))
|
||||||
|
|
||||||
(with-eval-after-load 'consult
|
(with-eval-after-load 'consult
|
||||||
(with-eval-after-load 'related-files
|
(with-eval-after-load 'related-files
|
||||||
(add-to-list 'consult-buffer-sources 'oni-core-related-places-source)))
|
(add-to-list 'consult-buffer-sources 'oni-related-places-source)))
|
||||||
|
|
||||||
;;; Embark
|
;;; Embark
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0325.115622
|
;; Version: 2022.1122.231427
|
||||||
;; Package-Requires: (oni-org org-roam)
|
;; Package-Requires: (oni-org org-roam)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -66,27 +66,6 @@
|
||||||
(and (not (null state))
|
(and (not (null state))
|
||||||
(not (string= state "FINISHED")))))
|
(not (string= state "FINISHED")))))
|
||||||
|
|
||||||
(defun oni-org-roam--books-to-read ()
|
|
||||||
(seq-filter (lambda (item)
|
|
||||||
(string= (map-elt (car item) "STATUS") "toread"))
|
|
||||||
(org-roam-db-query [:select [nodes:properties nodes:file nodes:title]
|
|
||||||
:from nodes
|
|
||||||
:left-join tags
|
|
||||||
:on (= tags:node-id nodes:id)
|
|
||||||
:where (like tag (quote "%\"book\"%"))])))
|
|
||||||
|
|
||||||
(defun oni-org-roam-list-books-to-read ()
|
|
||||||
(interactive)
|
|
||||||
(let ((buffer (get-buffer-create "*books-to-read*")))
|
|
||||||
(with-current-buffer buffer
|
|
||||||
(erase-buffer)
|
|
||||||
(mapc (lambda (item) (insert (caddr item) "\n")) (oni-org-roam--books-to-read)))
|
|
||||||
(switch-to-buffer buffer)))
|
|
||||||
|
|
||||||
(defun oni-org-roam-random-book-to-read ()
|
|
||||||
(interactive)
|
|
||||||
(find-file (cadr (seq-random-elt (oni-org-roam--books-to-read)))))
|
|
||||||
|
|
||||||
(add-to-list 'display-buffer-alist
|
(add-to-list 'display-buffer-alist
|
||||||
`(,(rx string-start "*org-roam*" string-end)
|
`(,(rx string-start "*org-roam*" string-end)
|
||||||
display-buffer-in-side-window
|
display-buffer-in-side-window
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0325.213834
|
;; Version: 2023.0314.013950
|
||||||
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti form-feed)
|
;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org org-contrib org-bullets org-edna diminish all-the-icons olivetti form-feed)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -777,11 +777,6 @@ After running it once remove it from `org-capture-after-finalize-hook'."
|
||||||
|
|
||||||
;;; Refile
|
;;; Refile
|
||||||
|
|
||||||
(defun oni-org-refile-to-top ()
|
|
||||||
(interactive)
|
|
||||||
(let ((org-reverse-note-order t))
|
|
||||||
(org-refile)))
|
|
||||||
|
|
||||||
;; Set it up so that I can refile easily and still create new nodes when I
|
;; Set it up so that I can refile easily and still create new nodes when I
|
||||||
;; refile. Include the file in the outline path so that I can refile into them
|
;; refile. Include the file in the outline path so that I can refile into them
|
||||||
;; and create top-level headings.
|
;; and create top-level headings.
|
||||||
|
@ -796,8 +791,6 @@ After running it once remove it from `org-capture-after-finalize-hook'."
|
||||||
(oni-org-todo-main-file . (:maxlevel . 10))
|
(oni-org-todo-main-file . (:maxlevel . 10))
|
||||||
(oni-org-todo-someday-file . (:maxlevel . 1))))
|
(oni-org-todo-someday-file . (:maxlevel . 1))))
|
||||||
|
|
||||||
(define-key org-mode-map (kbd "C-c C-S-w") #'oni-org-refile-to-top 'remove)
|
|
||||||
|
|
||||||
;;; Export
|
;;; Export
|
||||||
(require 'ox-html)
|
(require 'ox-html)
|
||||||
(require 'nxml-mode)
|
(require 'nxml-mode)
|
||||||
|
@ -978,19 +971,19 @@ placed above TARGET. Otherwise it will be placed below it."
|
||||||
(string-trim-right
|
(string-trim-right
|
||||||
(apply #'concat "| | Task | Effort |\n"
|
(apply #'concat "| | Task | Effort |\n"
|
||||||
"|-+------+--------|\n"
|
"|-+------+--------|\n"
|
||||||
"| | <60> | |\n"
|
|
||||||
(mapcar (lambda (itm)
|
(mapcar (lambda (itm)
|
||||||
(let ((emphasis (if (alist-get 'done itm) "+" ""))
|
(let ((emphasis (if (alist-get 'done itm) "+" ""))
|
||||||
(title (alist-get 'title itm)))
|
(title (alist-get 'title itm)))
|
||||||
(format "| | %s[[id:%s][%s]]%s | %s |\n"
|
(format "| | %s[[id:%s][%s]]%s | %s |\n"
|
||||||
emphasis
|
emphasis
|
||||||
(alist-get 'id itm)
|
(alist-get 'id itm)
|
||||||
title
|
(if (> (length title) 60)
|
||||||
|
(format "%s..." (substring title 0 57))
|
||||||
|
title)
|
||||||
emphasis
|
emphasis
|
||||||
(make-string (alist-get 'poms itm) ?X))))
|
(make-string (alist-get 'poms itm) ?X))))
|
||||||
info))))
|
info))))
|
||||||
(org-table-align)
|
(org-table-align)))
|
||||||
(org-table-shrink)))
|
|
||||||
|
|
||||||
(defun oni-org-insert-pomodoro-overview ()
|
(defun oni-org-insert-pomodoro-overview ()
|
||||||
"Create a dynamic block showing the Pomodoro overview for today."
|
"Create a dynamic block showing the Pomodoro overview for today."
|
||||||
|
@ -1028,7 +1021,7 @@ placed above TARGET. Otherwise it will be placed below it."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char entry-beginning)
|
(goto-char entry-beginning)
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(when (re-search-forward org-logbook-drawer-re entry-end nil)
|
(re-search-forward org-logbook-drawer-re entry-end)
|
||||||
(let ((logbook-beginning (match-beginning 0))
|
(let ((logbook-beginning (match-beginning 0))
|
||||||
(logbook-end (match-end 0)))
|
(logbook-end (match-end 0)))
|
||||||
(goto-char logbook-beginning)
|
(goto-char logbook-beginning)
|
||||||
|
@ -1036,7 +1029,7 @@ placed above TARGET. Otherwise it will be placed below it."
|
||||||
(rx "Finished a pomodoro on "
|
(rx "Finished a pomodoro on "
|
||||||
(group "[" (one-or-more (not "]")) "]"))
|
(group "[" (one-or-more (not "]")) "]"))
|
||||||
logbook-end t)
|
logbook-end t)
|
||||||
(push (org-parse-time-string (match-string 1)) results))))))
|
(push (org-parse-time-string (match-string 1)) results)))))
|
||||||
results))
|
results))
|
||||||
|
|
||||||
(defun oni-org-pomodoro-times-for-date (date)
|
(defun oni-org-pomodoro-times-for-date (date)
|
||||||
|
|
Loading…
Reference in a new issue