 ;; Capture Code Snippets
 ;; from http://ul.io/nb/2018/04/30/better-code-snippets-with-org-capture/
 (defun db/org-capture-code-snippet (filename)
-  "Format Org mode entry for capturing code in active region in
-the buffer visiting FILENAME."
+  "Format Org mode source block with contant of active region in FILENAME."
   (with-current-buffer (find-buffer-visiting filename)
     (let ((code-snippet (buffer-substring-no-properties (mark) (- (point) 1)))
           (func-name (which-function))

;;; Calendar

(defun db/export-diary ()
  "Export diary.org as ics file to the current value of `org-icalendar-combined-agenda-file’.
This is done only if the value of this variable is not null."
  (interactive)
  (cond
   ((null org-icalendar-combined-agenda-file)
    (message "`org-icalendar-combined-agenda-file’ not set, not exporting diary."))
   ((not (file-name-absolute-p org-icalendar-combined-agenda-file))
    (user-error "`org-icalendar-combined-agenda-file’ not an absolute path, aborting."))
   (t
    (progn
      (org-save-all-org-buffers)

;;; Agenda Customization

(defun db/check-special-org-files-in-agenda (&rest args)
  "Check special Org mode files to be part of the variable `org-agenda-files'.
The special Org mode files are `db/org-default-org-file',
`db/org-default-work-file', `db/org-default-home-file', and
`db/org-default-refile-file'.  Ignore ARGS."
  (ignore args)
  (require 'org)
  (let ((agenda-files (mapcar #'file-truename (org-agenda-files t))))
