Skip to content

Instantly share code, notes, and snippets.

View davemq's full-sized avatar

Dave Marquardt davemq

View GitHub Profile
@davemq
davemq / scatter-deadline.el
Created October 8, 2024 21:02
Org agenda bulk deadline scatter
;; org agenda bulk action for random scatter for deadlines
(defun drm:org-agenda-deadline ()
(unless (org-agenda-check-type nil 'agenda 'todo)
(user-error "Can't scatter tasks in \"%s\" agenda view" org-agenda-type))
(let ((days (read-number "Scatter tasks across how many days: " 7)))
(let ((distance (1+ (random days))))
;; Silently fail when try to replan a sexp entry.
(ignore-errors
(let* ((date (calendar-gregorian-from-absolute
(+ (org-today) distance)))
ItemPrice
A19
B23
C34
D1
Subtotal77
Tax 5%3.85