Skip to content

Instantly share code, notes, and snippets.

View ashton314's full-sized avatar
πŸ‘¨β€πŸ’»
Expanding ((Ξ» (x) (x x)) (Ξ» (y) (y y)))

Ashton Wiersdorf ashton314

πŸ‘¨β€πŸ’»
Expanding ((Ξ» (x) (x x)) (Ξ» (y) (y y)))
View GitHub Profile
@ashton314
ashton314 / nm-org-roam-to-denote.el
Created July 23, 2024 17:54
Modified version of org-roam-to-denote migration script
;;; nm-org-roam-to-denote.el --- Migrate notes from org-roam to denote
;; Copyright (C) 2022 bitspook <[email protected]>
;; Author: bitspook
;; Version: 0.1.0
;; URL: https://github.com/bitspook/notes-migrator
;; Package-Requires: ((emacs "28.1") (denote "1.0.0")
;;; Commentary:
@ashton314
ashton314 / denote-frontmatter-formatter.el
Created July 23, 2024 17:55
Normalize org frontmatter with Denote
(defun aw/denote-normalize-org-frontmatter ()
"Normalize the front-matter in an org-mode file."
(interactive)
(when-let* ((file (buffer-file-name))
(denote-filename-is-note-p file)
(type (denote-filetype-heuristics file))
(title (denote-retrieve-title-value file type))
(id (denote-retrieve-filename-identifier file)))
(let ((kwds (denote-retrieve-keywords-value file type)))
(delete-matching-lines "^#\\+title:.*$" (point-min) (point-max))
#lang racket
;; f(x) = x + 1
(define (f x) (+ x 1))
;; g(x) = x*x + 1
(define (g x) (+ (* x x) 1))
(define (respond secret guess)
(if (= secret guess)
@ashton314
ashton314 / denote-transient.el
Created June 3, 2025 16:49
My configuration for Denote with transient
(transient-define-prefix denote-transient ()
"Denote dispatch"
[["Note creation (d)"
("dd" "new note" denote)
("dj" "new or existing journal entry" denote-journal-new-or-existing-entry)
("dn" "open or new" denote-open-or-create)
("dt" "new specifying date and time" denote-date)
("ds" "create in subdirectory " denote-subdirectory)]
["Reviewing (r)"
("rd" "notes this day" aw/notes-this-day)]
@ashton314
ashton314 / gptel_config.el
Created July 23, 2025 21:41
My gptel config
(use-package gptel
:bind (("M-s-g" . gptel-menu))
:config
(setopt gptel-default-mode 'org-mode)
(setopt gptel-confirm-tool-calls t)
(add-to-list 'display-buffer-alist
'("^\\*\\(Claude\\|ChatGPT\\)"
(display-buffer-same-window)))
;; β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”