From 0d311d36b9d5f430324d919ac097f2364588a432 Mon Sep 17 00:00:00 2001
From: Case Duckworth
Date: Wed, 20 Oct 2021 17:31:13 -0500
Subject: blayfduoisaudfoiasdupjfoiu
---
lisp/acdw-circe.el | 10 ++++------
lisp/acdw.el | 14 ++++++++------
lisp/chd.el | 29 +++++++++++++++++++++--------
3 files changed, 33 insertions(+), 20 deletions(-)
(limited to 'lisp')
diff --git a/lisp/acdw-circe.el b/lisp/acdw-circe.el
index 4ff3fdf..73b1cdf 100644
--- a/lisp/acdw-circe.el
+++ b/lisp/acdw-circe.el
@@ -98,8 +98,8 @@ message the current topic."
(with-circe-server-buffer
(dolist (buf (circe-server-chat-buffers))
(let ((circe-channel-killed-confirmation nil))
- (kill-buffer buf)))
- (kill-buffer))))
+ (run-with-timer 0.1 nil #'kill-buffer buf)))
+ (run-with-timer 0.1 nil #'kill-buffer))))
(defun circe-gquit@kill-buffer (&rest _)
"Advice to kill all Circe related buffers after GQUIT."
@@ -111,10 +111,8 @@ message the current topic."
(with-current-buffer buf
(dolist (buf (circe-server-chat-buffers))
(let ((circe-channel-killed-confirmation nil))
- (kill-buffer buf))
- (cancel-timer 'irc-send--queue))
- (message "%s: %s" buf circe-server-killed-confirmation)
- (kill-buffer)))))
+ (run-with-timer 0.1 nil #'kill-buffer buf)))
+ (run-with-timer 0.1 nil #'kill-buffer)))))
;;; Patches
diff --git a/lisp/acdw.el b/lisp/acdw.el
index 48ed19b..56b661f 100644
--- a/lisp/acdw.el
+++ b/lisp/acdw.el
@@ -474,12 +474,12 @@ first."
(let ((extracted-heading (acdw/org-extract-heading-text))
(org-export-show-temporary-export-buffer nil)
(org-export-filter-final-output-functions
- '(html-body-id-filter html-body-div-filter))
- (org-export-with-smart-quotes nil)
- (org-export-smart-quotes-alist nil))
+ '(html-body-id-filter html-body-div-filter)))
(insert "* ORG IS STUPID SOMETIMES\n")
(goto-char (point-min))
- (org-html-export-as-html nil t nil t)
+ (org-html-export-as-html nil t nil t
+ (list :with-smart-quotes nil
+ :with-special-strings t))
(with-current-buffer "*Org HTML Export*"
(goto-char (point-min))
(replace-regexp "
.*
" "")
@@ -498,13 +498,15 @@ first."
nil)
(defun acdw/org-export-copy ()
- "copy a tree"
+ "Copy a tree as ASCII."
(interactive)
(require 'ox-ascii)
(let ((extracted-heading (acdw/org-extract-heading-text)))
;; Export to ASCII - not async, subtree only, visible-only, body-only
(let ((org-export-show-temporary-export-buffer nil))
- (org-ascii-export-as-ascii nil t nil t))
+ (org-ascii-export-as-ascii nil t nil t
+ (list :with-smart-quotes t
+ :with-special-strings t)))
(with-current-buffer "*Org ASCII Export*"
(goto-char (point-min))
(insert extracted-heading)
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 @@
(require 'acdw-org)
(require 'org)
+(defvar chd/dir (acdw/sync-dir "Click Here Digital/")
+ "Where Click Here stuff is stored.")
+
+(defun chd/dir (file &optional make-directory)
+ "Expand FILE relative to variable `chd/dir'.
+If MAKE-DIRECTORY is non-nil, ensure the file's
+containing directory exists."
+ (let ((file-name (expand-file-name (convert-standard-filename file)
+ chd/dir)))
+ (when make-directory
+ (make-directory (file-name-directory file-name) :parents))
+ file-name))
+
(defun chd/narrow-to-task (&optional point)
"Narrow the buffer to the task POINT is in."
(interactive "d")
@@ -40,14 +53,6 @@
(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."
- (interactive (list (progn
- (require 'org)
- (org-read-date))))
- ;; TODO: implement actual logic.
- (message "%s" date))
-
(defun chd/insert-client ()
"Insert the current client at point."
(interactive)
@@ -56,6 +61,14 @@
(beep)
(user-error "No client found in current subtree")))
+;;; Click Bits!
+(require 'acdw-autoinsert)
+(require 'acdw)
+(require 'private (acdw/sync-dir "private"))
+(acdw/define-auto-insert '(:replace t)
+ (cons (chd/dir "Click Bits" t) "Click Bits!")
+ chd/click-bits-skeleton)
+
;;; 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