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 4JSyHnsJJmCJMQAA0tVLHw (envelope-from ) for ; Fri, 12 Feb 2021 04:52:11 +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 OGCEGnsJJmCoWwAAB5/wlQ (envelope-from ) for ; Fri, 12 Feb 2021 04:52:11 +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 A63A59403D2 for ; Fri, 12 Feb 2021 04:52:07 +0000 (UTC) Received: from localhost ([::1]:47472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAQR3-0007Yz-0y for larch@yhetil.org; Thu, 11 Feb 2021 23:52:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAQQ0-0007AH-LF for emacs-orgmode@gnu.org; Thu, 11 Feb 2021 23:51:01 -0500 Received: from out0.migadu.com ([94.23.1.103]:49707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAQPy-00057C-0T for emacs-orgmode@gnu.org; Thu, 11 Feb 2021 23:51:00 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1613105454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nB0I8SuigPOIfGjo2m0XweBBezMcxa33rvAlbQT/ffY=; b=crwQdPo2a+LaPX4bcpqlnaE4ZBAtaU8bE3pBI2YZTfxEN2JhcoxU7Z07K7hSw2wep9Gdu5 6Mnirtvl1w4/VCRCxzgBkSXWTfcSfhLkS93ie084LA0R0WQttC1d71P7oxRSJPYVOvy7ci /mtwThk/ZHrDNLuBM4HcQwazpgVKeSXMSrZgYY2pQoEE1a9CwqN2TKonxNjiOhSVNF47J9 3eE+N81BEcD0K8hEOecgLeSWYjZMvZHn3OvTAYqrBp6x0rCCw3f2g37ow+UDBcZkH4Qj9G RyCtoJNb3qcc6cTGEz9BwqXId+GymyE62vvGyGfhkeUY4Uwg1toDksWZ0BWNVQ== From: Kyle Meyer To: Rodrigo Morales Subject: Re: How to get the content of a code block by its name? In-Reply-To: <87blcqhwzf.fsf@gmail.com> References: <87blcqhwzf.fsf@gmail.com> Date: Thu, 11 Feb 2021 23:50:52 -0500 Message-ID: <87h7mh99eb.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Received-SPF: pass client-ip=94.23.1.103; envelope-from=kyle@kyleam.com; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=crwQdPo2; 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-Migadu-Queue-Id: A63A59403D2 X-Spam-Score: -1.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: K1KuJYWUlahQ Rodrigo Morales writes: > * The question > > Let's suppose I have this simple code block in a buffer (let's say > =A=) > > #+NAME: five-numbers > #+begin_src bash > echo foo > seq 1 5 > echo bar > #+end_src > > How can I get the content of the code block with name =five-numbers= > as an string from any point in buffer =A=? This came up somewhat recently, and there were a couple of suggestions: https://orgmode.org/list/CA+pajW+jViTPE2cwTZ=tHVZyHjrT000-BB6JK2ntE4P9UFBmpQ@mail.gmail.com/T/#u