From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0GpnNbQYYmPKNAAAbAwnHQ (envelope-from ) for ; Wed, 02 Nov 2022 08:13:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CDd8NbQYYmPt5QAA9RJhRA (envelope-from ) for ; Wed, 02 Nov 2022 08:13:56 +0100 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 929F92190D for ; Wed, 2 Nov 2022 08:13:56 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oq7vj-0005MD-BI; Wed, 02 Nov 2022 03:12:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oq7vg-0005La-Dg for emacs-orgmode@gnu.org; Wed, 02 Nov 2022 03:12:52 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oq7ve-0003Te-HB for emacs-orgmode@gnu.org; Wed, 02 Nov 2022 03:12:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4C61B240026 for ; Wed, 2 Nov 2022 08:12:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667373168; bh=sT5YtKBG+qCsCYez6zzfgs+sQuuu9httP81IuLXxadM=; h=From:To:Cc:Subject:Date:From; b=DgdO4X7KHgvzamm2GKFQ8YK+1YWvRk/+/IKJvNrthU9iHVmcqgVosmcv9u/3/wz+F HTVG2RC1Wlhc+VJ9j4vsDrSAezzm0AXSHF3Gi3/Jfs/INzuKeDHOGzQpMVQZUl4/wb hUSgaJlnDFTP5exQpan3I8xgRBsVx2iBqj/s7KPSo/2mNy4mMTTJwvQgh62C2CF/8/ Hw0C/m4MjEYU/cqEj/k3OjLlTafDMgGJwgE/4OqSWCcSvtItMB/U01pFIYkElOWzEY iHxQwyy24PoC9Z3acbqRZ9q55jC3TvvdK5IcZRC24DqF3/6VF/Q5iYRCYIRDdLJ0X6 cz+Subrm4Qh2A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N2J4Z6t39z9rxW; Wed, 2 Nov 2022 08:12:46 +0100 (CET) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode Subject: Re: Docstrings and literate programming (good practices?) In-Reply-To: <87bkpqbwef.fsf@posteo.net> References: <87bkpqbwef.fsf@posteo.net> Date: Wed, 02 Nov 2022 07:13:23 +0000 Message-ID: <87v8nxkewc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667373236; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=BkyTqd11cw5HxFdCIgj42D79388+rWsbWqpfu9tPIx8=; b=oPOyRHfSQ2gbI1VMX1PMxcQoKf1ypMzJdRpU2dTm4wYvPLRg0vdESjYK8mDO3cNv2Nuf28 GjiljaYrIstqQyJwFHwHn++BQh3kv6cDUs7YtTqfyIoa/c6umT0PeL3orxQddRrt5RCkfk 2TbJ78xT7Gg9+ua+etbL0OxJVvtPvxOB9x7MgwOzqG9WoZGNBDUgaBoMtHYL/DXdF7xrDA GJT8QIKkY6rxH2Q9p+M4tHMdKJcq75ogOQDXmuEXYlyEoUSo6PmIVPIu6YosgmHCIc1v2Q Qg9jLC3XZV2Z9UXSx9ecyrmk1GrFU19e9ER8/ferTZLIxbxQY/VA2o8w5D89NQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667373236; a=rsa-sha256; cv=none; b=F2F7dw8fmazWiOzcKq56jLXT7Sv/qByDEOvEOEyMOU0fbZxX6Tdgd+DehTC1gNUFqTXnLf wiQ0D4tq/Jk0NnQwW3RX04JR+f96y945ZFgP3QkF1ENlvNOmpRaS7TWBhkQBZFjBpdgZei xqOJ/2am1Nab2h6e4IRjsZPQBKlDWvgMyhjfRngpCHJ5hL3hwujWpAERxMSZXuQhELgt7s 7ytDfn/4797qDu7n7DqA35oCBbbg5GrMVVBA27OLNPguXFvw4awUhrDwbh+kPgoZd3AP9s o86ylsRhqiSwaSl+IQDBjKi9IFKtXsknYqEybVIxLtf3XfKLCMP1QnMFtb5pmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DgdO4X7K; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.98 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=DgdO4X7K; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 929F92190D X-Spam-Score: -4.98 X-Migadu-Scanner: scn0.migadu.com X-TUID: ijLIJRDu1FbL Juan Manuel Mac=C3=ADas writes: > #+NAME: docstring1 > #+begin_src org :post format-docstring(*this*) :results replace :exports = results :tangle no > Lorem ipsum dolor sit amet. > > Consectetuer adipiscing elit. "Donec hendrerit tempor tellus". Donec pr= etium posuere > tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, puru= s. Cum sociis > natoque penatibus et magnis dis parturient montes, nascetur ridiculus m= us.=20 > #+end_src You can also have #+name: docstring1 : Lorem ipsum dolor sit amet. : : Consectetuer adipiscing elit. "Donec hendrerit tempor tellus". Donec pr= etium posuere : tellus. Proin quam nisl, tincidunt et, mattis eget, convallis nec, puru= s. Cum sociis : natoque penatibus et magnis dis parturient montes, nascetur ridiculus m= us.=20 > #+begin_src emacs-lisp :noweb strip-export :exports code > (defun foo () > <> > (message "hello world")) > #+end_src > > The only drawback is that with :noweb strip-export an empty line is > left. Why do you need to strip docstring on export? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at