l...@tosk.in writes:

> Good Afternoon,
>
> I have my org directory filled with encrypted files ending in ".org.gpg". The 
> publish documentation says that org-mode will
> automatically replace references to ".org" files with ".html", but this is 
> not an automatic action if the files are ".org.gpg". The
> resulting HTML files must then be edited (in batch with a call to sed) for 
> the page links to work like expected. This happens
> when exporting to PDF as well. I have been looking over the org-mode 
> documentation and I have found no real answer to
> this problem other than looking at the publishing source code and modifying 
> it to additionally catch ".org.gpg" files.
>
> Is there some customization setting within Emacs that I could edit that would 
> allow for this to work the way I expect? Or
> would this require changing the way the publishing works?
>

I was hoping someone who was more informed than me would respond here.

I don't think there is an 'out of the box' solution for this issue. Part
of the problem is likely because the handling of the gpg decryption is
an Emacs function done outside of org mode i.e. org-mode is not really
aware the original file was an encrypted gpg file, it only see the
decrypted version. This makes it hard for org to know which links ending
in .gpg should be translated and which ones should not (for example, a
link to an encrypted gpg file to be served by the web server rather than
a link to another org file). This makes it a little challenging to come
up with a solution which will work for all use cases.

The good news is that org-mode does support the ability to modify what
happens during an export (publishing is really exporting as html). Have
a look in the org manual at the "Advanced Export Configuration" section
of the manual (under the Exporting section). In particular, you might be
able to achieve the translation of links such that the .gpg are stripped
using export filters.



Reply via email to