all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] ":sep" header argument doesn't work in ob-shell [9.6.21 ( @ /home/aragaer/.config/emacs/elpa/org-9.6.21/)]
@ 2024-03-09 20:15 Ilya Konovalov
  2024-03-12  9:27 ` Ilya Konovalov
  2024-03-12 14:38 ` Ihor Radchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Ilya Konovalov @ 2024-03-09 20:15 UTC (permalink / raw)
  To: emacs-orgmode

On current master using ":sep" header argument does not work as
expected and records are always split on whitespaces. For example:

#+begin_src sh :sep "\t"
  echo hello world
  echo test
#+end_src

#+RESULTS:
| hello | world |
| test  |       |

It looks like the issue is in the org-babel-sh-evaluate function, where
at the end it passes the result to the org-babel-import-elist-from-file
function for processing. Replacing the code with the following seems to
fix the issue:

(let ((tmp-file (org-babel-temp-file "sh-"))
      (sep (or (cdr (assq :sep params)) "\t")))
  (with-temp-file tmp-file (insert results))
  (org-babel-import-elisp-from-file tmp-file sep))

Emacs  : GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, X toolkit)
 of 2024-03-02
Package: Org mode version 9.6.21 ( @ /home/aragaer/.config/emacs/elpa/org-9.6.21/)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-12 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-09 20:15 [BUG] ":sep" header argument doesn't work in ob-shell [9.6.21 ( @ /home/aragaer/.config/emacs/elpa/org-9.6.21/)] Ilya Konovalov
2024-03-12  9:27 ` Ilya Konovalov
2024-03-12 10:22   ` Matt
2024-03-12 10:41     ` Ilya Konovalov
2024-03-12 14:25     ` Ihor Radchenko
2024-03-12 14:38 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.