New answers tagged

1 vote

How to get JSON response only from an ob-restclient block

I know it has been a long time since this was asked, but in the current version of ob-restclient (20220819.2228), I am able to show only results by using the :jq option: #+begin_src restclient :...
0 votes
Accepted

Remove rows/columns of Org table before passing to a Babel block

I don't have matlab - here's a python version: #+name: test-table | | colheader1 | colheader2 | |------------+------------+------------| | rowheader1 | 2 | 8 | | ...
  • 21.2k
2 votes

How to visit the source code block of the noweb-ref at point?

I would recommend that you name your source blocks with #+name: foo e.g.: #+name: globals #+begin_src elisp globals #+end_src #+name: aliases #+begin_src elisp aliases #+end_src #+name: bar #+...
  • 21.2k
0 votes

Org-mode checkbox, How do i extract the checked values?

Here's a more general solution for getting checked box values from NAME. (defun get-checkbox (name) (let (items) (org-element-map (org-element-parse-buffer) 'plain-list (lambda (...
  • 3,549
1 vote

How to visit the source code block of the noweb-ref at point?

@NickD's answer is more standards compliant given that it utilizes orgmode's internal mechanism. Meanwhile, I had also put together a function that will visit the noweb-ref without the necessity of ...
  • 123
0 votes

Org-mode checkbox, How do i extract the checked values?

Are you new to org-mode? Project 1 [x] module 1 [x] module 2 [] module 3 [x] module 4 This is not at all a checklist ... You need to take sometime to read the manual, and the habit of ...
0 votes

Org-mode checkbox, How do i extract the checked values?

This response has to be read in conjuction with https://emacs.stackexchange.com/a/73824/31220 Copy the below snippet to todo.json Put your cursor on #+begin_src emacs-lisp ... and do C-c C-c. Ensure ...
0 votes

Org-mode checkbox, How do i extract the checked values?

I am assuming that you aren't comfortable with elisp, but can work with javascript. The snippet below gets you from elisp to json. How you manipulate that resulting structure to a form that fits your ...
1 vote
Accepted

Literate Emacs Configuration Exclusion

This block won't be excluded: *** CUA mode #+begin_src emacs-lisp (cua-mode t) #+end_src This block will be excluded because it has the COMMENT state, which has been added with C-c ; (C-c ; runs ...
0 votes

Noweb references in sh blocks breaks the syntax highlighting

I liked @Dreammm's idea of using the « and » characters but didn't like having to declare file local variables. I also did not want to always use « and ». I just overwrote the org-babel-noweb-wrap ...
  • 113
0 votes

Help getting two R plots into a Beamer slide

Editing the code on the relevant slide to the following seems to have worked. #+begin_src R :exports results :session "*R*" :file figures/beta-posterior-trace.pdf plot(beta) #+end_src #+...
  • 157
0 votes

Issue when expanding clojure source blocks

I got what I wanted to work by changing the text expand function to (defun org-babel-expand-body:text (body params) (replace-regexp-in-string (regexp-quote "\n") "\\n" (org-trim ...
  • 1
1 vote
Accepted

Help getting two R plots into a Beamer slide

Checking the produced .tex file shows that the two plots on the last page are produced by this code: \begin{column}{.5\columnwidth} \begin{center} \includegraphics[width=0.9\linewidth]{figures7/beta-...
  • 21.2k
1 vote
Accepted

make describe-function link to org file for "tangled" lisp functions

Thanks to @NickD and the magic of :filter-return advice, this turns out to be super simple: we write a function that akes the file name that find-lisp-object-file-name returns, and for those that came ...
  • 349
1 vote
Accepted

How to split long python code into multiple code-blocks in org-mode? (indentation)

<<noweb>> blocks are indented: #+BEGIN_SRC def main(): <<foo>> #+END_SRC And then #+NAME: foo #+BEGIN_SRC print("hello, world") #+END_SRC Does this help?
  • 3,948
1 vote
Accepted

How to tangle single SRC block into multiple output files?

You can have a global (or regional) :prologue that inserts common text at the front of blocks, :epilogue that inserts common text at the end of blocks, or use the more verbose <<noweb>> ...
  • 3,948

Top 50 recent answers are included