[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Raw Org AST snippets for "impossible" markup
From: |
Juan Manuel Macías |
Subject: |
Re: Raw Org AST snippets for "impossible" markup |
Date: |
Thu, 09 Dec 2021 07:01:56 +0000 |
John Kitchin writes:
> Have you seen
> https://github.com/tj64/org-dp? It seems to do a lot with creating and
> manipulating org elements. It might either be handy or lead to some
> inspiration.
Interesting package. Thanks for sharing.
It gave me an idea, also borrowing part of Maxim's code, but evaluating
in this case the path. To continue playing with links... The goal is
to obtain a link with this structure `[[quote-lang:lang][quote]]':
#+BEGIN_SRC emacs-lisp :results silent
(org-link-set-parameters
"quote-lang"
:display 'full
:export (lambda (path desc bck)
(let* ((bck org-export-current-backend)
(attr (list (format
":environment foreigndisplayquote :options
{%s}"
path)))
(info (org-export-get-environment
bck nil nil)))
(org-no-properties
(org-export-data-with-backend
`(quote-block (:attr_latex ,attr)
,desc)
bck info)))))
#+END_SRC
#+begin_src emacs-lisp
(setq backends '(latex html odt))
(setq results nil)
(mapc (lambda (backend)
(add-to-list 'results
(org-export-string-as
"[[quote-lang:spanish][Publicamos nuestro libros
para librarnos de ellos, para no pasar el resto de nuestras vidas
corrigiendo borradores.]]" backend t) t))
backends)
(mapconcat 'identity results "\n")
#+end_src
#+RESULTS:
#+begin_example
\begin{foreigndisplayquote}{spanish}
Publicamos nuestro libros
para librarnos de ellos, para no pasar el resto de nuestras vidas
corrigiendo borradores.
\end{foreigndisplayquote}
<p>
<blockquote>
Publicamos nuestro libros
para librarnos de ellos, para no pasar el resto de nuestras vidas
corrigiendo borradores.
</blockquote>
</p>
<text:p text:style-name="Text_20_body">Publicamos nuestro libros
para librarnos de ellos, para no pasar el resto de nuestras vidas
corrigiendo borradores.</text:p>
#+end_example
- Re: Org-syntax: Intra-word markup, (continued)
- Re: Org-syntax: Intra-word markup, Denis Maier, 2021/12/04
- Re: Org-syntax: Intra-word markup, Tom Gillespie, 2021/12/04
- Re: Org-syntax: Intra-word markup, John Kitchin, 2021/12/04
- Re: Org-syntax: Intra-word markup, Juan Manuel Macías, 2021/12/04
- Raw Org AST snippets for "impossible" markup, Max Nikulin, 2021/12/06
- Re: Raw Org AST snippets for "impossible" markup, Juan Manuel Macías, 2021/12/06
- Re: Raw Org AST snippets for "impossible" markup, Juan Manuel Macías, 2021/12/06
- Re: Raw Org AST snippets for "impossible" markup, Max Nikulin, 2021/12/08
- Re: Raw Org AST snippets for "impossible" markup, Juan Manuel Macías, 2021/12/08
- Re: Raw Org AST snippets for "impossible" markup, John Kitchin, 2021/12/08
- Re: Raw Org AST snippets for "impossible" markup,
Juan Manuel Macías <=
- Re: Raw Org AST snippets for "impossible" markup, Max Nikulin, 2021/12/09
- Re: Raw Org AST snippets for "impossible" markup, Juan Manuel Macías, 2021/12/09
- Re: Raw Org AST snippets for "impossible" markup, Juan Manuel Macías, 2021/12/09
- Re: Org-syntax: Intra-word markup, Timothy, 2021/12/04
- Re: Org-syntax: Intra-word markup, Tom Gillespie, 2021/12/04
- Re: Org-syntax: Intra-word markup, Max Nikulin, 2021/12/06
- Re: Org-syntax: Intra-word markup, Denis Maier, 2021/12/06
Re: Org-syntax: Intra-word markup, autofrettage, 2021/12/02