Re: How create a hook before export ONLY to text

2020-08-07 Thread pineiden
Hi.

I have some example

Here the in org, the source code:

#+NAME: secuencia_1
#+ATTR_LATEX: :width 0.6
#+BEGIN_SRC plantuml :file ./img/secuencia_1.png
actor Usuario
Usuario -> Computador : iniciar programa
Computador -> Usuario : pedir nombre
Usuario -> Computador : entregar nombre
Computador -> Usuario : saludar
#+END_SRC

Now, with minted, the latex:

\begin{minted}[frame=lines,fontsize=\scriptsize,xleftmargin=\parindent,linenos,frame=single]{plantuml}
actor Usuario
Usuario -> Computador : iniciar programa
Computador -> Usuario : pedir nombre
Usuario -> Computador : entregar nombre
Computador -> Usuario : saludar
\end{minted}

So, minted doesn't know plantuml and throws the error.

I need some like that:

\begin{code}[frame=lines,fontsize=\scriptsize,xleftmargin=\parindent,linenos,frame=single]{plantuml}
actor Usuario
Usuario -> Computador : iniciar programa
Computador -> Usuario : pedir nombre
Usuario -> Computador : entregar nombre
Computador -> Usuario : saludar
\end{code}

br!

Sent with [ProtonMail](https://protonmail.com) Secure Email.

How create a hook before export ONLY to text

2020-08-03 Thread pineiden
Hi friends.

First time here, I have a couple of years working with org and i love it.
Now I have a problem.
I discovered the plantuml language to create nice charts, also I have minted 
configured to transform in latex to pdf.
But minted doesn't have the lexer so throws error.
I think, if there are a simple solution to do that.
A hook, maybe this:

org-export-before-parsing-hook

To parse or use 'sed' i don't know yet. To change the "#+BEGIN_SRC plantuml" to 
"#+BEGIN_SRC text" or similar.

So, what i need to know or do?
I know a little of lisp, i understand i have to:

- condition export to latex (only, because html is fine)
- if use plantuml change, if not not
- in latex has to create \begin{minted}[text] and not
\begin{minted}[plantuml]

Or, there are a general form to drop the minted on languages that not has 
lexer? Using emacs-org

Best regards!!

Sent with [ProtonMail](https://protonmail.com) Secure Email.