emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: lehi@tosk.in
Cc: emacs-orgmode@gnu.org
Subject: Re: Org Publish HTML and PDF With GPG Files
Date: Sat, 27 Aug 2022 13:15:55 +1000	[thread overview]
Message-ID: <86v8qe5pat.fsf@gmail.com> (raw)
In-Reply-To: <hriqNi2zD1P96GKl-5_zgdbRxcl_eS4w9zRRWbjEfqNdbNj1P4XVYVuMRj5bTRAO4KIsb-PYifIYTprS_TPVKUJ4rlzVFsD1jObRPh52tJ8=@tosk.in>


lehi@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	other threads:[~2022-08-27  3:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  0:08 Org Publish HTML and PDF With GPG Files lehi
2022-08-27  3:15 ` Tim Cross [this message]
2022-09-01  7:03   ` Ihor Radchenko
2022-09-04  5:59     ` lehi
2022-09-05  0:15       ` David Masterson
2022-09-05 11:46         ` Ihor Radchenko
2022-09-05 20:29           ` David Masterson
2022-09-06  0:44             ` lehi
2022-09-06  4:08               ` David Masterson
2022-09-06  4:37                 ` tomas
2022-09-10  2:51                   ` David Masterson
2022-09-06 13:47               ` Ihor Radchenko
2022-09-05 11:44       ` [PATCH] " Ihor Radchenko
2022-09-25  8:37         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86v8qe5pat.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=lehi@tosk.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).