diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-30 16:15:46 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-30 16:15:46 -0500 |
| commit | 48e7d5db9bb8d94256fd1f5d9b8a796364d5a0d1 (patch) | |
| tree | dc0cd4483fffb98747735bd2b8ddfda2ad7596d0 /modules | |
| parent | 8cde74f43b0985f1f6c3b0f2004eee239bf72440 (diff) | |
| download | dotemacs-48e7d5db9bb8d94256fd1f5d9b8a796364d5a0d1.tar.gz dotemacs-48e7d5db9bb8d94256fd1f5d9b8a796364d5a0d1.zip | |
removing disabled test code
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/test-code.el | 147 |
1 files changed, 50 insertions, 97 deletions
diff --git a/modules/test-code.el b/modules/test-code.el index e718094a..57046c18 100644 --- a/modules/test-code.el +++ b/modules/test-code.el @@ -2,80 +2,17 @@ ;; author: Craig Jennings <c@cjennings.net> ;;; Commentary: -;; This is where you should put config code you want to test. -;; I recommend calling this file from the end of your init.el -;; if something breaks, you have most of your Emacs config loaded. -;;; Code: +;; This is where to put config code you're working on before it's tested and stable. +;; Include this at the very end of your init.el. This way, if something does break, +;; and it will, most of your Emacs config is loaded. -;; ------------------------ Org-Branch To Org-Roam-Node ------------------------ +;; Once you've tested (and time-tested) the code here, graduate it into the proper +;; section of your config above. -;; (defun cj/move-org-branch-to-roam () -;; (interactive) -;; (when (eq (org-element-type (org-element-at-point)) 'headline) -;; (let* ((headline-components (org-heading-components)) -;; (title (nth 4 headline-components))) -;; (setq cj/point (point)) -;; (org-cut-subtree) -;; ;; Switch to org-roam buffer, fill in new node's title -;; ;; Pass the current headline title as the default value -;; (org-roam-node-insert -;; :immediate-finish t -;; :no-edit t -;; :region (cons (point) -;; (save-excursion -;; (insert title) -;; (point)))) -;; (newline) -;; ;; Paste the 'cut' subtree and save buffer -;; (org-yank) -;; (save-buffer) -;; ;; Go back to the initial buffer and position -;; (switch-to-buffer (other-buffer)) -;; (goto-char cj/point)))) +;;; Code: -(defun cj/move-org-branch-to-roam () - (interactive) - (when (eq (org-element-type (org-element-at-point)) 'headline) - (let* ((headline-components (org-heading-components)) - (title (nth 4 headline-components))) - (setq cj/point (point)) - (org-cut-subtree) - ;; Switch to org-roam buffer, fill in new node's title. - (org-roam-node-insert - :immediate-finish t - :no-edit t - ;; Pass the current headline title as the default value. - :region (cons (point) - (save-excursion - (insert title) - (point)))) - (newline) - ;; Paste the 'cut' subtree and save buffer. - (org-yank) - (save-buffer) - ;; Go back to the initial buffer and position. - (switch-to-buffer (other-buffer)) - (goto-char cj/point) - ;; Kill the org-roam link leftover. - (kill-whole-line)))) - -;; (defun cj/move-org-branch-to-roam () -;; (interactive) -;; (when (eq (org-element-type (org-element-at-point)) 'headline) -;; ;; Save position to come back after branch cut -;; (setq cj/point (point)) -;; ;; Cut the whole subtree -;; (org-cut-subtree) -;; ;; Switch to org-roam buffer, prompt for new node's title -;; (org-roam-node-insert) -;; (newline) -;; ;; Paste the 'cut' subtree and save buffer -;; (org-yank) -;; (save-buffer) -;; ;; Go back to the initial buffer and position -;; (switch-to-buffer (other-buffer)) -;; (goto-char cj/point))) +(require 'user-constants) ;; --------------------------------- Org Noter --------------------------------- @@ -93,26 +30,10 @@ (setq org-noter-separate-notes-from-heading t) (org-noter-enable-org-roam-integration)) - (use-package org-pdftools :after (org pdf-view) :hook (org-mode . org-pdftools-setup-link)) -;; ------------------------------------ Pomm ----------------------------------- - -(use-package pomm - :defer .5 - :bind ("M-p" . pomm) - :commands (pomm pomm-third-time)) - -;; ----------------------------------- Mpdel ----------------------------------- - -;; (use-package mpdel -;; :defer .5 -;; :config -;; (setq mpdel-prefix-key (kbd "M-p")) -;; (mpdel-mode)) - ;; --------------------------------- Easy Hugo --------------------------------- (use-package easy-hugo @@ -130,6 +51,49 @@ :config (easy-hugo-enable-menu)) +;; ------------------------------------ Pomm ----------------------------------- + +(use-package pomm + :defer .5 + :bind ("M-p" . pomm) + :commands (pomm pomm-third-time)) + +;; ------------------------ Org-Branch To Org-Roam-Node ------------------------ + +(defun cj/move-org-branch-to-roam () + (interactive) + (when (eq (org-element-type (org-element-at-point)) 'headline) + (let* ((headline-components (org-heading-components)) + (title (nth 4 headline-components))) + (setq cj/point (point)) + (org-cut-subtree) + ;; Switch to org-roam buffer, fill in new node's title. + (org-roam-node-insert + :immediate-finish t + :no-edit t + ;; Pass the current headline title as the default value. + :region (cons (point) + (save-excursion + (insert title) + (point)))) + (newline) + ;; Paste the 'cut' subtree and save buffer. + (org-yank) + (save-buffer) + ;; Go back to the initial buffer and position. + (switch-to-buffer (other-buffer)) + (goto-char cj/point) + ;; Kill the org-roam link leftover. + (kill-whole-line)))) + +;; ----------------------------------- Mpdel ----------------------------------- + +;; (use-package mpdel +;; :defer .5 +;; :config +;; (setq mpdel-prefix-key (kbd "M-p")) +;; (mpdel-mode)) + ;; -------------------------------- Google This -------------------------------- ;; not working as-is @@ -142,17 +106,6 @@ ;; (google-this-mode 1) ;; (setq google-this-browse-url-function 'eww-browse-url)) -;; --------------------------------- Ob-Racket --------------------------------- - -;; (use-package ob-racket -;; :load-path "~/code/ob-racket" -;; :defer .5 -;; :after racket-mode -;; :commands (org-babel-execute:racket) -;; :quelpa (ob-racket -;; :fetcher github -;; :repo "hasu/emacs-ob-racket" -;; :files ("*.el" "*.rkt"))) (provide 'test-code) ;;; test-code.el ends here. |
