From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: included text Date: Mon, 4 Nov 2019 17:25:06 -0700 Message-ID: References: <875zk1axmn.fsf@ucl.ac.uk> <87wocfz3r8.fsf@aquinas> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34704) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRmek-0008G6-OQ for emacs-orgmode@gnu.org; Mon, 04 Nov 2019 19:25:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRmej-0001gJ-3j for emacs-orgmode@gnu.org; Mon, 04 Nov 2019 19:25:10 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:38442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRmei-0001dq-Pm for emacs-orgmode@gnu.org; Mon, 04 Nov 2019 19:25:09 -0500 Received: by mail-lj1-x234.google.com with SMTP id v8so4058187ljh.5 for ; Mon, 04 Nov 2019 16:25:08 -0800 (PST) In-Reply-To: <87wocfz3r8.fsf@aquinas> 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.org@gnu.org Sender: "Emacs-orgmode" To: Richard Lawrence Cc: "emacs-orgmode@gnu.org" , "Fraga, Eric" the include route seems brittle to me, as you have to name the file you are in. this would be interesting: #+include: {{{input-file}}}::#yada-quote (i have a bug in org more recent than a pretty old version so idk if this is already possible.) On 11/4/19, Richard Lawrence wrote: > "Fraga, Eric" writes: > >> Mind you, an alternative could be #+CALL-ing a src block >> that generates the text as output? > > On these lines: I've been thinking recently that it would be great to be > able to tangle/export other kinds of blocks (quotes, examples, etc.) via > the same kind of mechanism that src blocks use. > > This would be really useful for me for making e.g. handouts from the > file that contains notes for a talk or a paper. > > I've done this in the past with src blocks containing Org source code. > So instead of writing > > #+begin_quote > Yada yada > #+end_quote > > I write > > #+begin_src org :tangle handout.org > ,#+begin_quote > Yada yada > ,#+end_quote > #+end_src > > and create the handout.org file via org-babel-tangle. > > This works but it is pretty clunky, and you lose a lot of the benefit of > having the original quote block. For one thing, it no longer exports as > a quote from the original file, but as source code. I'd rather just > write: > > #+begin_quote :tangle handout.org > Yada yada > #+end_quote > > or even better: > > #+name: yada-quote > #+begin_quote > Yada yada > #+end_quote > > and then in handout.org, something like: > > #+include: talk.org::#yada-quote > > Is there anyone who would be interested in this besides just me and > Samuel? (Can this already be done somehow in a non-clunky way?? I find > John's suggestion intriguing but too clunky: it seems like I shouldn't > have to pass a block of text through a shell or Python interpreter just > to include it verbatim in another Org file!) > > -- > Best, > Richard > -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html The disease DOES progress. MANY people have died from it. And ANYBODY can get it at any time.