From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SDNnNt6B5WDYwwAAgWs5BA (envelope-from ) for ; Wed, 07 Jul 2021 12:28:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UMYMMt6B5WBiBAAAbx9fmQ (envelope-from ) for ; Wed, 07 Jul 2021 10:28:46 +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 388031D986 for ; Wed, 7 Jul 2021 12:28:46 +0200 (CEST) Received: from localhost ([::1]:54830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m14nM-0001i8-Di for larch@yhetil.org; Wed, 07 Jul 2021 06:28:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m14mj-0001g4-Iv for emacs-orgmode@gnu.org; Wed, 07 Jul 2021 06:28:05 -0400 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:62074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m14mg-0008LZ-Qt for emacs-orgmode@gnu.org; Wed, 07 Jul 2021 06:28:05 -0400 Received: from [IPv6:2a01:e35:39f3:4610:95dc:5342:ed17:370f] (unknown [IPv6:2a01:e35:39f3:4610:95dc:5342:ed17:370f]) by smtp1-g21.free.fr (Postfix) with ESMTPS id BCD11B0053B for ; Wed, 7 Jul 2021 12:27:58 +0200 (CEST) Subject: Re: convert subtree or nested list to table To: emacs-orgmode@gnu.org References: From: tbanelwebmin Message-ID: <26be9301-9e1a-0dc0-47c7-53e7ffc3e6d3@free.fr> Date: Wed, 7 Jul 2021 12:27:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=2a01:e0c:1:1599::10; envelope-from=tbanelwebmin@free.fr; helo=smtp1-g21.free.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, NICE_REPLY_A=-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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625653726; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=BSAmsNHH0ysO1AeYJW4CggVFr92Q9hMFSdGZfzhJBB4=; b=gSdBs/I+iKWO/hMz3K2W9pcacQfEUhkCnZQRHpdEmvxYmpO0xhT1DDI5IRxKg10XmyUfee 9sshL1FMLdxLU/5AvF+6VnOGhgLuSlA1e5tbQzDpCtqXwpkldRFYhQrALGRLoE6nMcd/2+ n9YrVnE+M+rjTkHXTjIRoWkJt0fSRHcdpSab5vKfZRA4KbAL96B1+z0vq81e64UxLO4z0R ulF7beIYnc4KVv59ER/eA62qNDcbPvgUhtcDmqBVzaJ8KhVnF08ILeO5049LaLy6IsCQwY LBg9uuG11b+kZ6EfUZygJoUY8q4NLh0TZNo/SuW2ZfdRs+nPcsIpX+vfIDngzA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625653726; a=rsa-sha256; cv=none; b=jF1ujzBFe6iR2TzWmgzT3a6zGGQ/KntHrXxLsS2r2IKwQ0YaN7eikeUCPD7iFyK7vx672i vQ1Bziq3tbM5uo8vatsWojonjuO8EHF8/u5/Y3ubz/Aanyk26KqrujncuMjK3vKByBs+Fb /879CxkSQ6vcsZoDjrI27eA1EZXey2iZk/ohA5eHNeN4ojz9WTNKX4OQvfP/WAow7kRyvl 5aPOFR2v8MGUZAAPEHEKWC4kYyM9olqk0qjFTEcgRZpb0kmp1Ua8qoHXuuMmXo+IwjJ7ec sIewrYXXeITwHT+zUK2/+nDLeuN2VeNH7leQQpV9C5yzPrEF5H6HFZDN1SMdHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=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-Spam-Score: -2.31 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=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: 388031D986 X-Spam-Score: -2.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7AFr30nk+UG9 Hi Matt Le 05/07/2021 à 21:44, Matt Price a écrit : > I have to write a number of text-heavy documents which need to be > delivered as tables with wrapped paragraphs in most cells. Working > directly in table format is pretty arduous and uncomfortable.  Has > anyone ever written a function to accept a list or subtree as input > and process it into a table? > > If anyone has done something similar, I'd love some tips! Maybe you could use builtin Babel Hereafter you have a starting point - Give a name to your input Org list - Process it with Emacs-Lisp (or whatever language you are comfortable with) to output it as a table ____ self contained Org Mode example _____ Example of a named list #+NAME: BBB - abc   + 123   + 456 - def   + red   + blue - ghi   + big   + small Example of converting the named list into a table with Emacs-Lisp #+begin_src elisp :var bbb=BBB :results table bbb #+end_src #+RESULTS: | abc | (unordered (123) (456))   | | def | (unordered (red) (blue))  | | ghi | (unordered (big) (small)) | ___________________________________________