From 30a7f2d436b50645614b7734bacb104cf155437d Mon Sep 17 00:00:00 2001 From: Mathew <45mm.cartridge421@slmail.me> Date: Sat, 10 Feb 2024 21:57:22 +0000 Subject: [PATCH 1/2] fix(lib): doom/sudo-find-file: expand given path It's possible for the user to type shell variables (something like `$MYVAR/dir/filename`) as part of the filepath, so we need to call `expand-file-name`. --- lisp/lib/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/lib/files.el b/lisp/lib/files.el index 1feb20a26..2ffcc8c1e 100644 --- a/lisp/lib/files.el +++ b/lisp/lib/files.el @@ -487,7 +487,7 @@ If FORCE-P, overwrite the destination file if it exists, without confirmation." (defun doom/sudo-find-file (file) "Open FILE as root." (interactive "FOpen file as root: ") - (find-file (doom--sudo-file-path file))) + (find-file (doom--sudo-file-path (expand-file-name file)))) ;;;###autoload (defun doom/sudo-this-file () From d6db0312fdf8c3a69d1aac243808b824ec9491e7 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Sat, 10 Feb 2024 09:53:27 +0100 Subject: [PATCH 2/2] tweak(org): honor default command when archiving Change the binding for archiving to `org-archive-subtree-default`, which is the recommend "catch-all" command in the org manual. The user can specify the actual command in `org-archive-default-command`. The default for this variable is `org-archive-subtree`, which we previously used for the binding, so this commit changes behavior only for users who have set `org-archive-default-command` explicitly. --- modules/lang/org/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index c7f7a422f..c0606dec4 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -957,7 +957,7 @@ between the two." (:when (modulep! :completion vertico) "." #'consult-org-heading "/" #'consult-org-agenda) - "A" #'org-archive-subtree + "A" #'org-archive-subtree-default "e" #'org-export-dispatch "f" #'org-footnote-action "h" #'org-toggle-heading @@ -1090,7 +1090,7 @@ between the two." "n" #'org-narrow-to-subtree "r" #'org-refile "s" #'org-sparse-tree - "A" #'org-archive-subtree + "A" #'org-archive-subtree-default "N" #'widen "S" #'org-sort) (:prefix ("p" . "priority")