From e5f19504b8a73ab2ff94bbfac48d79734abd8c97 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sun, 12 Mar 2023 17:08:25 -0400 Subject: Update org config --- emacs/.config/emacs-kj/init.el | 103 ------------------------------ emacs/.config/emacs-kj/lisp/kj-org.el | 114 ++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 103 deletions(-) create mode 100644 emacs/.config/emacs-kj/lisp/kj-org.el (limited to 'emacs/.config') diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el index bc28b8c..1556e32 100644 --- a/emacs/.config/emacs-kj/init.el +++ b/emacs/.config/emacs-kj/init.el @@ -391,15 +391,6 @@ (straight-use-package '(magit :type git :host github :repo "magit/magit")) (use-package magit) -(use-package org - :config - (org-babel-do-load-languages 'org-babel-load-languages - '((emacs-lisp . t) - (shell . t))) - (setq org-confirm-babel-evaluate nil - org-return-follows-link t - ) - (require 'org-tempo)) (use-package mixed-pitch :hook @@ -576,12 +567,6 @@ (setq tramp-use-ssh-controlmaster-options nil tramp-default-method "ssh") -;; Org -(add-to-list 'org-export-backends 'md) - -(require 'kj-development) -(require 'kj-eshell) - (setq math-additional-units '((ZiB "1024 * EiB" "Zebibyte") (EiB "1024 * PiB" "Exbibyte") @@ -600,94 +585,6 @@ (Kib "1024 * b" "Kibibit") (b "B / 8" "Bit"))) -;; If you use `org' and don't want your org files in the default location below, -;; change `org-directory'. It must be set before org loads! -(setq org-directory "~/org/") -(setq org-todo-keywords - '((sequence - "TODO(t)" "ACTIVE(a!)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))) -(setq org-refile-use-outline-path nil) -(setq org-refile-targets '((nil . (:maxlevel . 2)))) -(setq org-log-into-drawer t) -(setq org-agenda-log-mode-items '(closed clock state)) -(setq org-agenda-start-day nil) -(setq org-agenda-block-separator nil) -(setq org-agenda-compact-blocks t) -(setq org-agenda-start-with-log-mode nil) -(setq org-habit-show-all-today t) -(setq org-agenda-time-grid '((daily today require-timed) (800 1600) "......" "----------------------")) -(setq org-roam-directory (concat org-directory "roam/")) -(setq-default org-agenda-files '()) -(dolist (file '("tasks.org" - "running-2022.org")) - (add-to-list 'org-agenda-files (concat org-roam-directory file))) -(setq org-roam-db-location (concat org-roam-directory "/org-roam.db")) -(setq org-export-with-toc nil) -(setq deft-directory org-directory) -(setq deft-recursive t) -;; Org html export -(setq org-html-htmlize-output-type 'css) -;; Website publish settings. -(defvar kj/publish-tag "publish") -(defvar kj/publish-directory "/ssh:orbekk@dragon.orbekk.com:/storage/srv/kj.orbekk.com") -(add-to-list 'org-modules 'org-habit) - - ; (setq org-appear-autolinks t) - ; (use-package! org-appear - ; :hook (org-mode . org-appear-mode)) - -(setq org-log-done 'time) -(setq org-todo-keywords - '((sequence - "TODO(t)" ; A task that needs doing & is ready to do - "PROJ(p)" ; A project, which usually contains other tasks - "LOOP(r)" ; A recurring task - "STRT(s)" ; A task that is in progress - "WAIT(w)" ; Something external is holding up this task - "HOLD(h)" ; This task is paused/on hold because of me - "IDEA(i)" ; An unconfirmed and unapproved task or notion - "|" - "DONE(d!)" ; Task successfully completed - "KILL(k)") ; Task was cancelled, aborted or is no longer applicable - (sequence - "[ ](T)" ; A task that needs doing - "[-](S)" ; Task is in progress - "[?](W)" ; Task is being held up or paused - "|" - "[X](D)") ; Task was completed - (sequence - "|" - "OKAY(o)" - "YES(y)" - "NO(n)"))) - -(setq org-journal-file-type 'weekly) -(setq org-journal-dir org-roam-directory) -(setq org-journal-file-format "journal-%Y-%m-%d.org") -(setq org-journal-enable-agenda-integration t) -(defun kj/org-journal-init () - (interactive) - (save-excursion - (goto-char (point-min)) - (org-id-get-create) - (org-set-property "category" "journal"))) - -(defun kj/org-journal-file-header (time) - (format-time-string "#+title: Week of %F (%W)\n" - (org-journal--convert-time-to-file-type-time time))) -(setq org-journal-file-header #'kj/org-journal-file-header) -(add-hook 'org-journal-after-header-create-hook 'kj/org-journal-init) - -(use-package org-pomodoro - :ensure t - :commands (org-pomodoro) - :config - (setq - org-pomodoro-manual-break t - org-pomodoro-time-format "%m" - org-pomodoro-format "🍅%s" - org-pomodoro-play-sounds nil - alert-user-configuration (quote ((((:category . "org-pomodoro")) libnotify nil))))) ;; Low menu delay. (setq which-key-idle-delay .5) diff --git a/emacs/.config/emacs-kj/lisp/kj-org.el b/emacs/.config/emacs-kj/lisp/kj-org.el new file mode 100644 index 0000000..9636df6 --- /dev/null +++ b/emacs/.config/emacs-kj/lisp/kj-org.el @@ -0,0 +1,114 @@ +;;; -*- lexical-scope: t; -*- + +(use-package org + :config + (org-babel-do-load-languages 'org-babel-load-languages + '((emacs-lisp . t) + (shell . t))) + (setq org-confirm-babel-evaluate nil + org-return-follows-link t + ) + + ;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") +(setq org-todo-keywords + '((sequence + "TODO(t)" "ACTIVE(a!)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))) +(setq org-refile-use-outline-path nil) +(setq org-refile-targets '((nil . (:maxlevel . 2)))) +(setq org-log-into-drawer t) +(setq org-agenda-log-mode-items '(closed clock state)) +(setq org-agenda-start-day nil) +(setq org-agenda-block-separator nil) +(setq org-agenda-compact-blocks t) +(setq org-agenda-start-with-log-mode nil) +(setq org-habit-show-all-today t) +(setq org-agenda-time-grid '((daily today require-timed) (800 1600) "......" "----------------------")) +(setq org-roam-directory (concat org-directory "roam/")) +(setq-default org-agenda-files '()) +(dolist (file '("tasks.org" + "running-2022.org")) + (add-to-list 'org-agenda-files (concat org-roam-directory file))) +(setq org-roam-db-location (concat org-roam-directory "/org-roam.db")) +(setq org-export-with-toc nil) +(setq deft-directory org-directory) +(setq deft-recursive t) +;; Org html export +(setq org-html-htmlize-output-type 'css) +;; Website publish settings. +(defvar kj/publish-tag "publish") +(defvar kj/publish-directory "/ssh:orbekk@dragon.orbekk.com:/storage/srv/kj.orbekk.com") +(add-to-list 'org-modules 'org-habit) + + ; (setq org-appear-autolinks t) + ; (use-package! org-appear + ; :hook (org-mode . org-appear-mode)) + +(setq org-log-done 'time) +(setq org-todo-keywords + '((sequence + "TODO(t)" ; A task that needs doing & is ready to do + "PROJ(p)" ; A project, which usually contains other tasks + "LOOP(r)" ; A recurring task + "STRT(s)" ; A task that is in progress + "WAIT(w)" ; Something external is holding up this task + "HOLD(h)" ; This task is paused/on hold because of me + "IDEA(i)" ; An unconfirmed and unapproved task or notion + "|" + "DONE(d!)" ; Task successfully completed + "KILL(k)") ; Task was cancelled, aborted or is no longer applicable + (sequence + "[ ](T)" ; A task that needs doing + "[-](S)" ; Task is in progress + "[?](W)" ; Task is being held up or paused + "|" + "[X](D)") ; Task was completed + (sequence + "|" + "OKAY(o)" + "YES(y)" + "NO(n)"))) + +(setq org-journal-file-type 'weekly) +(setq org-journal-dir org-roam-directory) +(setq org-journal-file-format "journal-%Y-%m-%d.org") +(setq org-journal-enable-agenda-integration t) +(defun kj/org-journal-init () + (interactive) + (save-excursion + (goto-char (point-min)) + (org-id-get-create) + (org-set-property "category" "journal"))) + +(defun kj/org-journal-file-header (time) + (format-time-string "#+title: Week of %F (%W)\n" + (org-journal--convert-time-to-file-type-time time))) +(setq org-journal-file-header #'kj/org-journal-file-header) +(add-hook 'org-journal-after-header-create-hook 'kj/org-journal-init) + + ;; Org + (add-to-list 'org-export-backends 'md) + + (require 'org-tempo)) + +(defun org-archive-done-tasks () + (interactive) + (org-map-entries + (lambda () + (org-archive-subtree) + (setq org-map-continue-from (org-element-property :begin (org-element-at-point)))) + "/DONE" 'file)) + +(use-package org-pomodoro + :ensure t + :commands (org-pomodoro) + :config + (setq + org-pomodoro-manual-break t + org-pomodoro-time-format "%m" + org-pomodoro-format "🍅%s" + org-pomodoro-play-sounds nil + alert-user-configuration (quote ((((:category . "org-pomodoro")) libnotify nil))))) + +(provide 'kj-org) -- cgit v1.2.3