20241128-1
This commit is contained in:
parent
6629c85f02
commit
16907ab35b
2 changed files with 31 additions and 92 deletions
|
@ -1,6 +1,14 @@
|
|||
(menu-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
|
||||
(require 'epa-file)
|
||||
(epa-file-enable)
|
||||
|
||||
;; (setq epa-file-encrypt-to nil)
|
||||
;; (setq epa-file-select-keys nil)
|
||||
;; (setq epa-file-cache-passphrase-for-symmetric-encryption nil)
|
||||
|
||||
(setq org-startup-folded t)
|
||||
(setq make-backup-files nil)
|
||||
(setq auto-save-default nil)
|
||||
|
||||
|
@ -62,6 +70,7 @@
|
|||
|
||||
;; Must do this so the agenda knows where to look for my files
|
||||
(setq org-agenda-files '("~/org"))
|
||||
(setq org-agenda-files (delete "~/org/done.org" org-agenda-files))
|
||||
|
||||
;; When a TODO is set to a done state, record a timestamp
|
||||
(setq org-log-done 'time)
|
||||
|
@ -125,6 +134,23 @@
|
|||
(setq auto-save-timeout 20)
|
||||
(add-hook 'auto-save-hook 'org-save-all-org-buffers)
|
||||
|
||||
;; archive
|
||||
(setq org-archive-location "~/org/done.org::")
|
||||
(defun archive-done-tasks ()
|
||||
"Archive all tasks marked as DONE in the current buffer."
|
||||
(interactive)
|
||||
(org-map-entries 'org-archive-subtree "/DONE" 'file))
|
||||
(define-key org-mode-map (kbd "C-c C-x C-d") 'archive-done-tasks)
|
||||
|
||||
;; disable autosave for some files
|
||||
(defun disable-autosave-for-specific-file ()
|
||||
"Disable auto-save-visited-mode for a specific file."
|
||||
(when (string-equal (buffer-file-name)
|
||||
(expand-file-name "~/org/private.org.gpg"))
|
||||
(auto-save-visited-mode -1)))
|
||||
|
||||
(add-hook 'find-file-hook 'disable-autosave-for-specific-file)
|
||||
|
||||
(defun transform-square-brackets-to-round-ones(string-to-transform)
|
||||
"Transforms [ into ( and ] into ), other chars left unchanged."
|
||||
(concat
|
||||
|
@ -151,6 +177,11 @@
|
|||
|
||||
(setq org-capture-templates
|
||||
'(
|
||||
("p" "Private"
|
||||
entry (file+headline "~/org/private.org.gpg" "Private")
|
||||
"* %?"
|
||||
:empty-lines 0)
|
||||
|
||||
("j" "Work Log Entry"
|
||||
entry (file+datetree "~/org/work-log.org")
|
||||
"* %?"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue