From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8OLrCYmND1+kHwAA0tVLHw (envelope-from ) for ; Wed, 15 Jul 2020 23:13:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id T4SrBYmND1+YIgAAB5/wlQ (envelope-from ) for ; Wed, 15 Jul 2020 23:13:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4149D94013C for ; Wed, 15 Jul 2020 23:13:12 +0000 (UTC) Received: from localhost ([::1]:53086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvqaL-0001nh-HT for larch@yhetil.org; Wed, 15 Jul 2020 19:13:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvqZz-0001nZ-Gk for emacs-orgmode@gnu.org; Wed, 15 Jul 2020 19:12:47 -0400 Received: from cadilhac.name ([163.172.56.42]:39648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvqZx-0001d1-LJ for emacs-orgmode@gnu.org; Wed, 15 Jul 2020 19:12:47 -0400 Received: from cadilhac.name (localhost [127.0.0.1]) by cadilhac.name (OpenSMTPD) with ESMTP id a8ede572 for ; Wed, 15 Jul 2020 23:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cadilhac.name; h= mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; s=default; bh=gRqFGHkhzGb+EX11Ie80t2 gpLac=; b=jouSlsuNi2ounkbGaGPzT0pCuMGH1iLgDU6Vsmm0FX0lhNxVMBw/9k Xn2sg/T/0MOoSQILdq3tZ3/npvzGlsoaQ4jsFc7rlHUrfEsPFdOPC9kGF0JC0r0Y xmq4Y8pFY39n1kh+tdNJDQrX+6QQEKXZE43nY5T/HjDmWKHv5NooFva3IjCQKXhh HZR9EmciAC6dlK/0VgLNu/iF7lnPD9OFKXqWLDN6Xc90sx1Tub4plWQIUyRTGLtI exn/6F5EfXuJHc4FoeHZ197HqN1+opPZu8z71bu9cNZpNVCRVNkfd75IUKxbMmT8 6LOFXNy2bijWPhjJsO6+Kb8EcnSCCaTQ== DomainKey-Signature: a=rsa-sha1; c=nofws; d=cadilhac.name; h= mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; q=dns; s=default; b=luy2AJFl9I8dYWXC LyndnycBH3ZWf5aILY2LSQpSfCSK+WdnWOPJ9r5BTQmloCSwVnkl2zb3Nm9cucU7 57EerX6orkmAcemTvoFf0Bsh5lMjqO+hCojJ/IX+vabfKdmFvuMQBnN4DQy3pBgv CJN+H2M/nW7HWIYPOad6J/85anNRYloVxDRMAaec/ABfLzrIsJbRbXDFOwcKB90J RLaVwwx74rvKirZI3y5us/kICY9AKnEC0XMFi+YPL8e7bX+GtIxoCTEK9On1gR9q Qr8sE4aECqo9X5MA8e/EuJVSaPs1oYE6jn6FeF6X9BTbyAY8k10eoIbItwiTjl22 T2b/dw== Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com [209.85.222.52]) by cadilhac.name (OpenSMTPD) with ESMTPSA id 1ed4a1ed (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Wed, 15 Jul 2020 23:12:41 +0000 (UTC) Received: by mail-ua1-f52.google.com with SMTP id g4so1163677uaq.10 for ; Wed, 15 Jul 2020 16:12:40 -0700 (PDT) X-Gm-Message-State: AOAM533ajCxZEz8ad5Y75QpH7RaWt0ko937pBgjh10UeTNa4oJXfFz/y 27BcKHQIukANXHHBIxUKPIpuCQmETX6M7hwBWoo= X-Google-Smtp-Source: ABdhPJyGIFkMuMWn/gcIf0+2/AKnqU4lp3sQmL78G5tehUQavWuQ14WIYz3fA/BLaPeP5iYYjjxzVSUl0aRpdvgv2n4= X-Received: by 2002:ab0:4a46:: with SMTP id r6mr1463287uae.107.1594854759361; Wed, 15 Jul 2020 16:12:39 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Micha=C3=ABl_Cadilhac?= Date: Wed, 15 Jul 2020 18:12:03 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Why is Babel-C trimming its output? To: Org-Mode mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=163.172.56.42; envelope-from=michael@cadilhac.name; helo=cadilhac.name X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/15 19:12:41 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cadilhac.name header.s=default header.b=jouSlsuN; dmarc=pass (policy=none) header.from=cadilhac.name; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.71 X-TUID: J6rTm9ov7n+z Hello, Quick question here: in ob-C.el, before returning the output of a C file, there's this line: (setq results (org-trim (org-remove-indentation results))) That seems quite arbitrary; is it on purpose? I have a C file that outputs some sort of list of formatted numbers, e.g.: 0 -17.8 40 4.4 80 26.7 120 48.9 and only the first line gets trimmed, leading to a faulty output. This does not seem to be a universal thing in Babel; for instance: #+begin_src emacs-lisp :exports both :results value raw " 0\n 1\n2\n" #+end_src =E2=80=A6results in: #+RESULTS: 0 1 2 But the same thing in C: #+begin_src C :exports both :results output raw printf (" 0\n 1\n2\n"); #+end_src =E2=80=A6results in: #+RESULTS: 0 1 2 Cheers, M.