From 9eccb97326948140909f6f32d7361cc72ccdcda5 Mon Sep 17 00:00:00 2001 From: Emmet Date: Mon, 1 Apr 2024 21:10:24 -0500 Subject: [PATCH] Some fixes for org transclusion --- user/app/doom-emacs/config.el | 9 +++++++++ user/app/doom-emacs/doom.org | 16 ++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index 2acf16a..8bbc078 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -548,6 +548,8 @@ same directory as the org-buffer and insert a link to this file." :desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) (map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) +(setq org-transclusion-exclude-elements '(property-drawer keyword)) + (add-hook 'org-mode-hook #'org-transclusion-mode) (defun org-jekyll-new-post () @@ -798,13 +800,20 @@ same directory as the org-buffer and insert a link to this file." (setq org-agenda-files (append org-agenda-files (org-roam-list-notes-by-tag "todos"))) ) +(defun org-roam-append-ids-to-org-id-files (db) + (org-roam-switch-db db t) + (setq org-id-files (append org-id-files (org-roam-list-files))) +) + ;; Refreshing org roam agenda (defun org-roam-refresh-agenda-list () (interactive) (setq prev-org-roam-db-choice org-roam-db-choice) (setq org-agenda-files '()) + (setq org-id-files '()) (dolist (DB full-org-roam-db-list-pretty) (org-roam-append-notes-to-agenda "todos" DB) + (org-roam-append-ids-to-org-id-files DB) ) (setq org-agenda-files (-uniq org-agenda-files)) (org-roam-switch-db prev-org-roam-db-choice 1) diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index e599d8e..116aa9b 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -665,6 +665,8 @@ exit :desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) (map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) +(setq org-transclusion-exclude-elements '(property-drawer keyword)) + (add-hook 'org-mode-hook #'org-transclusion-mode) #+END_SRC @@ -931,13 +933,20 @@ exit (setq org-agenda-files (append org-agenda-files (org-roam-list-notes-by-tag "todos"))) ) +(defun org-roam-append-ids-to-org-id-files (db) + (org-roam-switch-db db t) + (setq org-id-files (append org-id-files (org-roam-list-files))) +) + ;; Refreshing org roam agenda (defun org-roam-refresh-agenda-list () (interactive) (setq prev-org-roam-db-choice org-roam-db-choice) (setq org-agenda-files '()) + (setq org-id-files '()) (dolist (DB full-org-roam-db-list-pretty) (org-roam-append-notes-to-agenda "todos" DB) + (org-roam-append-ids-to-org-id-files DB) ) (setq org-agenda-files (-uniq org-agenda-files)) (org-roam-switch-db prev-org-roam-db-choice 1) @@ -1951,13 +1960,12 @@ Any git package can be configured for a particular commit or branch: (package! org-ql) (package! persist) (package! sudo-edit) -(package! mini-frame) #+END_SRC * Nix Integration In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]]. #+BEGIN_SRC nix :tangle doom.nix { config, lib, pkgs-emacs, pkgs-stable, userSettings, systemSettings, - org-nursery, org-yaap, org-side-tree, org-timeblock, phscroll, ... }: + org-nursery, org-yaap, org-side-tree, org-timeblock, phscroll, mini-frame, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; @@ -2065,6 +2073,10 @@ in source = "${phscroll}"; }; + home.file.".emacs.d/mini-frame" = { + source = "${mini-frame}"; + }; + home.file.".emacs.d/system-vars.el".text = '' ;;; ~/.emacs.d/config.el -*- lexical-binding: t; -*-