emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Re: Export to attach directory?


From: Eric Abrahamsen
Subject: [PATCH] Re: Export to attach directory?
Date: Fri, 12 Jun 2020 12:18:07 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> 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


Attachment: export-pub-dir-option.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]