emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bruno Barbier <brubar.cs@gmail.com>
To: Julien Palard <julien@palard.fr>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: TBLFM trying to create an infinite number of lines
Date: Tue, 06 Dec 2022 22:14:44 +0100	[thread overview]
Message-ID: <638faf1b.050a0220.2bd96.904b@mx.google.com> (raw)
In-Reply-To: <2zTa6DZP2X4XgNcATJ5SszRQPZRoFqQwKxMGTtl6-qtMw9ycjqbSRHmqjwXQRKwFHOPK-ThmFkYmOwu9Wf6JVvihTSHm7a2VIt3bgFJ2Exk=@palard.fr>



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)


  reply	other threads:[~2022-12-06 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 20:41 TBLFM trying to create an infinite number of lines Julien Palard
2022-12-06 21:14 ` Bruno Barbier [this message]
2022-12-07 14:03   ` Ihor Radchenko
2022-12-07 14:12     ` Julien Palard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=638faf1b.050a0220.2bd96.904b@mx.google.com \
    --to=brubar.cs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=julien@palard.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).