Org-format and agenda improvements

This commit is contained in:
trémeur 2022-12-12 19:12:15 +00:00
parent 703101c4bd
commit 37897c4872
5 changed files with 130 additions and 58 deletions

View file

@ -4,9 +4,21 @@
(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 " \\.\\.\\." nil t)
(replace-match ""))
(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 " \n" nil t)
(replace-match "\n"))
(goto-char (region-beginning))
(while (re-search-forward "\n\"" nil t)
(replace-match "\n"))
(goto-char (region-beginning))

12
custom/workday.el Normal file
View file

@ -0,0 +1,12 @@
(setq daysoff '("2022-12-23" "2022-12-24" "2022-12-25" "2022-12-26" "2022-12-27" "2022-12-28" "2022-12-29" "2022-12-30" "2022-12-31" "2023-01-01" "2023-01-02" "2023-01-03" "2023-03-17" "2023-04-07" "2023-04-14" "2023-05-01" "2023-07-12" "2023-07-13" "2023-12-22" "2023-12-23" "2023-12-24" "2023-12-25" "2023-12-26" "2023-12-27" "2023-12-28" "2023-12-29" "2023-12-30" "2023-12-31" "2023-01-01" "2023-01-02" "2024-03-18" "2024-03-29" "2024-03-30" "2024-03-31" "2024-04-01" "2024-04-02" "2024-04-03" "2024-04-04" "2024-04-05" "2024-05-06" "2024-07-12" "2024-07-15" "2024-12-23" "2024-12-24" "2024-12-25" "2024-12-26" "2024-12-27" "2024-12-28" "2024-12-29" "2024-12-30" "2024-12-31" "2025-01-01")) ;; to update in 2025
(if (equal (format-time-string "%a") "Sat")
(setq workday nil)
(if (equal (format-time-string "%a") "Sun")
(setq workday nil)
(if (member (format-time-string "%Y-%m-%d") daysoff)
(setq workday nil)
(setq workday t))))
(defun isworkday ()
(eq workday t))