From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OKl2Ap9oHWCICQAA0tVLHw (envelope-from ) for ; Fri, 05 Feb 2021 15:47:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mHnSOZ5oHWCGTwAAbx9fmQ (envelope-from ) for ; Fri, 05 Feb 2021 15:47:42 +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 715AD9402D6 for ; Fri, 5 Feb 2021 15:47:42 +0000 (UTC) Received: from localhost ([::1]:57332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l83Ke-0007D1-4A for larch@yhetil.org; Fri, 05 Feb 2021 10:47:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l83K7-0007CJ-EH for emacs-orgmode@gnu.org; Fri, 05 Feb 2021 10:47:07 -0500 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]:40406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l83K5-0004F4-R6 for emacs-orgmode@gnu.org; Fri, 05 Feb 2021 10:47:07 -0500 Received: by mail-qk1-x72a.google.com with SMTP id u20so7272628qku.7 for ; Fri, 05 Feb 2021 07:47:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=sXGQa0uXWv2mijFShwX8QTmHsBSWZU7PM0QXPMUhaIk=; b=jxNvEjBw/UugVZ15P9L49KvaAolkU3pFgu9JeeG3x5u/LHiBxK2KcRmAIw9lnqqTfX 8QXn7o2mriyppXqbyeZWW22MZ14q3z9MAuIF04CC9UvRY8AnJGYQyHHIYFuYo9RM1Gay qRU1/Zp+/Y+c0J0LGGrH5swILeTGuqQruJDpRIWnWd8TcbX8FVeaGY+8YXJYto4GpYsI xyf7psovRJFUxK5tHsjfN/5T59pHU55YKfGrMygZZiOijNrH3deN6xJHJPHRqHuH8CvX Xh3B9sjCFy1O5a64F4n+S7xZmg9jXVGNl67aDALmP6ws0J8JY4E4SXc57dLRiLoCogpT +exA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=sXGQa0uXWv2mijFShwX8QTmHsBSWZU7PM0QXPMUhaIk=; b=uTP6uYwAbkt5YvlteKbHPS9HKs6v7IEcpjF370LJrXdgqT/QZHDFopS8YnVrjbJpHp Gh2q0hTFNzopnO5g3S8VUWB2U7Iu9G6Dm0Bf5IKxmt55SlBX92imtSMBZPpnfR4l0/Ni Ad+iGvW/t+6TBi61mbl6zUlHpWr9wBZ4L3ugvx3ggHoioUxW8IYD8Iwo3497e6KP2aAf WK5FVehdxIYw0rkKgl2f0vtI+OTz1VODUvSoJMTgtsOCM1ZehQsjOeL6fk7oLbYSK4Y8 1WmqCtMrl+2z+JtHNPvpbbAlPXyNrTqo9PrkPbh484+ei0ktpOnDq+aiBgfFWBb1TUml LTiw== X-Gm-Message-State: AOAM532+zSwlORrQMez4mm9UkPeppdfPJ0N590/EIdL1YlFVOmst9jKe Zke1SRPx+pAAYAyT4Fm6zcqzcc2P98o= X-Google-Smtp-Source: ABdhPJya6R9aV2qiEH4QyQuHrLsP8nZDrLd7vjutFHc3x0Vsmg1BcmjezvWKjn31Z14inCRLOugpXw== X-Received: by 2002:a37:91c6:: with SMTP id t189mr4888337qkd.394.1612540023975; Fri, 05 Feb 2021 07:47:03 -0800 (PST) Received: from localhost ([190.239.232.181]) by smtp.gmail.com with ESMTPSA id z5sm9488521qkc.61.2021.02.05.07.47.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 07:47:03 -0800 (PST) User-agent: mu4e 1.4.14; emacs 27.1 From: Rodrigo Morales To: emacs-orgmode@gnu.org Subject: bug? Newline inserted when referencing a block result with ":cache yes" in a "noweb" reference Date: Fri, 05 Feb 2021 10:43:40 -0500 Message-ID: <87ft2aikpf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72a; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-qk1-x72a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=jxNvEjBw; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: 715AD9402D6 X-Spam-Score: -2.55 X-Migadu-Scanner: scn1.migadu.com X-TUID: SufMyQGG0ZyO * The context Let's suppose we have two code blocks whose results we want to use in multiple code blocks. The result of this code block is cached. #+NAME: test-cache #+begin_src sh :cache yes printf "%s" 5 #+end_src #+RESULTS[4981a8c18361e02d50b4d3ac3677e0c56e9ba9c0]: test-cache #+begin_example 5 #+end_example while the results of this one isn't cached. #+NAME: test-no-cache #+begin_src sh :cache no printf "%s" 5 #+end_src #+RESULTS: test-no-cache #+begin_example 5 #+end_example Let's insert each result in a different code block through a =noweb= reference so that we can get to the issue. #+begin_src sh :eval no :noweb yes :tangle ./test-cache.sh echo "Hello <>. Lorem ipsum." #+end_src #+begin_src sh :eval no :noweb yes :tangle ./test-no-cache.sh echo "Hello <>. Lorem ipsum." #+end_src The tangling of the files mentioned above would result in #+begin_src dash cat test-cache.sh #+end_src #+RESULTS: #+begin_example echo "Hello 5 echo "Hello . Lorem ipsum." #+end_example #+begin_src dash cat test-no-cache.sh #+end_src #+RESULTS: #+begin_example echo "Hello 5. Lorem ipsum." #+end_example As we could see above, a newline is inserted when referencing the results of the code block which had the =:cache= header argument set to =yes=. This didn't happen with the code block which had =:cache= set to no. * The questions 1. Is this normal behavior or is it a bug? 2. How can I make a newline not to be inserted when referencing the result of a code block which had =:cache= set to =yes= -- Greetings, Rodrigo Morales.