* TBLFM trying to create an infinite number of lines
@ 2022-12-06 20:41 Julien Palard
2022-12-06 21:14 ` Bruno Barbier
0 siblings, 1 reply; 4+ messages in thread
From: Julien Palard @ 2022-12-06 20:41 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi,
I was playing with the idea of calling subprocesses from TBLFM (good idea or not)...
...and found that:
| |
#+TBLFM: $1='(shell-command-to-string "echo 42")
Tries to build an infinitly long table (I have to interrupt it with C-g).
While:
| |
#+TBLFM: $1=42
Which looks the same to my eyes behave cleanly by just updating the single line.
Is that a bug or did I misunderstood something?
I'm using Org 9.5.5 on emacs 28.2 on Debian.
--
[Julien Palard](https://mdk.fr)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TBLFM trying to create an infinite number of lines
2022-12-06 20:41 TBLFM trying to create an infinite number of lines Julien Palard
@ 2022-12-06 21:14 ` Bruno Barbier
2022-12-07 14:03 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Bruno Barbier @ 2022-12-06 21:14 UTC (permalink / raw)
To: Julien Palard, emacs-orgmode@gnu.org
Julien Palard <julien@palard.fr> writes:
> Hi,
>
> I was playing with the idea of calling subprocesses from TBLFM (good idea or not)...
>
> ...and found that:
>
> | |
> #+TBLFM: $1='(shell-command-to-string "echo 42")
>
> Tries to build an infinitly long table (I have to interrupt it with C-g).
...
> Is that a bug or did I misunderstood something?
Same here with 9.6-pre (release_9.5.5-1096-gf83e45).
Like with:
| |
#+TBLFM: $1='(eval "\n")
IIUC, the command "echo 42" outputs a newline, newlines are not allowed
as in cell values.
So a workaround would be to trim the output:
| 42 |
#+TBLFM: $1='(string-trim (shell-command-to-string "echo 42"))
But, you should report it as a bug: org should raise an error, not enter
an infinite loop, generating an infinite amount of text.
Bruno
>
> I'm using Org 9.5.5 on emacs 28.2 on Debian.
> --
> [Julien Palard](https://mdk.fr)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TBLFM trying to create an infinite number of lines
2022-12-06 21:14 ` Bruno Barbier
@ 2022-12-07 14:03 ` Ihor Radchenko
2022-12-07 14:12 ` Julien Palard
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-12-07 14:03 UTC (permalink / raw)
To: Bruno Barbier; +Cc: Julien Palard, emacs-orgmode@gnu.org
Bruno Barbier <brubar.cs@gmail.com> writes:
> Same here with 9.6-pre (release_9.5.5-1096-gf83e45).
>
> Like with:
>
> | |
> #+TBLFM: $1='(eval "\n")
>
> IIUC, the command "echo 42" outputs a newline, newlines are not allowed
> as in cell values.
Thank you both for reporting!
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=97a780f0b
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: TBLFM trying to create an infinite number of lines
2022-12-07 14:03 ` Ihor Radchenko
@ 2022-12-07 14:12 ` Julien Palard
0 siblings, 0 replies; 4+ messages in thread
From: Julien Palard @ 2022-12-07 14:12 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Bruno Barbier, emacs-orgmode@gnu.org
> Thank you both for reporting!
Thank you for fixing!
--
[Julien Palard](https://mdk.fr)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-07 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 20:41 TBLFM trying to create an infinite number of lines Julien Palard
2022-12-06 21:14 ` Bruno Barbier
2022-12-07 14:03 ` Ihor Radchenko
2022-12-07 14:12 ` Julien Palard
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.