Compare commits

...

3 Commits

Author SHA1 Message Date
Daniel - 1ac4e44f86
Silence some flycheck warnings 2022-06-13 21:06:44 +02:00
Daniel - 731039e84f
Add missing semicolon
Consistency above all!
2022-06-13 21:06:30 +02:00
Daniel - cff8720a44
Exclude NOTE entries in main org file as refile targets
The idea is that those entries represent project notes which should not get
tasks refiled as sub-items (sub-headings to structure these notes are fine,
though, and must be added directly).  To connect tasks with project notes, use
links and backlinks instead.

This helps to prevent accidental refiling of tasks under notes and loosing them
there.  A drawback is that `C-u org-refile` won't list notes as visiting targets
anymore; for this, use imenu instead.
2022-06-11 21:17:57 +02:00
2 changed files with 14 additions and 7 deletions

View File

@ -294,13 +294,19 @@ In ~%s~:
;;; Refiling
(defun db/verify-refile-target ()
"Verify that a certain location is eligible as a refile target.
In other words, exclude tasks with a done state and those with
tag PERIODIC."
"Verify that a certain location is eligible as a refile target."
(and
;; Exclude DONE state tasks from refile targets (from bh)
(not (member (nth 2 (org-heading-components))
org-done-keywords))))
org-done-keywords))
;; Exclude NOTE entries in `db/org-default-org-file', as those are project
;; notes that should not have proper tasks as children (use links to connect
;; those tasks to the project notes instead)
(not (and (member "NOTE" (org-get-tags))
(not (null (buffer-file-name)))
(not (null db/org-default-org-file))
(file-equal-p (buffer-file-name)
db/org-default-org-file)))))
;;; Reset checklists

View File

@ -443,8 +443,9 @@ Does not replace CRLF with CRCRLF, and so on."
(defun db/sync-magit-repos-from-projectile ()
"Update repositories known to magit from projectile's."
(interactive)
(require 'projectile)
(require 'magit)
(eval-when-compile ; to silence the byte compiler
(require 'projectile)
(require 'magit))
(setq magit-repository-directories
(mapcar
(lambda (dir)
@ -464,7 +465,7 @@ Does not replace CRLF with CRCRLF, and so on."
(delete-trailing-whitespace))
;; Base45 Decoding
;;; Base45 Decoding
;; This is based on https://datatracker.ietf.org/doc/draft-faltstrom-base45/,
;; which in turned may be used in data encoded for QR codes.