summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-04-02 13:54:19 -0500
committerCase Duckworth2022-04-02 13:54:19 -0500
commit2e488c508f9c10bc17f3176925d4e85b0a79d836 (patch)
tree2239b4c74319d29cf879fa846a806a2d0b8636b9
parentChange notation of settings (diff)
downloademacs-2e488c508f9c10bc17f3176925d4e85b0a79d836.tar.gz
emacs-2e488c508f9c10bc17f3176925d4e85b0a79d836.zip
Add +org-unsmartify
-rw-r--r--lisp/+org.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/+org.el b/lisp/+org.el index 3d14c52..2a57fe2 100644 --- a/lisp/+org.el +++ b/lisp/+org.el
@@ -568,5 +568,19 @@ and POST-PROCESS are passed to `org-export-to-file'."
568 (interactive) 568 (interactive)
569 (+org-export-clip-to-html nil :subtree)) 569 (+org-export-clip-to-html nil :subtree))
570 570
571;;; Unsmartify quotes and dashes and stuff.
572(defun +org-unsmartify ()
573 "Replace \"smart\" punctuation with their \"dumb\" counterparts."
574 (interactive)
575 (save-excursion
576 (goto-char (point-min))
577 (while (re-search-forward "[“”‘’–—]" nil t)
578 (let ((replace (pcase (match-string 0)
579 ((or "“" "”") "\"")
580 ((or "‘" "’") "'")
581 ("–" "--")
582 ("—" "---"))))
583 (replace-match replace nil nil)))))
584
571(provide '+org) 585(provide '+org)
572;;; +org.el ends here 586;;; +org.el ends here