;;; ss-org.el --- Base Org configuration -*- lexical-binding: t; -*- ;;; Commentary: ;; Shared Org setup and note-opening helpers. ;;; Code: (require 'ss-core) (defun ss-open-journal () "Open `ss-journal-file', narrowing to today's entry when it exists." (interactive) (find-file (ss-require-existing-file ss-journal-file)) (widen) (unless (fboundp 'ss-journal-goto-date) (goto-char (point-max))) (when (fboundp 'ss-journal-goto-date) (if (ss-journal-goto-date) (progn (org-fold-show-entry) (org-fold-show-subtree) (org-narrow-to-subtree)) (goto-char (point-max))))) (defun ss-open-journal-full () "Open `ss-journal-file' with the full buffer visible." (interactive) (find-file (ss-require-existing-file ss-journal-file)) (widen)) (defun ss-open-moc () "Open the central MOC note." (interactive) (find-file (ss-require-existing-file ss-moc-file))) (defun ss-org-setup () "Initialize base Org configuration." (use-package org :ensure nil :config (setq org-directory ss-org-directory org-hide-emphasis-markers t org-agenda-search-headline-for-time t) (add-hook 'org-mode-hook (lambda () (setq-local org-hide-emphasis-markers t) (font-lock-flush) (font-lock-ensure)))) (use-package git-auto-commit-mode :ensure t :pin melpa :commands (git-auto-commit-mode) :init (setq gac-shell-and (if (string-match-p "fish\\'" shell-file-name) " ; and " " && "))) (add-hook 'emacs-startup-hook (lambda () (find-file (ss-require-existing-file ss-moc-file))))) (provide 'ss-org) ;;; ss-org.el ends here