diff options
Diffstat (limited to 'lisp/chd.el')
-rw-r--r-- | lisp/chd.el | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/lisp/chd.el b/lisp/chd.el index e1d96cb..c6efad0 100644 --- a/lisp/chd.el +++ b/lisp/chd.el | |||
@@ -3,6 +3,19 @@ | |||
3 | (require 'acdw-org) | 3 | (require 'acdw-org) |
4 | (require 'org) | 4 | (require 'org) |
5 | 5 | ||
6 | (defvar chd/dir (acdw/sync-dir "Click Here Digital/") | ||
7 | "Where Click Here stuff is stored.") | ||
8 | |||
9 | (defun chd/dir (file &optional make-directory) | ||
10 | "Expand FILE relative to variable `chd/dir'. | ||
11 | If MAKE-DIRECTORY is non-nil, ensure the file's | ||
12 | containing directory exists." | ||
13 | (let ((file-name (expand-file-name (convert-standard-filename file) | ||
14 | chd/dir))) | ||
15 | (when make-directory | ||
16 | (make-directory (file-name-directory file-name) :parents)) | ||
17 | file-name)) | ||
18 | |||
6 | (defun chd/narrow-to-task (&optional point) | 19 | (defun chd/narrow-to-task (&optional point) |
7 | "Narrow the buffer to the task POINT is in." | 20 | "Narrow the buffer to the task POINT is in." |
8 | (interactive "d") | 21 | (interactive "d") |
@@ -40,14 +53,6 @@ | |||
40 | (org-back-to-heading) | 53 | (org-back-to-heading) |
41 | (org-open-at-point))) | 54 | (org-open-at-point))) |
42 | 55 | ||
43 | (defun chd/click-bits (date) | ||
44 | "Create a new Click Bits org file, or edit the one for DATE." | ||
45 | (interactive (list (progn | ||
46 | (require 'org) | ||
47 | (org-read-date)))) | ||
48 | ;; TODO: implement actual logic. | ||
49 | (message "%s" date)) | ||
50 | |||
51 | (defun chd/insert-client () | 56 | (defun chd/insert-client () |
52 | "Insert the current client at point." | 57 | "Insert the current client at point." |
53 | (interactive) | 58 | (interactive) |
@@ -56,6 +61,14 @@ | |||
56 | (beep) | 61 | (beep) |
57 | (user-error "No client found in current subtree"))) | 62 | (user-error "No client found in current subtree"))) |
58 | 63 | ||
64 | ;;; Click Bits! | ||
65 | (require 'acdw-autoinsert) | ||
66 | (require 'acdw) | ||
67 | (require 'private (acdw/sync-dir "private")) | ||
68 | (acdw/define-auto-insert '(:replace t) | ||
69 | (cons (chd/dir "Click Bits" t) "Click Bits!") | ||
70 | chd/click-bits-skeleton) | ||
71 | |||
59 | ;;; NOTES | 72 | ;;; NOTES |
60 | ;; org-protocol: https://orgmode.org/worg/org-contrib/org-protocol.html | 73 | ;; org-protocol: https://orgmode.org/worg/org-contrib/org-protocol.html |
61 | ;; the bit i wanna pull from TaskIQ: 'document.getElementById("preview") | 74 | ;; the bit i wanna pull from TaskIQ: 'document.getElementById("preview") |