From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GLIvAeRAOWQVDwEASxT56A (envelope-from ) for ; Fri, 14 Apr 2023 14:02:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uFAzAORAOWRkHAAAG6o9tA (envelope-from ) for ; Fri, 14 Apr 2023 14:02:44 +0200 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 05FD3FE69 for ; Fri, 14 Apr 2023 14:02:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnI7X-0006SY-N7; Fri, 14 Apr 2023 08:01:41 -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 1pnI6S-0006C9-TJ for emacs-orgmode@gnu.org; Fri, 14 Apr 2023 08:00:32 -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 1pnI6Q-0006U9-Ta for emacs-orgmode@gnu.org; Fri, 14 Apr 2023 08:00:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CF354240250 for ; Fri, 14 Apr 2023 14:00:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1681473628; bh=/jL/BfJ1Shv4cq4Vfvcvhf7MLTgS7ZBxJiQFE3MOQEQ=; h=From:To:Cc:Subject:Date:From; b=QHeyrhqO5nX9ys2L5QDDA2FiFKOZ1JZuFKamf8YnB0+NcNfpC74of5gX9nxMIr3k4 c1uTzvaHMJVXJxgxZF+HWWXvgoeec6fiCMg3OUZOhfsjU7kTYwIHscSvpswnJIW9OR 9jBzlRtl3KKzvexq5gGa91RSorRVYrXw4/XW+Y7hcaVt7LuWLnzgzS5A7yeYL85XbY aWG7NT17LeWKveKPV8L5fNaF+gI6QO4gM/vd1O5KZkH4ghobZS6XpkhXsm3E6qQyN+ xYRhPVOWvtGwyzmAFB3s0/73oj73LW21/fMM57682YDdkeYWZJyTm6kuRrU4e0u6Gy GzxRy1LchgBTw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PyZlJ2NHFz9rxf; Fri, 14 Apr 2023 14:00:28 +0200 (CEST) From: Ihor Radchenko To: Uwe Brauer Cc: emacs-orgmode@gnu.org Subject: Re: export only certain columns of an org-table to csv In-Reply-To: <87y1n18kfx.fsf@mat.ucm.es> References: <87bkjy9tew.fsf@mat.ucm.es> <87edoto2v7.fsf@localhost> <87y1n18kfx.fsf@mat.ucm.es> Date: Fri, 14 Apr 2023 12:03:06 +0000 Message-ID: <87h6tin01x.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681473763; a=rsa-sha256; cv=none; b=oJsuAVfAl01xGXYL9RHn6H3iTYjqX+9lZ/GcBtGiKMzFrqN1dl31c+e7H4j/hB3EXwF14v wWY9Cq3miRw90r9699jptaFxSr2uh56M46uWSI6mc5zTRNogYbXbJdku63FhqNMC1HRrla PM9EwOAb8j1K2XmPmamj3d6SYsCvhphBQ1w2AMxrY/n6d6n4m6zqnlcKiqioMAC//T0Av9 FXKlh5Tw9RTpZz1AGaX6biYiuKGO36MZi7VyBZK3nwZyGoUihj161NBAH+Qk4H21RRIlNr CppXkmYjyckhFwJly2IC59rZc3SuUk1rsY8g7HNgjfu4E99y7T8Pnsqz2Dzu0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QHeyrhqO; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681473763; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aUn3xqR0miKjqlPZaV+fV4R8imITFPkik6tYKqz8jFM=; b=b0EUEC4SvB+1ZfCHOpSDj4uhukx47KhaPMgH1zawbpupZ53o6eb/DsrcnccjtY/Z3J9D2s 8cRJ9TcpW474UQQOa1w9k2TQX9/Gwn/8vwzsDOANn3uHh1oyRtlm9jlCXTccMgGFffNa3l /gqYW19chM+MNdCBNZaoJ+g8QESVNsRAiWuAytikoi5Z4DqwjoH1T7cdvVXnNUa26A2ZIv HyrZWMJJ7R2fpN0qsFWJ7ipgrt5PnSJninHFvfzQz/D65iNKuHGpYyp/uIx1Ot4g8i5BQL BeEzgE/rHmi4q8KVAqdG1p9Loyy7SKWfiykSbMVlwbKECRrk/NYwqgpxNzp6yw== X-Migadu-Queue-Id: 05FD3FE69 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QHeyrhqO; 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"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -6.51 X-Spam-Score: -6.51 X-TUID: HTCjt4BGIAkg Uwe Brauer writes: > I asked a similar question three years ago, the first two columns are > not exported because of this > > (add-hook 'org-export-before-processing-hook 'f-ox-filter-table-column-del) > > (defun f-ox-filter-table-column-del (back-end) > "Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1. > If you want a non-empty column $1 to be deleted make it $2 by > inserting an empty column before or rearrange column order in > some other way. Make sure \"/\" is in $1 again after that." > (while (re-search-forward > "^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t) > (goto-char (match-beginning 2)) > (org-table-delete-column) > (beginning-of-line))) > > But it is not working for the csv export would be nice if it would This one is tricky. Table export is intentionally decoupled from general export settings: 6d2ab4071960f8a7f20138291424b468722ab522 Author: Nicolas Goaziou org-table: Fix radio tables containing macros * lisp/org-table.el (orgtbl-to-generic): Export macros as-is, even if they are undefined. * testing/lisp/test-org-table.el (test-org-table/to-generic): Add test. Radio tables are now using a minimal set-up for export. In particular, no macro is expanded, and no Babel code is executed. If any of these is needed, use `org-export-string-as' or `org-export-region-as' instead. Reported-by: Mark Edgington ----- I understand that the suggested `org-export-region-as' will not work because we don't have ox-csv. And changing the way table export works may cause unforeseen consequences. I have to think how to approach this problem. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at