From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mlcIA792VV/rEQAA0tVLHw (envelope-from ) for ; Sun, 06 Sep 2020 23:54:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YEX4Ob52VV/4TwAAB5/wlQ (envelope-from ) for ; Sun, 06 Sep 2020 23:54:38 +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 21F419406BB for ; Sun, 6 Sep 2020 23:54:38 +0000 (UTC) Received: from localhost ([::1]:37670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kF4UV-0006kx-LN for larch@yhetil.org; Sun, 06 Sep 2020 19:54:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kF4U0-0006ka-Mw for emacs-orgmode@gnu.org; Sun, 06 Sep 2020 19:54:04 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:57052 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kF4Ty-0002yN-Mf; Sun, 06 Sep 2020 19:54:04 -0400 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 4995AFA059; Sun, 6 Sep 2020 23:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1599436440; bh=ip+0pMTIhLYhIHTIRJ3bfAqbTsWqDXWQe7eyOUO6gps=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eodP9P0A11mHiLBCZ+yw3EqR5OvMDzIk2MFPFcfTTM/jt7dQy9tYprZp1hNngEWAj HnIYgg2ctiu9WhkFv1ybmfR+NgNZFSnoCLcjpdpUF+FnQt/dWU1/MUThiGh2x9gRdU cwv6YF4+oLKangu2YNRpdShl9MDkvqzojvVKqv+w= From: Eric Abrahamsen To: Bastien Subject: Re: [PATCH] Re: Export to attach directory? References: <87o8q18isr.fsf@ericabrahamsen.net> <87a718m6ts.fsf@ericabrahamsen.net> <87363w8y7g.fsf@gnu.org> <877dt6u7em.fsf@ericabrahamsen.net> <87363usgud.fsf@nicolasgoaziou.fr> Date: Sun, 06 Sep 2020 16:53:52 -0700 In-Reply-To: <87363usgud.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 07 Sep 2020 00:03:38 +0200") Message-ID: <87imcqsbqn.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/06 19:54:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ericabrahamsen.net header.s=mail header.b=eodP9P0A; dmarc=pass (policy=none) header.from=ericabrahamsen.net; 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.71 X-TUID: NAdJ0cVHiziw Nicolas Goaziou writes: > Hello, > > Eric Abrahamsen writes: > >> Subject: [PATCH] Add EXPORT_DIRECTORY property >> >> * lisp/ox.el (org-export-output-file-name): Check for this property >> and place the exported output file there. >> * doc/org-manual.org: Document. > > Doesn't it conflict with publishing, and with EXPORT_FILE_NAME > property/keyword? In both, you can already specify an output directory. I did look at making this work with the publishing framework. The problem is that ox-publish looks like it will only do one or more files, whereas I'm trying to publish a subtree. More particularly, if there were a way to pass the PUB-DIR argument to `org-export-output-file-name', that would take care of it. But I can only export a subtree via the export dispatcher, and the export dispatcher only calls `org-*-export-to-*' functions, and all of those functions contain their own call to `org-export-output-file-name', so there's no clean way to inject PUB-DIR anywhere. You can't really wait until `org-export-as' does its general keyword gathering, either, since EXPORT_FILE_NAME and EXPORT_DIRECTORY both need to be available to `org-export-to-file'. So finding EXPORT_DIRECTORY in `org-export-output-file-name' seemed like the only option. I was imagining that EXPORT_FILE_NAME would take precedence, if it was an absolute filepath. Otherwise, the two options could be complementary. >> + (org-with-point-at (point-min) >> + (catch :found >> + (let ((case-fold-search t)) >> + (while (re-search-forward >> + "^[ \t]*#\\+EXPORT_DIRECTORY:[ \t]+\\S-" >> + nil t) >> + (let ((element (org-element-at-point))) >> + (when (eq 'keyword (org-element-type element)) >> + (throw :found >> + (org-element-property >> + :value element)))))))))) > > See `org-collect-keywords'. I don't have this function! org-version -> "9.3.7" Thanks, Eric