From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ZvfXMd+RCWPODgEAbAwnHQ (envelope-from ) for ; Sat, 27 Aug 2022 05:39:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wMnCMN+RCWOLJAAA9RJhRA (envelope-from ) for ; Sat, 27 Aug 2022 05:39:11 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7904B1E64D for ; Sat, 27 Aug 2022 05:39:11 +0200 (CEST) Received: from localhost ([::1]:53524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRmf8-0000we-AS for larch@yhetil.org; Fri, 26 Aug 2022 23:39:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRmeQ-0000wJ-FL for emacs-orgmode@gnu.org; Fri, 26 Aug 2022 23:38:26 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:37748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRmeO-0003nz-J3 for emacs-orgmode@gnu.org; Fri, 26 Aug 2022 23:38:25 -0400 Received: by mail-pf1-x42a.google.com with SMTP id 145so2919330pfw.4 for ; Fri, 26 Aug 2022 20:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc; bh=Ej734AnJG2rxcHwQNx37xU+0nHwfTyoHaJoGNfOFIOs=; b=Jr4iWwcEvQ8zC36q2YPdBbhZHhJ3T1i53zrnF+kqQIdLQoslzlKRFRWtO+y6QCrkR6 4eMGqilSY9H7Jf0rFv10Da/wKQYlNpJ370jxF3y257sTVSHAUSZicdMQP+71Un1DIlv2 NThB+MWfHHYVCShiNlW0egqFR3JtGBBm0w43ME9QEGYo66a7rfmOL4wb8jKxvxX2LRnt 9eEII22VmQV2eFxkVDOWSroggee4+KyEgjc+8CH54mdkj8PfgJJFIhZ3qWsBuFwdqSYW YWWeg3WyKWp4cZBLTu/5nstAmSx8hPoLCUXcTxpomqbsy9U36S3K6aZPm4IGw67YRpAK 3uLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc; bh=Ej734AnJG2rxcHwQNx37xU+0nHwfTyoHaJoGNfOFIOs=; b=L0NBvsU2oXwuUKe/K/4YLQehgiBqZrjRCE6tWc5sMdAjApYOBtok+2yoSmigXYLwGy bjLP7K7XVDXTdwUDjZOGzRB2f9E6PCRg12JcQNSLWtgQ0XQn4b6fsVpPeiX1s9OHELWU fiWWbJVbSDCwrkLC6eMrCPy8ZL5jmCQwHaUJPFyrT3iGRnWtU8ucTOaz9loR8YGLNYhS 5fCl0OfYL6+hepQLfQHv3iqRlYP+Wnr8R/+BAXSu37IqmKs7zBSD5/p36/g+EIRWdxL2 aklI/noHD+lXbftEyUFRLf+34+Bp0TVq1JSnIFx2BJzgHp8fu5YXGsPbwfzqu/vxWCsj QLZA== X-Gm-Message-State: ACgBeo2mYM1o4ONsMISl/rtvBF55EAnQVFCE4X70LirFQMnAw6CXjVih Wt5/5YejGcB+GAq2OID3+sDZuw35eDWDAQ== X-Google-Smtp-Source: AA6agR6Bp/x+7k3T5b0ZcIKy3+ORqFzAJKqLL3Ku78gakeeSWckTN1eAXeEuCdPay2av3CYU/ns1kQ== X-Received: by 2002:a63:8643:0:b0:42b:66ab:b051 with SMTP id x64-20020a638643000000b0042b66abb051mr5831383pgd.259.1661571502724; Fri, 26 Aug 2022 20:38:22 -0700 (PDT) Received: from dingbat (2001-44b8-31f2-bb00-842a-7361-87c7-2662.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:842a:7361:87c7:2662]) by smtp.gmail.com with ESMTPSA id b5-20020a1709027e0500b0016c1b178628sm2352867plm.269.2022.08.26.20.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 20:38:22 -0700 (PDT) References: User-agent: mu4e 1.9.0; emacs 29.0.50 From: Tim Cross 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 In-reply-to: Message-ID: <86v8qe5pat.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661571551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Ej734AnJG2rxcHwQNx37xU+0nHwfTyoHaJoGNfOFIOs=; b=Dxar2Zjtg+GirAHMjm3a4UfraG/PApWdaOZkq4LsyF3pi71k/ePNGLm5tIb4QhJbz6Ad+j OkON9D1nnoH4HxhDuQ7k2LYIiYj5Fv4OPPj2BGV/Wc3FookRRGMXxQRA5OZyULTiMgsLst pLvVzVx4Nw3RHrwD8YkpPDwqpwb3M3X07ivpCpypMjc99hmzkO6aJMmNmJy3/wgDvxN1ji XjusDko+6kuanpdmMPhI6WpKACv3KTvjjLta2g/Z/fi13fnWdhSlWVWn9PMax2Jb7hs4/U xUhTmLpQ6Tzq4GpaifAAsP2eyFg3vHoYn8dyC4kHrjSI+uzQiwQ3byfyDMvsCQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661571551; a=rsa-sha256; cv=none; b=ALZ1QxYBHinI+MLdfXlkHP1a5qb83WyY0VSSX3kDPnJUKaYwiGAVPtz6xw02y527bVOoPA EaVNKUgXk7f2lWMlMxvT1mK44nD8wPF7QteW4L6D8f8rd3sKtIiOsEyGW0Q4YHhf9gAOab aqpsC5qUzs8KnH9YaZ8k653tC1vobIqQ4jfCNjVyk6RyKYT+ZJktnTwnC5Sh/E9+uN0Ho3 BXrAkWovJm9i/G39gXGmal55dsV8NXm/rT6+j95vstN7fk3vqrnHkLrWBiGgmHLOAKO//e Fh1+fnMCOmwHUrX/Ty2+hkQTmQ1EuH0x8dmv+dF7XF6c0hjWO9M8v1sj7yaS6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jr4iWwcE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.81 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jr4iWwcE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7904B1E64D X-Spam-Score: -8.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: vGq8ixsBs+q8 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.