Re: Efficiently reuse code in org babel with R

2022-07-06 Thread Greg Minshall
Naresh,

> I want to source some data from databases, then use this data in
> various blocks.  I am looking for the most efficient way to achieve
> this.  In below blocks, is the code in block ``connection'' executed
> thrice (economy of code but no saving of time) or is it only executed
> once then used twice?  If the code is run thrice, is there another way
> to create code blocks so that the code is executed only once?

if you export this "file", the "connection" block will execute three
times.

Vikas suggested a session, which is something i often do for interactive
work.

or, the R code in "connection" could also use R variables to protect
itself against multiple executions.

or, i suppose you could invoke "connection" via a :var variable (rather
than via =<>), and use the :cache keyword to restrict
connection's evaluation to "every now and then" (for a very
precisely-defined, if not always intuitively definition of "every now
and then").  you'd have to be careful to not get bitten by the code
*not* being evaluated, and by it being evaluated too often.  (probably
too clever by half.)

hth, cheers, Greg



Re: Efficiently reuse code in org babel with R

2022-07-06 Thread Vikas Rawal
Why not specify a :session so that data created by one block would remain
available to subsequent blocks?

V.

On Thu, 7 Jul 2022 at 09:10, Naresh Gurbuxani 
wrote:

> I want to source some data from databases, then use this data in various
> blocks.  I am looking for the most efficient way to achieve this.  In below
> blocks, is the code in block ``connection'' executed thrice (economy of
> code but no saving of time) or is it only executed once then used twice?
> If the code is run thrice, is there another way to create code blocks so
> that the code is executed only once?
>
> Thanks,
> Naresh
>
> #+name: connection
> #+begin_src R :exports results :results output
>   ## my code here
> #+end_src
>
> #+begin_src R :exports results :results output graphics file :file
> figures/fig1.png
> <>
> ## my code here
> #+end_src
>
> #+begin_src R :exports results output graphics file :file figures/fig2.png
> <>
> ## my code here
> #+end_src
>


Efficiently reuse code in org babel with R

2022-07-06 Thread Naresh Gurbuxani
I want to source some data from databases, then use this data in various 
blocks.  I am looking for the most efficient way to achieve this.  In below 
blocks, is the code in block ``connection'' executed thrice (economy of code 
but no saving of time) or is it only executed once then used twice?  If the 
code is run thrice, is there another way to create code blocks so that the code 
is executed only once?

Thanks,
Naresh

#+name: connection
#+begin_src R :exports results :results output
  ## my code here
#+end_src

#+begin_src R :exports results :results output graphics file :file 
figures/fig1.png
<>
## my code here
#+end_src

#+begin_src R :exports results output graphics file :file figures/fig2.png
<>
## my code here
#+end_src


Re: Org and Hyperbole

2022-07-06 Thread Robert Weiner
Hi Eric:

Wonderful.  We hope more Org users will try Hyperbole as well and let us
know any additional implicit button types  (automatic wiki-like
hyperbuttons) you would like to see in Org mode or other ways Org and
Hyperbole can interoperate.

-- rsw

On Wed, Jul 6, 2022 at 12:58 PM Fraga, Eric  wrote:

