From 91582b036db8e13b04abd7bba921b057d4cc94e9 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sat, 13 Nov 2021 21:12:58 +0100 Subject: [PATCH] config/doom: fix org-attach id interaction --- .config/doom/config.el | 5 +++-- .config/doom/org-attach-bug-report.txt | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .config/doom/org-attach-bug-report.txt diff --git a/.config/doom/config.el b/.config/doom/config.el index e02e09a..7233261 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -236,9 +236,10 @@ Version 2019-11-04 2021-02-16" ; (set-file-template! 'org-mode :ignore t) (setq org-read-date-prefer-future nil) (setq org-attach-id-dir (expand-file-name "3-resources/attach" user-data-dir) - org-attach-method 'mv) + org-attach-method 'mv + org-attach-preferred-new-method nil) - (setq org-id-method 'ts + (setq org-id-method 'org org-id-ts-format "%Y%m%dT%H%M%S") ;; Visuals diff --git a/.config/doom/org-attach-bug-report.txt b/.config/doom/org-attach-bug-report.txt new file mode 100644 index 0000000..3e64901 --- /dev/null +++ b/.config/doom/org-attach-bug-report.txt @@ -0,0 +1,22 @@ +To: emacs-orgmode@gnu.org +Subject: [BUG] org-attach [9.6 (9.6-??-2e9999783 @ /home/janek/.config/emacs/.local/straight/build-27.2/org/)] +From: Janek <27jf@pm.me> +--text follows this line-- + +When setting org-id-method to 'ts or 'org, +org-attach seems to use org-attach-id-ts-folder-format +to create its hierarchy. + +However I tend to customize IDs for important files by hand, +causing any attempt to use org-attach on that file to fail +if the ID is shorter than six characters: + + org-attach-id-ts-folder-format: Args out of range: "ftt", 0, 6 + +This method should be adjusted to handle non-ts-ids just as well, +as org-id-method does not dictate the format of existing ids. + + +Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4) + of 2021-03-26 +Package: Org mode version 9.6 (9.6-??-2e9999783 @ /home/janek/.config/emacs/.local/straight/build-27.2/org/)