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 IIudNE9ixWLdFgAAbAwnHQ (envelope-from ) for ; Wed, 06 Jul 2022 12:22:07 +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 aP2INE9ixWKoIAAA9RJhRA (envelope-from ) for ; Wed, 06 Jul 2022 12:22:07 +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 5CD2A201E2 for ; Wed, 6 Jul 2022 12:22:07 +0200 (CEST) Received: from localhost ([::1]:37518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o92AX-0001Gr-OB for larch@yhetil.org; Wed, 06 Jul 2022 06:22:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o927C-0007nY-U8 for emacs-orgmode@gnu.org; Wed, 06 Jul 2022 06:18:38 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:35335) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o927A-0006qq-UI for emacs-orgmode@gnu.org; Wed, 06 Jul 2022 06:18:38 -0400 Received: by mail-wr1-x430.google.com with SMTP id b26so21385619wrc.2 for ; Wed, 06 Jul 2022 03:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=z/mMA1d3jQc9PkbKoZw2wrhwa1LdCD9yzdTFCpmePlE=; b=mFNWtajYwjSNTh+I6whD2XofYq5HOBNeQ6QkGeMnRinO9AwTo0OafwtLZzDw/oYuAz 6qXxYSFFomR+vFkgm8hQa+7bfL+wEgx5R2Zh5uDnx6gpC98Nk6nCCaWHNZD4f6vVAEgn NaT7a1M7nM2piZXQ/PyfT4LBRo6Oy9jv2FVYf4/JGQYX5o2VKrtuGZIEugHf+uGvFC94 n4VwKMT0lXVOyuqp0u0vh6z7BsR3TEVsJLt882OSm96Y0AFY5KFvjse6rKDUE30QQqJ/ ew3HEHuOE5bQF8LcRkBummsaWQ66j+m8BdWyw8MOnTHpCjSywItBt2LiK9hY+NQEe7MS j4mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=z/mMA1d3jQc9PkbKoZw2wrhwa1LdCD9yzdTFCpmePlE=; b=sH3Jj3UjPQObSiQT7NiQjK/Hyr8gwaAtXiobzKEGzODxbhK0i+M07xC4bEJoWdvQk4 PMEGjEiv2IFVeeZNWBnwV5MtAaPSTzTv4WOlG0mPLjBIQMjkSPdJl4483d4OA+IlGS+M Pis6QCZKV1papVyfnixXdZC6MIA6PeOVXxoymgxRd+EbX4VsMIxX+NEy9HuT3KtccnNf KStP1Sw5Fwn1WmXHwuNzF4AbBXtIXSKuH+w6BPZmpJTroWiM0cB3dh/RdJ6QLcU1xJFJ pZxGLEdtak6VWznFL4+LwvlqQO2PkpaU2X2XBn83PUGZjAaHEkwumCNi52P5/pwTDNWt t8NQ== X-Gm-Message-State: AJIora+rMVGets/dBMN+J9HvKuKAUpyBF72vvBFjg6YZDkoD2/5C4jz+ km6YkV9/3+sU3flpw06iM5Y= X-Google-Smtp-Source: AGRyM1uJFnDMB+JMmrzKjZ0LBkVKuOAovcQ9HdMX7e8nt1t3pnxSOyb1f5UdGOW+dycSgJduPfLBMg== X-Received: by 2002:adf:e90c:0:b0:21b:893b:beb5 with SMTP id f12-20020adfe90c000000b0021b893bbeb5mr34747781wrm.100.1657102714893; Wed, 06 Jul 2022 03:18:34 -0700 (PDT) Received: from smtpclient.apple (175.red-95-127-197.staticip.rima-tde.net. [95.127.197.175]) by smtp.gmail.com with ESMTPSA id l5-20020a05600c47c500b0039c693a54ecsm29557688wmo.23.2022.07.06.03.18.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Jul 2022 03:18:34 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-B8D5CDB1-1962-4EF9-9289-15FAC1418A9F Content-Transfer-Encoding: 7bit From: Pedro Andres Aranda Gutierrez Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] ob-latex: Added support for including files with a relative path Date: Wed, 6 Jul 2022 12:18:32 +0200 Message-Id: <7F6C57C8-A1BC-4721-92D3-AC61285A7DDB@gmail.com> References: Cc: Org Mode List , yantar92@gmail.com In-Reply-To: To: emacs@vergauwen.me X-Mailer: iPhone Mail (19F77) Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=paaguti@gmail.com; helo=mail-wr1-x430.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, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=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=1657102927; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=z/mMA1d3jQc9PkbKoZw2wrhwa1LdCD9yzdTFCpmePlE=; b=mQtZh3xxUZa3m/bGXzkzuO2keRGdwn8LP6vsLyaxrLuqn1jqUACfJKdBPTTU+7hqU1/Uke VrJi5rNgd7LMqcmpZcsDSgfawYY0V0ybjXumUtjuMWVSMJ3cjnFPjH/9m2whdvflKdWqmo e3+CnriBQr/DnFRBmm/AAkQ+c0TC+mfgqDf4+7Zvac1DLruDbDY6gpC+P/dUWgwnXV6P1B 6TTKYn/6AADsUDuM3lK6MDSAGiPjzax0WdN1ysbVcchGh7a++PQ65Hivjz3Z86YXS+hGOK NM2507yLhyAulf0lhK1e3g5uuxQHO21xKFBG/7FQsD1euSXFs4qS5aPF2KjmLw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657102927; a=rsa-sha256; cv=none; b=bQLrKTrhgoOPXwiMyHLAfNZnjL3OuYYvZBNWF/knuUwr8QpTr6OT8eV67vM4p7qh8ArTD5 aHo0P5ta2aYs37jqUxTObhPuAkbXs+6svDC0PU9Q/RWXIbjFf9I4k9UT3eoj+h14XFQi7f FIzk2BmPH++hB0lvAhyws5DO/6X6wVhvpecrTev/V8RA1WM5aOOQPqDd4Ho40EhmrGUgIu sDAG08ExV/HfkVyUxlDRWr0RVDVODzS5XuE1Dqk8Wb6B5oVGfXtOmUJ8z0q3Jxk5Tbx36l ViJOIqv0G/23hQ+YuFz0dLKPyKRTtPEa6GI70Zx1B+ZuyPFRCYkj87z/WAU2bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mFNWtajY; 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.75 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mFNWtajY; 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: 5CD2A201E2 X-Spam-Score: -8.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1lL+0wuDbBaE --Apple-Mail-B8D5CDB1-1962-4EF9-9289-15FAC1418A9F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable First time to hear that.=20 I wasn=E2=80=99t aware of it 8-0.=20 Will need to recheck my projects and settings to see what I was accidentally= doing right=E2=80=A6 in the sense that it was working as intended=E2=80=A6 Thx/PA PS: once again I=E2=80=99ll go to sleep and will have learnt something new (= as the Spanish proverb goes) Enviado desde mi iPhone > El 6 jul 2022, a las 9:49, emacs@vergauwen.me escribi=C3=B3: >=20 > =EF=BB=BF >=20 > >>> Hi, adding an "input" type of header is one option. What about adding a= > >>> call to resolve relative file names instead, thus solving maybe other > >>> needs in addition? > >>> > >> That was my second approach. I was concerned that forcing all imports w= ith > >> an absolute path could break existing exports? Correct me if I'm wrong.= =20 > >> Using the :header syntax external files can be loaded in via the old wa= y, > >> whereas using :inputs all relative paths are resolved.=20 > >> The downside of course is that we clutter the export settings with a ne= w=20 > >> parameter.=20 > > > >Rather than changing paths to absolute, we can simply play with the > >working directly for latex process and set it to the directory of the > >.org file (unless :dir argument is passed to the latex source block). > >This is probably the most expected behavior. > > > >Best, > >Ihor >=20 > Just my .01 cents... >=20 > For Latex stuff I'm using just >=20 > #+HEADER: \input{preamble}=20 >=20 > and have my preamble.tex in the working directory. (For Beamer stuff it go= es in a LATEX_HEADER). >=20 > Changing that to >=20 > #+HEADER :inputs '("preamble") >=20 > well, would be a matter of taste.=20 > Ox-beamer (ox-latex) executes all latex commands at the current directory o= f=20 > your org file, whereas ob-latex uses a temporary file to do its thing.=20 > (with-temp-file FILE &rest BODY) > I think this is mostly done to prent metafiles from cluttering your curren= t=20 > directory.=20 >=20 > Different export types, or different user included packages, generate diff= erent > metafiles. This makes an automated cleanup process afterwards a bit more > complicated I think, if not impossible.=20 >=20 > The temporary file makes it hard to add files to the working directory.=20= >=20 >=20 >=20 >=20 >=20 >=20 >=20 --Apple-Mail-B8D5CDB1-1962-4EF9-9289-15FAC1418A9F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable First time to hear that. 
I wasn=E2= =80=99t aware of it 8-0. 
Will need to recheck my projects an= d settings to see what I was accidentally doing right=E2=80=A6 in the sense t= hat it was working as intended=E2=80=A6