> So I installed hyperbole and it works very nicely.  The key binding is
> no longer intrusive.  Thank you.
> --
> : Eric S Fraga, with org release_9.5.4-609-g713598 in Emacs 29.0.50


Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [

2022-07-06 Thread Uwe Brauer
>>> "JV" == Joseph Vidal-Rosset  writes:

> https://lists.gnu.org/archive/html/emacs-orgmode/2019-11/msg00016.html

> Hello,

> I would be glad to apply this patch. But I do not succeed in finding in
> org-mode documentation how applying a patch.

I am confused. This patch has been applied as far as I know at least for
me 

\begin{displaymath}
  \int   f dx =0 
\end{displaymath}

\begin{equation*}
 \sum \alpha_{i}=0
\end{equation*}

Does not generate numbers, does it for you.

You would apply the patch (depending were you are in the org-mode tree)

 patch < 0001-ox-html-Add-equation-numbers-only-for-numbered-envir.patch

And then you need to compile (and install again)




-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 


smime.p7s
Description: S/MIME cryptographic signature


[PATCH] Bugfix to org-babel-remove-temporary-stable-directory

2022-07-06 Thread Mark Dawson
* ob-core.el (org-babel-remove-temporary-stable-directory): This
function was failing when `org-babel-temporary-stable-directory' was
nil.  This variable is nil when initialised.  The function
now checks that the variable is non-nil before attempting to call
`file-exists-p`.
TINYCHANGE
---
 lisp/ob-core.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c121..d4a50734d 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3265,6 +3265,7 @@ constructed like the following: PREFIXDATAhashSUFFIX."
 (defun org-babel-remove-temporary-stable-directory ()
   "Remove `org-babel-temporary-stable-directory' and on Emacs shutdown."
   (when (and (boundp 'org-babel-temporary-stable-directory)
+ org-babel-temporary-stable-directory
  (file-exists-p org-babel-temporary-stable-directory))
 (let ((org-babel-temporary-directory
org-babel-temporary-stable-directory))
-- 
2.34.0


Re: how to convert a non-org list to org headings

2022-07-06 Thread Uwe Brauer

> On 2022-07-06, at 17:31, Kaushal Modi  wrote:


> No period after "1.1" above - makes things slightly more difficult.

Right, I repaired those manually before running queery resplace 

> This might be a bit overzealous if there are more numbers with a period
> after them.  Another way would be to add ^\(\**\) at the beginning of
> the regex (and a \1 in the replacement) and go through the file as many
> times as there are nesting levels.

Ah ok, but right now Kaushal's proposed solution is good enough for me

> You could also try Elisp as the replacement - see
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexp-Replace.html,
> https://www.masteringemacs.org/article/evaluating-lisp-forms-regular-expressions
> and
> http://mbork.pl/2013-09-18_Selective_replacement_in_LaTeX_documents_(en) .

> You could probably use keyboard macros, too - see e.g.
> http://mbork.pl/2021-02-20_Using_keyboard_macros_to_emulate_query_replace .

I thought about this, but usually I end up faster using a function (or
query replace) there was a time a liked keyboards macros, but now I find
them a bit dangerous.

Regards



smime.p7s
Description: S/MIME cryptographic signature


Re: how to convert a non-org list to org headings

2022-07-06 Thread Uwe Brauer

> On Wed, Jul 6, 2022 at 11:17 AM Uwe Brauer  wrote:

> The method that I show below is quick but not robust. You'll need to review
> all the replacements.

> - Do query-replace-regexp [default binding: C-M-%]
> - Search for [0-9]+\.
> - Replace with *

Thanks, I tried [0-9]* and that failed. 

Yours worked but I had first to fix some missing space and . 

thanks


smime.p7s
Description: S/MIME cryptographic signature


Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-07-06 Thread Thomas S. Dye



Richard Stallman  writes:

[[[ To any NSA and FBI agents reading my email: please consider 
]]]
[[[ whether defending the US Constitution against all enemies, 
]]]
[[[ foreign or domestic, requires you to follow Snowden's 
example. ]]]


  > It seems odd that our embrace of software freedom should 
  > keep us 
  > from collaborating as fully as we'd like.


It's not odd at all.  As we see various activities pushed into 
unjust
computing, which requires nonfree software and online 
dis-services,
remaining free sometimes becomes difficult.  You may have to 
refuse to
do certsin things "everyone" does.  If one of those things 
happens to
be useful for working on GNU, that's not surprising as tyranny 
marches

on.


In this case, I'm having to refuse to contribute to Org mode 
development in the convenient way I contribute monthly to FSF.


I'm hoping this is an odd situation that can be remedied 
reasonably in favor of my convenience, rather than a tyrannical 
situation that defies reason.


Nevertheless, it is good to know that I'm free to give up freedoms 
to contribute to Org mode development.  @Ihor, will Paypal work 
for you?


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Org and Hyperbole

2022-07-06 Thread Fraga, Eric
So I installed hyperbole and it works very nicely.  The key binding is
no longer intrusive.  Thank you.
-- 
: Eric S Fraga, with org release_9.5.4-609-g713598 in Emacs 29.0.50


org-meta-return / org-insert-heading does not insert new heading in middle of heading even id org-M-RET-may-split-line is set

2022-07-06 Thread Guillaume MULLER
Hi,

I thought I already reported this bug, but I cannot find it anymore in the 
mailing list archives 
(https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=org-meta-return&submit=Search%21&idxname=emacs-orgmode&max=20&result=normal&sort=date%3Alate)
 nor in the accepted bugs (https://updates.orgmode.org/?sort-bugs-by=date#bugs) 
so I'm reporting it (again?). Please forgive me if I'm duplicating it, but FYI 
it is still present today.

I'm using DoomEmacs (latest), which uses "Org mode version 9.6 
(9.6-??-e9da29b6f)".

When the cursor is in the middle of a heading (<> denots the cursor):
* heading number<> one

Hiting Meta-Ret results in:
* heading number one
* <>

Whereas it should result in:
* heading number
* <>one

At least if org-M-RET-may-split-line is set correctly.

By default, on my config org-M-RET-may-split-line is set to 'nil', but changing 
to whatever ("Always" or (default . t)) results in the same behavior.

The documentation for org-meta-return points to org-insert-heading which says:
"If point is in the middle of a line, split it and create a new headline with 
the text in the current line after point (see org-M-RET-may-split-line on how 
to modify this behavior)."

So this is actually a bug.

Cheers, keep up the good work!

GM


OpenPGP_signature
Description: OpenPGP digital signature


Re: how to convert a non-org list to org headings

2022-07-06 Thread Marcin Borkowski


On 2022-07-06, at 17:31, Kaushal Modi  wrote:

> On Wed, Jul 6, 2022 at 11:17 AM Uwe Brauer  wrote:
>
>> Hi
>>
>> I have a file that contains a list as:
>>
>>
>> 1.1 Funciones de una variable

No period after "1.1" above - makes things slightly more difficult.

> The method that I show below is quick but not robust. You'll need to review
> all the replacements.
>
> - Do query-replace-regexp [default binding: C-M-%]
> - Search for [0-9]+\.
> - Replace with *

This might be a bit overzealous if there are more numbers with a period
after them.  Another way would be to add ^\(\**\) at the beginning of
the regex (and a \1 in the replacement) and go through the file as many
times as there are nesting levels.

You could also try Elisp as the replacement - see
https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexp-Replace.html,
https://www.masteringemacs.org/article/evaluating-lisp-forms-regular-expressions
and
http://mbork.pl/2013-09-18_Selective_replacement_in_LaTeX_documents_(en) .

You could probably use keyboard macros, too - see e.g.
http://mbork.pl/2021-02-20_Using_keyboard_macros_to_emulate_query_replace .

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: how to convert a non-org list to org headings

2022-07-06 Thread Kaushal Modi
On Wed, Jul 6, 2022 at 11:17 AM Uwe Brauer  wrote:

> Hi
>
> I have a file that contains a list as:
>
>
> 1.1 Funciones de una variable
>
> 1.1.1. Catálogo de funciones. Translaciones y dilataciones
>
> 1.1.2. Derivación
>
> 1.1.2.1. Optimización. Tasa de cambio
>
> 1.1.2.2. Aproximación de funciones
>
> 1.1.2.3.1. Interpolación vs. ajuste
>
> 1.1.2.3.2. Polinomio de Taylor
>
> 1.1.2.3. Ceros de funciones (método de Newton-Raphson)
>
> 1.1.3. Integración
>
> 1.1.3.1. Integral definida. Aplicaciones
>
> 1.1.3.2. Integral impropia
>
> 1.1.3.2.1. De 1.ª especie
>
> 1.1.3.2.2. De 2ª especie
>
>
>
> Etc, that is a non org list but I would like to convert
> it to the corresponding headings
>
> ** Funciones de una variable
>
> *** Catálogo de funciones. Translaciones y dilataciones
>
> Etc, any idea how to do this in a quick way?
>

The method that I show below is quick but not robust. You'll need to review
all the replacements.

- Do query-replace-regexp [default binding: C-M-%]
- Search for [0-9]+\.
- Replace with *

Running that on your example gives:

=
*1 Funciones de una variable

*** Catálogo de funciones. Translaciones y dilataciones

*** Derivación

 Optimización. Tasa de cambio

 Aproximación de funciones

* Interpolación vs. ajuste

* Polinomio de Taylor

 Ceros de funciones (método de Newton-Raphson)

*** Integración

 Integral definida. Aplicaciones

 Integral impropia

* De *ª especie

* De 2ª especie
=

You'll need to manually fix up the " *1 Funciones de una variable" and "
* De *ª especie" lines.


how to convert a non-org list to org headings

2022-07-06 Thread Uwe Brauer
Hi 

I have a file that contains a list as:


1.1 Funciones de una variable

1.1.1. Catálogo de funciones. Translaciones y dilataciones

1.1.2. Derivación

1.1.2.1. Optimización. Tasa de cambio

1.1.2.2. Aproximación de funciones

1.1.2.3.1. Interpolación vs. ajuste

1.1.2.3.2. Polinomio de Taylor

1.1.2.3. Ceros de funciones (método de Newton-Raphson)

1.1.3. Integración

1.1.3.1. Integral definida. Aplicaciones

1.1.3.2. Integral impropia

1.1.3.2.1. De 1.ª especie

1.1.3.2.2. De 2ª especie



Etc, that is a non org list but I would like to convert 
it to the corresponding headings

** Funciones de una variable

*** Catálogo de funciones. Translaciones y dilataciones

Etc, any idea how to do this in a quick way?

Regards

Uwe Brauer 
-- 
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 




Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-07-06 Thread Hendursaga
Richard Stallman  writes:

> Wow!  If that is what it might be, it would be great news.  But we had
> better verify it carefully, because it sounds too good to be true.
> Would someone like to check the details thoroughly?

I'm afraid it is, indeed, too good to be true. The README at 
https://github.com/stripe/stripe-js lists:

"Note: To be PCI compliant, you must load Stripe.js directly from 
https://js.stripe.com. You cannot include it in a bundle or host it yourself. 
This package wraps the global Stripe function provided by the Stripe.js script 
as an ES module."

Loading https://js.stripe.com/v3/ (the latest version) in a browser yields a 
minified blob of JS. At the very end, it has an error message, "It looks like 
Stripe.js was loaded more than one time. Please only load it once per page." 
Searching this string on Stripe's GitHub organization yields no matches 
(indeed, searching all of GitHub yields no matches).

The best you could do is mitigate some of the risks, such as detailed in 
https://mtlynch.io/stripe-recording-its-customers/ but unfortunately that 
carries additional risks, such as "Stripe clients bear the cost of chargebacks 
against their application, so they should decide how much information to share 
with Stripe to reduce those chargebacks."

--
Hendursaga



Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-06 Thread Pedro Andres Aranda Gutierrez
First time to hear that. 
I wasn’t aware of it 8-0. 
Will need to recheck my projects and settings to see what I was accidentally 
doing right… in the sense that it was working as intended…

Thx/PA

PS: once again I’ll 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, em...@vergauwen.me escribió:
> 
> 
> 
> >>> 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 with
> >> an absolute path could break existing exports? Correct me if I'm wrong. 
> >> Using the :header syntax external files can be loaded in via the old way,
> >> whereas using :inputs all relative paths are resolved. 
> >> The downside of course is that we clutter the export settings with a new 
> >> parameter. 
> >
> >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
> 
> Just my .01 cents...
> 
> For Latex stuff I'm using just
> 
> #+HEADER: \input{preamble} 
> 
> and have my preamble.tex in the working directory. (For Beamer stuff it goes 
> in a LATEX_HEADER).
> 
> Changing that to
> 
> #+HEADER :inputs '("preamble")
> 
> well, would be a matter of taste. 
> Ox-beamer (ox-latex) executes all latex commands at the current directory 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 cleanup process afterwards a bit more
> complicated I think, if not impossible. 
> 
> The temporary file makes it hard to add files to the working directory. 
> 
> 
> 
> 
> 
> 
> 


Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [

2022-07-06 Thread Joseph Vidal-Rosset


https://lists.gnu.org/archive/html/emacs-orgmode/2019-11/msg00016.html

Hello,

I would be glad to apply this patch. But I do not succeed in finding in
org-mode documentation how applying a patch.

Many thanks for your help .

Jo.




org-cature-ref

2022-07-06 Thread Henrik Frisk
Hi,

Ihor Radchenko recently mentioned org-capture-ref and I decided to try to
use it, but I'm having trouble getting it to work. I have org-protocl
working for me so I'm suspecting that it is the syntax of the bookmarklet
I'm using that is at fault. I merely changed the capture template key from
the example here:

https://github.com/alphapapa/org-protocol-capture-html#org-protocol-instructions

but that doesn't work (I get an empty buffer with what looks as the the
link contents as name). Apart from that I have just copied the template
from here:

https://github.com/yantar92/org-capture-ref

Thanks for any hints!

/H


Re: Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-06 Thread General discussions about Org-mode.


> >>> 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 with
> >> an absolute path could break existing exports? Correct me if I'm wrong. 
> >> Using the :header syntax external files can be loaded in via the old way,
> >> whereas using :inputs all relative paths are resolved. 
> >> The downside of course is that we clutter the export settings with a new 
> >> parameter. 
> >
> >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
>
> Just my .01 cents...
>
> For Latex stuff I'm using just
>
> #+HEADER: \input{preamble} 
>
> and have my preamble.tex in the working directory. (For Beamer stuff it goes 
> in a LATEX_HEADER).
>
> Changing that to
>
> #+HEADER :inputs '("preamble")
>
> well, would be a matter of taste. 
>
Ox-beamer (ox-latex) executes all latex commands at the current directory 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 cleanup process afterwards a bit more
complicated I think, if not impossible. 

The temporary file makes it hard to add files to the working directory. 









Re: Links to javascript-based websites from orgmode.org: Paypal and Github

2022-07-06 Thread Dr. Arne Babenhauserheide

Richard Stallman  writes:

>   > GNU Taler requires an intermediary to clear the coins.
>
> I am not sure what that means.  Could you state in different words
> what job that "intermediary" would do?
>
> In fact, the Taler developers are hoping that banks will play two
> roles: issuing Taler tokens to spend, and redeeming those that people
> receive as payment.

That’s when banks take up Taler. Before they do, any intermediary can
take that role and use Taler to pool money so it can be sent in larger
regular transactions.

> I don't know whether that is possible -- I suggest you talk with the Taler
> developers about it.

It’s one of the use-cases in their documentation, so I expect that it
should work.

>   > To take up criticism before it becomes a discussion: While Github is
>   > annoying, you can read it without running proprietary Javascript (I just
>   > checked that by opening it in eww), and you can interact with it using
>   > email.
>
> See https://www.gnu.org/software/repo-criteria-evaluation.html for what's
> wrong with Github.  Some actions, such as creating an account, appear
> to require running nonfree JS code.

You can add this to the reasons:¹
https://sfconservancy.org/blog/2022/jun/30/give-up-github-launch/

I’m already trying to find ways to get out, but depending on the
integrations used, that can take quite some time.


¹: # Give Up GitHub: The Time Has Come!

by Denver Gingerich and Bradley M. Kuhn on June 30, 2022

Those who forget history often inadvertently repeat it. Some of us recall that 
twenty-one years ago, the most popular code hosting site, a fully Free and Open 
Source (FOSS) site called SourceForge, proprietarized all their code — never to 
make it FOSS again. Major FOSS projects slowly left SourceForge since it was 
now, itself, a proprietary system, and antithetical to FOSS. FOSS communities 
learned that it was a mistake to allow a for-profit, proprietary software 
company to become the dominant FOSS collaborative development site. SourceForge 
slowly collapsed after the DotCom crash, and today, SourceForge is more 
advertising link-bait than it is code hosting. We learned a valuable lesson 
that was a bit too easy to forget — especially when corporate involvement 
manipulates FOSS communities to its own ends. We now must learn the SourceForge 
lesson again with Microsoft's GitHub.
A parody of the GitHub logo, walling off user rights and demanding payment

GitHub has, in the last ten years, risen to dominate FOSS development. They did 
this by building a user interface and adding social interaction features to the 
existing Git technology. (For its part, Git was designed specifically to make 
software development distributed without a centralized site.) In the central 
irony, GitHub succeeded where SourceForge failed: they have convinced us to 
promote and even aid in the creation of a proprietary system that exploits 
FOSS. GitHub profits from those proprietary products (sometimes from customers 
who use it for problematic activities). Specifically, GitHub profits primarily 
from those who wish to use GitHub tools for in-house proprietary software 
development. Yet, GitHub comes out again and again seeming like a good actor — 
because they point to their largess in providing services to so many FOSS 
endeavors. But we've learned from the many gratis offerings in Big Tech: if you 
aren't the customer, you're the product. The FOSS development methodology is 
GitHub's product, which they've proprietarized and repackaged with our active 
(if often unwitting) help.

FOSS developers have been for too long the proverbial frog in slowly boiling 
water. GitHub's behavior has gotten progressively worse, and we've excused, 
ignored, or otherwise acquiesced to cognitive dissonance. We at Software 
Freedom Conservancy have ourselves been part of the problem; until recently, 
even we'd become too comfortable, complacent, and complicit with GitHub. Giving 
up GitHub will require work, sacrifice and may take a long time, even for us: 
we at Software Freedom Conservancy historically self-hosted our primary Git 
repositories, but we did use GitHub as a mirror. We urged our member projects 
and community members to avoid GitHub (and all proprietary software development 
services and infrastructure), but this was not enough. Today, we take a 
stronger stance. We are ending all our own uses of GitHub, and announcing a 
long-term plan to assist FOSS projects to migrate away from GitHub. While we 
will not mandate our existing member projects to move at this time, we will no 
longer accept new member projects that do not have a long-term plan to migrate 
away from GitHub. We will provide resources to support any of our member 
projects that choose to migrate, and help them however we can.

There are so many good reasons to give up on GitHub, and we list the major ones 
on our Give Up On GitHub site. We were already considering this action 
ourselves for some time, but last week's event s

Re: Re: [PATCH] ob-latex: Added support for including files with a relative path

2022-07-06 Thread Pedro Andres Aranda Gutierrez
>Message-ID: <87fsjfn7jw.fsf@localhost>
>emacs--- via "General discussions about Org-mode."
> writes:
>
>>> 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
with
>> an absolute path could break existing exports? Correct me if I'm wrong.
>> Using the :header syntax external files can be loaded in via the old way,
>> whereas using :inputs all relative paths are resolved.
>> The downside of course is that we clutter the export settings with a new
>> parameter.
>
>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

Just my .01 cents...

For Latex stuff I'm using just
#+HEADER: \input{preamble}
and have my preamble.tex in the working directory. (For Beamer stuff it
goes in a LATEX_HEADER).

Changing that to
#+HEADER :inputs '("preamble")
well, would be a matter of taste.

However, adding the :dir option to the equation could be a game-changer for
me (at least)

Best, /PA
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet