From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uOktHGodkWdyrwAA62LTzQ:P1 (envelope-from ) for ; Wed, 22 Jan 2025 16:31:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id uOktHGodkWdyrwAA62LTzQ (envelope-from ) for ; Wed, 22 Jan 2025 17:31:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=heagren.com header.s=default header.b=ce81Z4Mf; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=heagren.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1737563498; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kmxL2jY7jaaquT4F8zXl/k+MV4iPRtwVXdSQopBqLTw=; b=seOaMDcekJlujfe+hSA3rSB5FFKOWJFzqX/S7y4U8xciZ/7jxeTvM5aY0zd126GYOlKDNA X/72sozgI7uQmUSimcCkN+YMGJ6OJhFGhHk6/3jZl6X2OQtIjZumopUAApE1tpZULvPrF+ IxsUDy5SN/6yyEiv2cIauP/L4gMTDn/GC78YM842Gk4f+fuANDMyE954V/MUmYvR4mEbau kLrc8DZ3wnoLkwIm1eH6TESQsYVKo5By8SeieYgUERrcpbi6za6L43QBzd5m+szwr7yqfK dWAEGjbBqc+s6rFyuAhZ4jeR/S7pwJhx9Qx8amgoZ8uHUOd7At4N3xG6wIf/JQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=heagren.com header.s=default header.b=ce81Z4Mf; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=heagren.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1737563498; a=rsa-sha256; cv=none; b=WnqBFfYJMDjn+2EZ+QNOlJEVK+TVFv5OlqhS8CR35bvZXT+l6ZuC2G4cq39JtTDvPWj4js nT8662EIbJH057nrlkWARPUW7mFk291r59+GH98cI8R5yUPVS6a34IuyT7Maa8t4vFtABE tDOiJ+z1+QQNsuS7HJN9OseQG768PEQqWMbjoBH2F/NP6oYMt/R30t4qSV91D7irYtQza0 lAJW9iBdTGPqTJSpg2EyAUm7EFCGiwAh6yMTctJEqhcecYRbd+lx9/wXY78h8u3HZIOHiL IqmGQWHFHD730uZFdD6w2L9E3b9fUVq5aJTktWEL0Abkt+0PYm95cgT57wcYpQ== 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 1D98040E1E for ; Wed, 22 Jan 2025 17:31:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tadMg-0000TL-8a; Wed, 22 Jan 2025 11:14:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tadMe-0000Sx-Mt for emacs-orgmode@gnu.org; Wed, 22 Jan 2025 11:14:00 -0500 Received: from whuk14.whukhost.com ([5.77.41.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tadMb-0007ib-OK for emacs-orgmode@gnu.org; Wed, 22 Jan 2025 11:14:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=heagren.com ; s=default; h=Content-Type:Message-ID:Subject:To:From:Date:MIME-Version: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kmxL2jY7jaaquT4F8zXl/k+MV4iPRtwVXdSQopBqLTw=; b=ce81Z4MfahaDUxWWF3ZTNGezxR A5UI5UTFrebJGCaxOXy4fJtwo0Qhh+Gxaeh5lSOu3LYQTV7szCITQJmAxOZ7dBCvfmfmTWB17STun o56nkJqcxFTynqtf10Aj9fTPbxnfhvDqlyIK2KgTCGnPlejVXZbYMxXgJdyUZybFlaMthMwNqzN16 fwm2Ual4VQFgKqYI3k7dr+PI/XJ4INUrJj/72TkIFHbMeKJPblo/D7J577v5zBsS6ZJyFwwelY6Bn wVVCfF82mveqBkaP3BsC+AUiy4e8P5Nf3L9tYNoT/bt72yyJo0hHRRKg+pyOE0fw7QHCk1cxe0hiV W4D1E7uA==; Received: from [::1] (port=53256 helo=whuk14.whukhost.com) by whuk14.whukhost.com with esmtpa (Exim 4.98) (envelope-from ) id 1tadLt-0000000CvQG-0hWh for emacs-orgmode@gnu.org; Wed, 22 Jan 2025 16:13:13 +0000 MIME-Version: 1.0 Date: Wed, 22 Jan 2025 16:13:11 +0000 From: hugo@heagren.com To: emacs-orgmode@gnu.org Subject: [patch] new option `org-latex-default-class-options' User-Agent: Roundcube Webmail/1.6.9 Message-ID: <578feeb4047ca4137a1d74c2d4f442c8@heagren.com> X-Sender: hugo@heagren.com Content-Type: multipart/mixed; boundary="=_a0eba79e2d2d07369a8ae0f74442e2d5" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - whuk14.whukhost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - heagren.com X-Get-Message-Sender-Via: whuk14.whukhost.com: authenticated_id: hugo@heagren.com X-Authenticated-Sender: whuk14.whukhost.com: hugo@heagren.com X-Source: X-Source-Args: X-Source-Dir: Received-SPF: pass client-ip=5.77.41.174; envelope-from=hugo@heagren.com; helo=whuk14.whukhost.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 6.68 X-Spam-Score: 6.68 X-Migadu-Queue-Id: 1D98040E1E X-TUID: Jx8c8nlJqipb --=_a0eba79e2d2d07369a8ae0f74442e2d5 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Hi, Attached is a patch adding a new option `org-latex-default-class-options'. The option can be set locally (file locally, buffer locally, etc.) to effect the options which are interpolated in LaTeX exports by default. This might not seem terribly useful: if you want to have standard/common options set for a certain class (or even all classes) just specify them in the header string in `org-latex-classes'. This is usually sufficient, but not always. I have recently been using the LaTeX subfiles package a lot, with org mode. The package lets your compile multi-file projects in convenient ways, but (in order to do this) requires that: 1. each subfile uses the `subfile' class, 2. with the path of the master file passed as an argument My workflow is that I have a master file in LaTeX, which includes various other LaTeX files (which are exports from org files) as subfiles, thus: ,---- | /project-folder | ├ main.tex | ├ chapterOne | │ ├ chapterone.org | │ └ chapterone.tex (org export) | ├ chapterTwo | │ ├ chaptertwo.org | │ └ chaptertwo.tex (org export) | └ chapterThree | ├ chapterthree.org | └ chapterthree.tex (org export) `---- Whenever I edit one of the org files, I re-export it, thus updating the LaTeX subfiles source. So I need that export procedure to fulfil both 1 and 2 (or,if it doesn't, I have to fiddle with the exported LaTeX manually, which I don't want to). Fulfilling 1 is easy---I just set `org-latex-default-class' to "subfile" in .dir-locals in project-folder (and of course make sure that "subfile" has a valid class in in `org-latex-classes'). I want to fulfil 2, but I don't want to hardcode `../main.tex', into my `org-latex-classes', because I might have other projects where the main file is called something else (or even recursive subfile systems where different files are the 'main' file at different levels). At the moment, I solve this by putting: ,---- | #+latex_class_options: [../thesis.tex] `---- At the top of every org file, but since I do have to this for /every/ file in the hierarchy, it would be nice to get the same effect by just setting a variable. So: if I set the newly introduced `org-latex-default-class-options' in .dir-locals in project-folder, I'll get the right export behaviour every time and not have to edit the LaTeX manually, /or/ add the header to each org file manually. Someone seems to have shown interest in this sort of feature once before: best, Hugo --=_a0eba79e2d2d07369a8ae0f74442e2d5 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=0001-ox-latex.el-new-custom-var-org-latex-default-class-o.patch Content-Disposition: attachment; filename=0001-ox-latex.el-new-custom-var-org-latex-default-class-o.patch; size=1498 RnJvbSA2NGRjZTNjNWM3N2ViOTBlNTliNzNjMjkzZTE1Yjk2Y2QyNzU4NTVmIE1vbiBTZXAgMTcg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