config/doom: fix org-attach id interaction

This commit is contained in:
xeruf 2021-11-13 21:12:58 +01:00
parent 176ddd822a
commit 91582b036d
2 changed files with 25 additions and 2 deletions

View File

@ -236,9 +236,10 @@ Version 2019-11-04 2021-02-16"
; (set-file-template! 'org-mode :ignore t) ; (set-file-template! 'org-mode :ignore t)
(setq org-read-date-prefer-future nil) (setq org-read-date-prefer-future nil)
(setq org-attach-id-dir (expand-file-name "3-resources/attach" user-data-dir) (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") org-id-ts-format "%Y%m%dT%H%M%S")
;; Visuals ;; Visuals

View File

@ -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/)