fixing gitignore

This commit is contained in:
2025-12-28 21:19:27 +00:00
parent fb120bc50a
commit 8f234a746d
221 changed files with 8064 additions and 11740 deletions

26
lisp/sidenotes.el Normal file
View File

@@ -0,0 +1,26 @@
(defun z/no-sidenotes-file-p (file)
"Return non-nil if FILE should be rendered without sidenotes.
A file is no-sidenotes if:
- It has a #+NO_SIDENOTES: keyword, or
- Its FILETAGS contain :NO_SIDENOTES: or :KANBAN:, or
- Any top-level heading contains \"KANBAN\"."
(when (file-exists-p file)
(with-temp-buffer
(insert-file-contents file)
(org-mode)
(let* ((case-fold-search t)
(keywords (org-collect-keywords
'("NO_SIDENOTES" "FILETAGS")))
(flag (cadr (assoc "NO_SIDENOTES" keywords)))
(filetags (cadr (assoc "FILETAGS" keywords))))
(or
(and flag (string-match-p "\\S-" flag))
(and filetags
(string-match-p
":\\(NO_SIDENOTES\\|KANBAN\\):"
(concat ":" filetags ":")))
(save-excursion
(goto-char (point-min))
(re-search-forward "^\\*+ .*KANBAN.*" nil t)))))))
(provide 'sidenotes)