From d134922c7c5ff3ff9f86cb0c04100bdd5436c754 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 11:16:18 -0500 Subject: Add open-paragraph --- lisp/acdw.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lisp') diff --git a/lisp/acdw.el b/lisp/acdw.el index 969b6c8..cc73071 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -862,6 +862,23 @@ When called with PREFIX, just kill Emacs without confirmation." (let ((b (get-buffer (if (consp b) (car b) b)))) (member (buffer-local-value 'major-mode b) modes))))) (pop-to-buffer (read-buffer "Buffer: " nil t pred)))) + +;;; BLAH + +(defun open-paragraph () + "Open a paragraph after point. +A paragraph is defined as continguous non-empty lines of text +surrounded by empty lines, so opening a paragraph means to make +three blank lines, then place the point on the second one." + (interactive) + ;; Go to next blank line. This /isn't/ `end-of-paragraph-text' because + ;; that's weird with org, and I'm guessing other modes too. + (while (not (looking-at "^$")) + (forward-line 1)) + (newline) + (delete-blank-lines) + (newline 2) + (previous-line)) (provide 'acdw) ;;; acdw.el ends here -- cgit 1.4.1-21-gabe81 From 240990939285d1f52391c4dafdc6f0787bc6a056 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 11:16:32 -0500 Subject: Stub a function --- lisp/chd.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/chd.el b/lisp/chd.el index 697c134..f7b5dbb 100644 --- a/lisp/chd.el +++ b/lisp/chd.el @@ -40,10 +40,12 @@ (org-back-to-heading) (org-open-at-point))) +(defun chd/click-bits (date) + "Create a new Click Bits org file, or edit the one for DATE." + (error "not implemented")) + ;;; NOTES ;; org-protocol: https://orgmode.org/worg/org-contrib/org-protocol.html ;; the bit i wanna pull from TaskIQ: 'document.getElementById("preview") - - (provide 'chd) ;;; chd.el ends here -- cgit 1.4.1-21-gabe81 From c434a7623d27ce855449fec81a1a8a69fbccdd78 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 16:28:26 -0500 Subject: Add nyan-mode IĀ forked it to improve it! --- init.el | 10 ++++++++++ lisp/acdw-modeline.el | 7 +++++++ 2 files changed, 17 insertions(+) (limited to 'lisp') diff --git a/init.el b/init.el index 22c06f8..2347ac8 100644 --- a/init.el +++ b/init.el @@ -1822,6 +1822,15 @@ browser defined in `browse-url-secondary-browser-function'." (:option nov-text-width fill-column) (:file-match (rx ".epub" eos))) +(setup (:straight (nyan-mode + :host github :repo "TeMPOraL/nyan-mode" + :fork (:host github :repo "duckwork/nyan-mode") + :files ("nyan-mode.el" "img"))) + (:option nyan-animate-nyancat nil + nyan-bar-length 20 + nyan-minimum-window-width fill-column) + (nyan-mode +1)) + ;; (setup (:straight olivetti) ;; (:option olivetti-body-width (+ fill-column 4) ;; olivetti-minimum-body-width fill-column) @@ -2181,6 +2190,7 @@ the default is \"/\"." acdw-modeline/buffer-name acdw-modeline/vc-branch acdw-modeline/wc + acdw-modeline/nyan-cat acdw-modeline/position ) (;; right acdw-modeline/track diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 573a964..a9020c5 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -82,6 +82,13 @@ Otherwise, cdr should be a function that takes two points (see `count-words')." (minions-minor-modes-menu))))) 'mouse-face 'mode-line-highlight))) +(defun acdw-modeline/nyan-cat () + "Display the nyan cat from function `nyan-mode' in the mode-line." + (when (and (bound-and-true-p nyan-mode) + (eq (bound-and-true-p actually-selected-window) + (get-buffer-window))) + '(" " (:eval (list (nyan-create)))))) + (defun acdw-modeline/modified () ; modified from `simple-modeline' "Displays a color-coded buffer modification/read-only indicator in the mode-line." -- cgit 1.4.1-21-gabe81 From 8974c4e56c18ea42326de1971e325c0c95657f7e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 16:50:40 -0500 Subject: Ignore DEADLINE and SCHEDULED in acdw-org/count-words-stupidly --- lisp/acdw-org.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 8821b28..3358365 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el @@ -299,11 +299,15 @@ instead of the true count." ;; Ignore headings ((or (org-at-heading-p)) (forward-line)) - ;; Ignore drawers + ;; Ignore property and log drawers ((or (looking-at org-drawer-regexp) (looking-at org-clock-drawer-re)) (search-forward ":END:" nil :noerror) (forward-line)) + ;; Ignore DEADLINE and SCHEDULED keywords + ((or (looking-at org-deadline-regexp) + (looking-at org-scheduled-regexp)) + (forward-line)) ;; Ignore tables ((org-at-table-p) (forward-line)) ;; Ignore hyperlinks, but count the descriptions -- cgit 1.4.1-21-gabe81 From 526d713da1167adcf99350c954e923a98957e540 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 17:04:25 -0500 Subject: Add org-closed-time-regexp to skips when counting words --- lisp/acdw-org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 3358365..05e6409 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el @@ -306,7 +306,8 @@ instead of the true count." (forward-line)) ;; Ignore DEADLINE and SCHEDULED keywords ((or (looking-at org-deadline-regexp) - (looking-at org-scheduled-regexp)) + (looking-at org-scheduled-regexp) + (looking-at org-closed-time-regexp)) (forward-line)) ;; Ignore tables ((org-at-table-p) (forward-line)) -- cgit 1.4.1-21-gabe81 From 95e14142707a2122d6efa1dff70805a7e4c962fb Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 17:29:46 -0500 Subject: Stub a little further with chd/click-bits --- lisp/chd.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/chd.el b/lisp/chd.el index f7b5dbb..b301c8d 100644 --- a/lisp/chd.el +++ b/lisp/chd.el @@ -42,7 +42,11 @@ (defun chd/click-bits (date) "Create a new Click Bits org file, or edit the one for DATE." - (error "not implemented")) + (interactive (list (progn + (require 'org) + (org-read-date)))) + ;; TODO: implement actual logic. + (message "%s" date)) ;;; NOTES ;; org-protocol: https://orgmode.org/worg/org-contrib/org-protocol.html -- cgit 1.4.1-21-gabe81