From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sIgsJ99RKV8gfAAA0tVLHw (envelope-from ) for ; Tue, 04 Aug 2020 12:17:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yG8JI99RKV8VLAAA1q6Kng (envelope-from ) for ; Tue, 04 Aug 2020 12:17:35 +0000 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 26A0694060B for ; Tue, 4 Aug 2020 12:17:35 +0000 (UTC) Received: from localhost ([::1]:43906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2vsq-0001Ai-Lu for larch@yhetil.org; Tue, 04 Aug 2020 08:17:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2vsG-0001AY-68 for emacs-orgmode@gnu.org; Tue, 04 Aug 2020 08:16:56 -0400 Received: from se02.route25.eu ([2a00:f10:121:a00:4f8:84ff:fe00:1846]:42187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2vsB-0005Mk-DQ for emacs-orgmode@gnu.org; Tue, 04 Aug 2020 08:16:55 -0400 Date: Tue, 4 Aug 2020 14:15:16 +0200 From: Russell Adams To: emacs-orgmode@gnu.org Subject: Re: File local setting for export directory? Message-ID: <20200804121516.GT17223@volibear> Mail-Followup-To: emacs-orgmode@gnu.org References: <871rkn7r45.fsf@hornfels.zedat.fu-berlin.de> <874kpj1fte.fsf@ericabrahamsen.net> <87pn873p1e.fsf@hornfels.zedat.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn873p1e.fsf@hornfels.zedat.fu-berlin.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: 185.87.185.80 X-SpamExperts-Domain: out.pcextreme.nl X-SpamExperts-Username: 185.87.185.80 X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.13) X-Recommended-Action: accept X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0fni+3cnVNNYyS96zEouVZ2pSDasLI4SayDByyq9LIhVg+zXlfZ3wGop Mi29kV06NUTNWdUk1Ol2OGx3IfrIJKywOmJyM1qr8uRnWBrbSAGDLZy6c0DmV/7RK6letuHor9Q5 3pMmTXeVbblO3cSIiVC03hwk+gCfum/zOWun9yflJODXbtOodkPED+RkHjVGH9gpfPe2lDQBFQc5 pWKjU8U1TnR+f0U9cu064nZcMieLAqdkk6hppCDsqsBwLjHur1XxB26GtR7aQdGQ3RxVoutSHLiC SvPUG4vBZUsH0TSAaHwJ2eESrUp0Iw/gSJ3HqMuR600P9eQ3vodupN36MrkzGQZS068e3EYTgNAB jZkD8TzPF4eG61o+cxFZrUIXowfXJosMX5ZQSlYSVlCDu2na8Lc2iK0mXNgodhRh0E6+UMVFei1G 2PrSIU9EwioS70yFBF2moUWeHNDS4qZDIDBdjx85xQq9VD42UbTRudBo31/E3ahF5MMcDI7KdpjQ KULbtCr8aoTjHIUEuG3LCVsCW2UOyugPPaOGK1ZclZhyJ1oAKHx1qHjvOGXm6QB+mk6ZTzCPKsFf twxbkg5OTEJBSZDxFdMdjhWKQRs1y634PNxyi5hJyfZTqqCPnGEeWvKb6a5iL35RlOlnSXrpV+/Y bBINWhD85454uA0O0BfbB5hQ6nsDvccjqgmDvD9Wh0yFsY2Z2oGTB2IF2g6y44/ujwN5vAr2fQEN gxhN/KmvEyoAEK4rsNWk4mvtBc9RUW7Qh3gWh36mDf/2VxyYC7eGuP0YIX8qMA5MLNz4roJ5hSgw QI8cwBPgXnd3UR6xoqhA9Rp3EoZDhUE1FQanoMBm4zuNRcgRKiGg7nXFaZTxVtvfGUGUq3gP3sz9 6chjQ/thtU3VbZiduO40Yo9l2XF6coSh1XA3fOLJ37wDhYziT8A73IOjFaUxVIYlf6k/MfIjQKAZ fI/jcX6o1g9K5ZwJhmYqJ0PIxX89f7dLTMqse5FhVBQaO03dzx9rAMZnZXrgXdZHl2vqCbCSy9Ix 3eltOv8yJ5cKtwxhveW3ZWTI X-Report-Abuse-To: spam@semaster01.route25.eu Received-SPF: pass client-ip=2a00:f10:121:a00:4f8:84ff:fe00:1846; envelope-from=rladams@adamsinfoserv.com; helo=se02.route25.eu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/04 08:16:42 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.49 X-TUID: PlhKr7Zp+yPM On Tue, Aug 04, 2020 at 08:25:13AM +0200, Loris Bennett wrote: > > diff --git a/lisp/ox.el b/lisp/ox.el > > index 9cf62078a..77cafb20d 100644 > > --- a/lisp/ox.el > > +++ b/lisp/ox.el > > @@ -6417,6 +6417,20 @@ Return file name as a string." > > "Output file: " pub-dir nil nil nil > > (lambda (n) (string= extension (file-name-extension n t)))))) > > extension)) > > + (pub-dir (or pub-dir > > + (and subtreep (org-entry-get > > + nil "EXPORT_PUB_DIR" 'selective)) > > + (org-with-point-at (point-min) > > + (catch :found > > + (let ((case-fold-search t)) > > + (while (re-search-forward > > + "^[ \t]*#\\+EXPORT_PUB_DIR:[ \t]+\\S-" > > + nil t) > > + (let ((element (org-element-at-point))) > > + (when (eq 'keyword (org-element-type element)) > > + (throw :found > > + (org-element-property > > + :value element)))))))))) > > (output-file > > ;; Build file name. Enforce EXTENSION over whatever user > > ;; may have come up with. PUB-DIR, if defined, always has Regarding this patch, have you looked at setting up Org's Publish functions in a local variable? That has a "publish destination" which I believe is the pub-dir in that export function. https://orgmode.org/manual/Sources-and-destinations.html#Sources-and-destinations Perhaps this is fixed by another means? ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3