Add org format function

master
trémeur 3 years ago
parent 21f49b4738
commit 09ed893f1f

@ -1,4 +1,5 @@
(setq org-agenda-show-current-time-in-grid nil) (setq org-agenda-show-current-time-in-grid nil)
(setq org-extend-today-until 3)
(setq org-agenda-skip-scheduled-if-done t) (setq org-agenda-skip-scheduled-if-done t)
(setq org-agenda-skip-deadline-if-done t) (setq org-agenda-skip-deadline-if-done t)
(setq org-agenda-skip-timestamp-if-done t) (setq org-agenda-skip-timestamp-if-done t)

@ -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 "")))

@ -284,8 +284,6 @@
(setq org-startup-with-inline-images "inlineimages") (setq org-startup-with-inline-images "inlineimages")
(setq org-image-actual-width '(300)) (setq org-image-actual-width '(300))
(setq org-extend-today-until 3)
(load-file "~/.emacs.d/agenda-common.el") (load-file "~/.emacs.d/agenda-common.el")
;; for agenda things used in both emacs and batch ;; for agenda things used in both emacs and batch

Loading…
Cancel
Save