Ryan Scott <r...@vicarious-living.com> writes: > I believe I have addressed your feedback, Ihor. > Attached is the latest version of the patch. > > - Merged latest master > - :post is now handled correctly (verified with example of :post usage > in the example at https://orgmode.org/manual/Results-of-Evaluation.html) > - Added "(with quotes)" to help make the NEWS entry clearer > - Changed the attach directory detection to use a string prefix check > > Let me know what you think.
Thanks for the updated patch! > + ((or '(:dir . attach) '(:dir . "'attach")) > + (unless (org-id-get) > + (if (or noninteractive (y-or-n-p (format "Create ID for entry > \"%s\"?" > + (org-get-heading t t t > t)))) > + (org-id-get-create) > + (error "Can't attach to entry \"%s\". Entry has no ID" > + (org-get-heading t t t t)))) > + (setq params (append > + `((:dir . ,(org-attach-dir nil t)) > + (:mkdirp . "yes")) > + (assq-delete-all :dir (assq-delete-all :mkdir > params))))) Note that entry does not need :ID: property to have an attachment dir. There is also :DIR: property. Also, it would be useful to add a test. See test-ob-core/dir-mkdirp in testing/lisp/test-ob.el Best, Ihor