Thx/PA

PS: once again I=E2=80=99ll go to sleep and will have l= earnt something new (as the Spanish proverb goes)

En= viado desde mi iPhone

El= 6 jul 2022, a las 9:49, emacs@vergauwen.me escribi=C3=B3:

=EF=BB=BF =20 =20 =20

>>> Hi, adding an "input" type of header is one option. What abou= t adding a
>>> call to resolve relative file names in= stead, thus solving maybe other
>>> needs in addition= ?
>>>
>> That was my second appro= ach. I was concerned that forcing all imports with
>> an= absolute path could break existing exports? Correct me if I'm wrong.
>> Using the :header syntax external files can be loaded in v= ia the old way,
>> whereas using :inputs all relative pa= ths are resolved.
>> The downside of course is that we c= lutter the export settings with a new
>> parameter.
>
>Rather than changing paths to absolute, w= e can simply play with the
>working directly for latex proc= ess and set it to the directory of the
>.org file (unless := dir argument is passed to the latex source block).
>This is= probably the most expected behavior.
>
>B= est,
>Ihor

Just my .01 cents..= .

For Latex stuff I'm using just
=
#+HEADER: \input{preamble}

and h= ave my preamble.tex in the working directory. (For Beamer stuff it goes in a= LATEX_HEADER).

Changing that to
=
#+HEADER :inputs '("preamble")

w= ell, would be a matter of taste.
Ox-beamer (ox-latex) executes all latex commands at the current director= y of 
your org file, whereas ob-latex uses a= temporary file to do its thing. 
(with-temp= -file FILE &rest BODY)
I think this is mostly= done to prent metafiles from cluttering your current 
directory. 

Different export types, or different user included packages, generate= different
metafiles. This makes an automated cl= eanup process afterwards a bit more
complicated I= think, if not impossible. 

The temporary file makes it hard to add files to the working dir= ectory. 







=20
= --Apple-Mail-B8D5CDB1-1962-4EF9-9289-15FAC1418A9F--