aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-05-18 10:18:58 -0700
committerGravatar Tom Willemse2026-05-22 06:38:28 -0700
commita6b921b8e0bdec78444a31f8fac2b2dabc80e964 (patch)
tree63e896c40d5cbd0361b24eacb656c55b0eae83e2
parent57c4bf1e4e271eb8be8716c5e543f07fed6856db (diff)
downloademacs-config-a6b921b8e0bdec78444a31f8fac2b2dabc80e964.tar.gz
emacs-config-a6b921b8e0bdec78444a31f8fac2b2dabc80e964.zip
oni-org: Remove special characters from note page name
-rw-r--r--oni-org/oni-org.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el
index 444a508..0acc218 100644
--- a/oni-org/oni-org.el
+++ b/oni-org/oni-org.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2026.0324.011543
+;; Version: 2026.0327.005146
;; Package-Requires: (oni-yasnippet oni-hydra org org-edna diminish olivetti org-pretty-table)
;; This program is free software; you can redistribute it and/or modify
@@ -1044,7 +1044,12 @@ CLOSED: %(setq oni-org--capture-D-date (format-time-string (org-time-stamp-forma
(let ((title (read-string "Title: ")))
(find-file (expand-file-name (format "reference/%s-%s.org"
(format-time-string "%Y%m%d%H%M%S")
- (replace-regexp-in-string (rx whitespace) "-" (downcase title)))
+ (replace-regexp-in-string
+ (rx whitespace) "-"
+ (replace-regexp-in-string
+ (rx (not (any whitespace alnum)))
+ ""
+ (downcase title))))
oni-org-todo-dir))
(setq-local oni-org--capture-page-title title)))