New answers tagged

0

Org mode indents code in src blocks by 2 spaces by default. To change this you can set org-edit-src-content-indentation to 0 for no indentation. Alternatively changing org-src-preserve-indentation to t may also achieve what you want to do. Some description of indentation behaviour is in this part of the manual.


1

In the following example, the month has been hard-coded to be the 11th month of the year (i.e., November), and the year has been hard-coded to be the year 2019. [How did I come up with this example? I typed M-x find-function RET lunar-phases RET; and, then I placed my cursor on calendar-lunar-phases and repeated the find-function; and, then I extracted the ...


0

I'm not 100% that the issue you have is the same one I did, but I solved it with: (setq org-src-preserve-indentation t)


1

For reference I found this message on the org-mode mailing list which mentions a way to do this by means of file local #+LATEX_HEADER lines which use the fancyvrb package and redefine the verbatim environment that org-mode #+RESULTS blocks get exported to via: #+LATEX_HEADER: \RequirePackage{fancyvrb} #+LATEX_HEADER: \DefineVerbatimEnvironment{verbatim}{...


3

You can specify column names as header arguments (see here). #+begin_src sh :colnames '("header1" "header2") echo "value1,value2" echo "value1,value2" #+end_src #+RESULTS: | header1 | header2 | |---------+---------| | value1 | value2 | | value1 | value2 | To answer your second question, here's a solution you can try using sed (see this thread). #+...


0

Partial answer: this does it and reduces tangling time by about 40% (subjective). But I'm looking for more ways to speed it up. Compared to eg the C preprocessor cpp, org-tangle is very slow. (defadvice org-babel-tangle-single-block (around inhibit-redisplay activate protect compile) "inhibit-redisplay and inhibit-message to avoid flicker." (let ((...


0

Insert three spaces before #+begin_src and #+end_src to shift the source block on the same level as the items. You do not need to indent the source code. Without indent Org thinks the source block starts a new paragraph below the list.


0

I think I figured out a solution. https://github.com/nonsequitur/inf-ruby/issues/126


Top 50 recent answers are included