Eric Abrahamsen writes: > I think the last thing I'm missing before my Org set up is Absolutely > Perfect and never needs to be tweaked again (ha!) is the ability to > export Org files/subtrees to their relevant ATTACH directories, if any. > It might be overkill to have a global setting for this, but I would > love to be able to say: > > * Report #25 :ATTACH: > :PROPERTIES: > :ID: 3da327aa-b51e-444a-ae5c-95bb56d025a9 > :EXPORT_FILE_NAME: report_25 > :EXPORT_TO_ATTACH: t > :END: Nobody seems super excited about this but... I went poking to see how difficult it would be to do this only using hooks and whatnot. It seemed a bit awkward: I can munge the export file name altogether, but there's no good way to say "use whatever file name you would have come up with, but put the resulting file in such-and-such directory". Mostly it's not possible to sneak in and add/alter the PUB-DIR argument to `org-export-output-file-name' -- that argument only seems to be used in the publishing framework. The attached patch to `org-export-output-file-name' has it also check for a EXPORT_PUB_DIR property at the heading level or document level; that would allow libraries like org-attach.el a way to get at exporting via a hook. (Maybe EXPORT_DIRECTORY would be a better name.) Would something along these lines be considered for inclusion? Thanks, Eric