From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eEqhKC9nYV/AMAAA0tVLHw (envelope-from ) for ; Wed, 16 Sep 2020 01:15:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wNfqIi9nYV/GPQAA1q6Kng (envelope-from ) for ; Wed, 16 Sep 2020 01:15:27 +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 DE7A094042A for ; Wed, 16 Sep 2020 01:15:26 +0000 (UTC) Received: from localhost ([::1]:46660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIM2f-0007hm-Al for larch@yhetil.org; Tue, 15 Sep 2020 21:15:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIM29-0007he-CH for emacs-orgmode@gnu.org; Tue, 15 Sep 2020 21:14:53 -0400 Received: from nl101-2.vfemail.net ([149.210.219.31]:31284 helo=freequeue.vfemail.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIM27-0005Il-Ho for emacs-orgmode@gnu.org; Tue, 15 Sep 2020 21:14:53 -0400 Received: (qmail 5782 invoked from network); 16 Sep 2020 01:14:48 -0000 Received: from nl101-2.vfemail.net (bmE=@149.210.219.31) by freequeue.vfemail.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 16 Sep 2020 01:14:48 -0000 Received: (qmail 5250 invoked from network); 16 Sep 2020 01:14:30 -0000 Received: by simscan 1.4.0 ppid: 5241, pid: 5243, t: 0.1099s scanners:none Received: from unknown (HELO www.vfemail.net) (ZWRnYXJAb3Blbm1haWwuY2M=@192.168.1.192) by nl101.vfemail.net with ESMTPA; 16 Sep 2020 01:14:30 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 16 Sep 2020 01:14:30 +0000 From: edgar@openmail.cc To: emacs-orgmode@gnu.org Subject: #+include from same file when exporting Message-ID: <8be324038f986bd7160e36939f0f9809@openmail.cc> X-Sender: edgar@openmail.cc User-Agent: Roundcube Webmail/1.2.3 X-Remote-Browser: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0 X-Originating-IP: [2405:8100:8000:5ca1::1:fc1b] Received-SPF: pass client-ip=149.210.219.31; envelope-from=edgar@openmail.cc; helo=freequeue.vfemail.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/15 21:14:48 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: -1.01 X-TUID: Pfe1nzVU/vwM Hello, dear list! My comment for today is that I have something like this: this-file.org .............................. * Fancy header 1 #+NAME: blk1 #+begin_src python import numpy as np #+end_src ** Fancy subheader 2 Res 1 #+include: "this-file.org::blk1" Res 2 #+include: "this-file.org::blk1" src python Res 3 #+include: "./this-file.org::blk1" src python .............................. end When I export /Fancy subheader 2/ as text, I get this-file.txt .............................. ━━━━━━━━━━━━━━━━━━━ FANCY SUBHEADER 2 ━━━━━━━━━━━━━━━━━━━ Table of Contents ───────────────── Res 1 ┌──── │ import numpy as np └──── Res 2 ┌──── │ * Fancy header 1 │ │ #+NAME: blk1 │ #+begin_src python │ import numpy as np │ #+end_src │ │ ** Fancy subheader 2 │ │ Res 1 │ #+include: "this-file.org::blk1" │ │ Res 2 │ #+include: "this-file.org::blk1" src python │ │ Res 3 │ #+include: "./this-file.org::blk1" src python └──── Res 3 ┌──── │ * Fancy header 1 │ │ #+NAME: blk1 │ #+begin_src python │ import numpy as np │ #+end_src │ │ ** Fancy subheader 2 │ │ Res 1 │ #+include: "this-file.org::blk1" │ │ Res 2 │ #+include: "this-file.org::blk1" src python │ │ Res 3 │ #+include: "./this-file.org::blk1" src python └──── .............................. end I think that all of them should just export the python block, right? Also, I think that it would be very useful to have something like this: another-file.org .............................. * Fancy header 1 #+NAME: blk1 #+begin_src python :exports none print(2) #+end_src #+RESULTS: : 2 ** Fancy subheader 2 Res 1 #+include: "this-file.org::blk1" src python :exports both .............................. end Which would allow to have the =#+include= override the =:exports= directive from the original block and get the results from the block. Right now, I can do yaf.org .............................. * Fancy header 1 #+NAME: blk1 #+begin_src python print(2) #+end_src ** Fancy subheader 2 Res 1 #+begin_src python :noweb yes :exports both <> #+end_src #+RESULTS: : 2 .............................. end to get the same result, but I thought that this could be a nice feature to add. GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, cairo version 1.17.3) of 2020-09-08 Org mode version 9.3.7 (release_9.3.7-25-g4f22fd @ /home/edgar/.emacs.d/org-mode/lisp/) ------------------------------------------------- This free account was provided by VFEmail.net - report spam to abuse@vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!