From d9e602e4128a8aaae39ba81296f7042bc2545053 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 13 Oct 2021 17:58:04 -0500 Subject: I told myself I'd have useful commit messages today Apparently I lied. --- lisp/acdw-circe.el | 12 ++++++++++++ lisp/acdw-modeline.el | 14 ++++++++++---- lisp/acdw.el | 3 +-- lisp/chd.el | 8 ++++++++ 4 files changed, 31 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/acdw-circe.el b/lisp/acdw-circe.el index ec15f8e..958ef38 100644 --- a/lisp/acdw-circe.el +++ b/lisp/acdw-circe.el @@ -90,5 +90,17 @@ message the current topic." (message "%s: %s" buf circe-server-killed-confirmation) (kill-buffer))))) +;;; Dumb modes + +(define-minor-mode circe-cappy-hour-mode + "ENABLE CAPPY HOUR IN CIRCE!" + :lighter "CAPPY HOUR" + (when (derived-mode-p 'circe-chat-mode) + (if circe-cappy-hour-mode + (setq-local lui-input-function + (lambda (input) (circe--input (upcase input)))) + ;; XXX: It'd be better if this were more general, but whatever. + (setq-local lui-input-function #'circe--input)))) + (provide 'acdw-circe) ;;; acdw-circe.el ends here diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index d9b1c8b..0dc23ff 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el @@ -87,10 +87,16 @@ Otherwise, cdr should be a function that takes two points (see `count-words')." (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)))))) + (when (bound-and-true-p nyan-mode) + (if (eq (bound-and-true-p actually-selected-window) + (get-buffer-window)) + '(" " (:eval (list (nyan-create)))) + `(:propertize " " + display + (space ;; pixel perfect babeeeee + . (:width (,(+ 9 (* 8 (or + (bound-and-true-p nyan-bar-length) + 20)))))))))) (defun acdw-modeline/modified () ; modified from `simple-modeline' "Displays a color-coded buffer modification/read-only diff --git a/lisp/acdw.el b/lisp/acdw.el index df2962a..48ed19b 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -510,8 +510,7 @@ first." (insert extracted-heading) (newline 2) - (replace-regexp org-list-full-item-re " -\4") + (replace-regexp org-list-full-item-re "\n\4") (let ((sentence-end-double-space nil)) (unfill-region (point-min) (point-max))) diff --git a/lisp/chd.el b/lisp/chd.el index b301c8d..e1d96cb 100644 --- a/lisp/chd.el +++ b/lisp/chd.el @@ -48,6 +48,14 @@ ;; TODO: implement actual logic. (message "%s" date)) +(defun chd/insert-client () + "Insert the current client at point." + (interactive) + (if-let ((client (org-entry-get nil "CLIENT" :inherit))) + (insert client) + (beep) + (user-error "No client found in current subtree"))) + ;;; NOTES ;; org-protocol: https://orgmode.org/worg/org-contrib/org-protocol.html ;; the bit i wanna pull from TaskIQ: 'document.getElementById("preview") -- cgit 1.4.1-21-gabe81