emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with https://orgmode.org/manual/Results-of-Evaluation.html


From: Ihor Radchenko
Subject: Re: problem with https://orgmode.org/manual/Results-of-Evaluation.html
Date: Mon, 15 Jan 2024 13:21:35 +0000

Uwe Brauer via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:

> I tried to use the examples of the above link
> ...
> #+NAME: no-hline
> #+BEGIN_SRC python :var tab=many-cols :hlines no
>   return tab
> #+END_SRC
>
> Now already the first failed:
> ,----
> | 
> |   File "<stdin>", line 4
> |     return tab
> |     ^
> | IndentationError: unexpected indent
> | [ Babel evaluation exited with code 1 ]
> `----
> ...
> I presume the code is for python 3.X. How can I tell org to use that
> one?

No, this is because you customized `org-src-preserve-indentation' or
`org-edit-src-content-indentation', while the provided example only
works with default indentation settings. Python is sensitive to
whitespace and your config prevents Org mode from removing the two
spaces in the example block.

I adjusted the manual to not indent src blocks.  Then, they should work
across more wide range of user settings.

Handled.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=78754cdcf

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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

[Prev in Thread] Current Thread [Next in Thread]