diff options
author | Case Duckworth | 2022-04-02 13:54:19 -0500 |
---|---|---|
committer | Case Duckworth | 2022-04-02 13:54:19 -0500 |
commit | 2e488c508f9c10bc17f3176925d4e85b0a79d836 (patch) | |
tree | 2239b4c74319d29cf879fa846a806a2d0b8636b9 /lisp | |
parent | Change notation of settings (diff) | |
download | emacs-2e488c508f9c10bc17f3176925d4e85b0a79d836.tar.gz emacs-2e488c508f9c10bc17f3176925d4e85b0a79d836.zip |
Add +org-unsmartify
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/+org.el | 14 |
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 |