Antero Mejr <m...@antr.me> writes:

> When exporting this Org buffer with org-html-export-to-html:
>
> #+begin_src emacs-lisp :exports results
>   (org-table-convert-region
>    (point)
>    (+ (point) (cadr (insert-file-contents "my-table.csv"))))
> #+end_src
>
> The export operation fails with a type error:
>
> org-babel-execute-src-block: Wrong type argument: integer-or-marker-p, nil

This is simply because your command is modifying Org buffer at
point. What Org is supposed to do when things are changing under the
feet is not defined. In this particular example, you broke
`org-babel-insert-result', but, depending on what exactly your code
inserts, it might be anything else.

Elisp gives you a lot of power, including power to break things.

TL;DR: Do not do such things. If you need to use `insert-file-contents',
do it in a temporary buffer; not in the same Org buffer you are exporting.

Not a bug.
Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to