From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Huszagh Subject: babel link bug Date: Fri, 07 Feb 2020 23:24:44 -0800 Message-ID: <87r1z5y20z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42941) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0KU2-0007fa-Fp for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 02:24:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0KU1-0001oV-FJ for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 02:24:54 -0500 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:44635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0KU1-0001js-5q for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 02:24:53 -0500 Received: by mail-pl1-x62e.google.com with SMTP id d9so672365plo.11 for ; Fri, 07 Feb 2020 23:24:52 -0800 (PST) Received: from ryzen3950 (c-98-210-127-71.hsd1.ca.comcast.net. [98.210.127.71]) by smtp.gmail.com with ESMTPSA id z64sm5441071pfz.23.2020.02.07.23.24.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 23:24:49 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain The patch below fixes a bug with the behavior of link without file for babel source blocks. All explained in patch message, but let me know if any concerns. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ob-core.el-fix-silent-ouput-of-babel-link-format.patch >From 25d363bbc3cd7122287364f25f9b5d653bcae232 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Fri, 7 Feb 2020 23:09:48 -0800 Subject: [PATCH] ob-core.el: fix silent ouput of babel link format Cc: emacs The file type and link format are distinct according to the manual. Previous code required file type in order for link to work. This is distinct from the file header argument that is required for link to work. To see why this is a bug, try the code under link in the manual #+begin_src shell :results link :file "download.tar.gz" wget -c "http://example.com/download.tar.gz" #+end_src This will download the file but will not generate any results. --- lisp/ob-core.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 1a0122192..53168edc8 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -709,8 +709,7 @@ block." (not (listp r))) (list (list r)) r))) - (let ((file (and (member "file" result-params) - (cdr (assq :file params))))) + (let ((file (cdr (assq :file params)))) ;; If non-empty result and :file then write to :file. (when file ;; If `:results' are special types like `link' or -- 2.25.0 --=-=-=--