-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent's :custom plist overrides children properties #28
Comments
You haven't given enough context for me to help you. Please show the value of |
If a parent had a :custom plist, the plist's properties would override the child's properties unless they were also declared in a :custom plist. e.g. ("parent" :custom (:property t) :children ("child" :property nil)) Would incorrectly return t when filling the "child" template. This is because we were appending to the :doct-custom plist in the case of inheritance, which would allow for the same key to appear multiple times. `plist-get' will return the first found key's value (in this case the "parent" declaration's). See: #28
I think I understand the issue. YODEL REPORT (2021-09-23 12:13:17): (yodel
:user-dir "doct-test.yodel"
:formatter yodel-format-as-github-markdown
:packages*
(doct
:ref "origin/master")
:post*
(yodel-file "./test.org"
:overwrite t
:save t
:with*
"")
(setq org-directory default-directory org-capture-templates
(doct
'(("Parent"
:keys "p"
:file "test.org"
:immediate-finish t
:template
("* %{property}")
:custom
(:property "PARENT")
:children
(("A"
:keys "a"
:custom
(:property "Explicit"))
("B"
:keys "b"
:property "Implicit")
("C"
:keys "c"))))))
(org-capture nil "pa")
(org-capture nil "pb")
(org-capture nil "pc")
(princ
(with-current-buffer
(find-file "test.org")
(buffer-substring-no-properties
(point-min)
(point-max)))))
STDOUT:Loading /tmp/doct-test.yodel/straight-bootstrap-snippet.el (source)...
Bootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Cloning doct...
Cloning doct...done
Building doct...
Building doct...done
Clipboard pasted as level 1 subtree
Clipboard pasted as level 1 subtree
Clipboard pasted as level 1 subtree
* Explicit
* PARENT
* PARENT Environment
Here the implicitly declared I've pushed a patch to the "development" branch which should correct this. YODEL REPORT (2021-09-23 12:27:53): (yodel
:user-dir "doct-test.yodel"
:formatter yodel-format-as-github-markdown
:packages*
(doct
:branch "development")
:post*
(yodel-file "./test.org"
:overwrite t
:save t
:with*
"")
(setq org-directory default-directory org-capture-templates
(doct
'(("Parent"
:keys "p"
:file "test.org"
:immediate-finish t
:template
("* %{property}")
:custom
(:property "PARENT")
:children
(("A"
:keys "a"
:custom
(:property "Explicit"))
("B"
:keys "b"
:property "Implicit")
("C"
:keys "c"))))))
(org-capture nil "pa")
(org-capture nil "pb")
(org-capture nil "pc")
(princ
(with-current-buffer
(find-file "test.org")
(buffer-substring-no-properties
(point-min)
(point-max)))))
STDOUT:Loading /tmp/doct-test.yodel/straight-bootstrap-snippet.el (source)...
Bootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Cloning doct...
Cloning doct...done
Building doct...
Building doct...done
Clipboard pasted as level 1 subtree
Clipboard pasted as level 1 subtree
Clipboard pasted as level 1 subtree
* Explicit
* Implicit
* PARENT Environment
Here, child As a side note, the |
Thank you @progfolio for quickly fixing the issue. Now the template-related issue is solved. but |
You're welcome. |
@progfolio I am using doom-emacs and org-capture template I have taken from @tecosaur config. I hope he will be able to provide the definition of that function. |
OK. I see you've opened an issue on his repo. I don't think this has anything more to do with doct, so I'm going to close this issue. If you find any more information that points to it being a bug in doct, just comment here and I will reopen this issue. |
Part of my org-capture-template config is as follows:
This code is not using the specified templates.
when I used "Project-local todo" it gives me this template:
when I used "Project-local changelog" it gives me this template:
when I used "Project-local note" it gives me this template:
The text was updated successfully, but these errors were encountered: