Add org format function

This commit is contained in:
trémeur 2022-07-02 21:15:51 +01:00
parent 21f49b4738
commit 09ed893f1f
3 changed files with 18 additions and 2 deletions

17
custom/org-format.el Normal file
View file

@ -0,0 +1,17 @@
(defun org-format ()
(interactive)
(goto-char (region-beginning))
(while (re-search-forward " -" nil t)
(replace-match " "))
(goto-char (region-beginning))
(while (re-search-forward "'" nil t)
(replace-match ""))
(goto-char (region-beginning))
(while (re-search-forward "\\R\"" nil t)
(replace-match "\\R“"))
(goto-char (region-beginning))
(while (re-search-forward " \"" nil t)
(replace-match ""))
(goto-char (region-beginning))
(while (re-search-forward "\"" nil t)
(replace-match "")))