Вопрос

I have two types of src blocks in one file:

First,

#+begin_src emacs-lisp
(insert "For exporting code examples to html only")
#+end

is used only for publishing code, and second

#+begin_src emacs-lisp :exports results
(emacs-version)
#+end

is used only for publishing result after execution. I want to update all src blocks "for result" in file automatically (e.g. by org-babel-execute-buffer) but all src blocks "for publishing code examples only" should not be executed.

Это было полезно?

Решение

As there is no ":eval yes-export" (which would inhibit interactive evaluation, and well allow it during export), the only thing you can do is either set your "publishing" code blocks to ":eval no" or ":eval query".

That way, they won't be executed automatically: not at all, or not just during interactive buffer evaluation, depending on what you'd answer to the query.

Другие советы

I don´t understand very wel your question but you could use a javascript solution:

<script>
var link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", "styles.css");
document.head.appendChild(link);
</script>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top