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 0PqNAbfpdV+iZgAA0tVLHw (envelope-from ) for ; Thu, 01 Oct 2020 14:37:43 +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 8P7wOLbpdV+4bgAAB5/wlQ (envelope-from ) for ; Thu, 01 Oct 2020 14:37:42 +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 978EE94023C for ; Thu, 1 Oct 2020 14:37:42 +0000 (UTC) Received: from localhost ([::1]:37818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNziH-0004it-IQ for larch@yhetil.org; Thu, 01 Oct 2020 10:37:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNzhJ-0004Uc-8L for emacs-orgmode@gnu.org; Thu, 01 Oct 2020 10:36:41 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.23]:8216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNzhF-0001Vx-2n for emacs-orgmode@gnu.org; Thu, 01 Oct 2020 10:36:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1601562990; s=strato-dkim-0002; d=axelkielhorn.de; h=Message-Id:In-Reply-To:To:References:Date:Subject:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=WYn752xNjbMmis1QjTBcYFkQVYqWKzMbXLdmgrz0uuI=; b=tQmbCKQdSPZ7JM3s+3w1JXyHIFyZMkRWoNdr10LqHTO8Mwhxm5gkKJjSpCZd/hBCV9 0bMvZymOEbdM2rRQY6IMGEyiCofUVx30b8LGOMb6cI4yTxbLxsDFCPHuL/HNEoxamO1v FenXEjaxLfXlSnBOX3mEzRZwWIw7/NnmL9bCMgzLo23YtIXQz+tWf98f2GO2dLnGaJF1 vqKCf8mE4oeoZKn9O1MKb52FRYKXjzLIlK2iU0ct4XZRoHGcZNfiyhdcwy2oGpTLXIDF Yo/uXt/1n+rX7WHqWoDKK4d5/nal5S64icaqe+phrPBR3Uk0UPCrZoRWbBD/rb56rDD8 SzyQ== X-RZG-AUTH: ":OGkcVUGwfvMLvkVusQ1g9gJQt7WL23nhrqI2F4F9RuxzbAQePvTSV0cr4JoWPbaGO12LoLB8YxhDTzhvdwFfJ3zgH3amlls+Gd2R465GLw==" X-RZG-CLASS-ID: mo00 Received: from [IPv6:2003:cc:ff08:5500:acef:bfa1:3535:ce0d] by smtp.strato.de (RZmta 47.1.9 AUTH) with ESMTPSA id 404113w91EaT5LS (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate) for ; Thu, 1 Oct 2020 16:36:29 +0200 (CEST) From: Axel Kielhorn Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Re: Two tables with same data but different sorting Date: Thu, 1 Oct 2020 16:36:28 +0200 References: <65644810-71B5-412C-9E13-ADC15CA80CF6@axelkielhorn.de> To: Org-Mode Mailing List In-Reply-To: Message-Id: <3CB77DC4-121C-43D9-A814-16FB1DE307B1@axelkielhorn.de> X-Mailer: Apple Mail (2.3445.9.7) Received-SPF: none client-ip=85.215.255.23; envelope-from=org-mode@axelkielhorn.de; helo=mo4-p00-ob.smtp.rzone.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/01 10:36:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=axelkielhorn.de header.s=strato-dkim-0002 header.b=tQmbCKQd; 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-Spam-Score: 0.49 X-TUID: 5h6ZhHUhDHjO > Am 01.10.2020 um 14:21 schrieb John Kitchin : > > You could do something like this: > > > * Table 1 > > #+name: table1 > | Manufacturer | Name | Price | > |-----------------+-------------+-------| > | ACME | super cheep | 25 $ | > | Roadrunner Inc. | Kaboom | 27 $ | > | ACME | cheep | 30 $ | > > #+RESULTS: resorted > | Manufacturer | Name | Price | > |-----------------+-------------+-------| > | ACME | super cheep | 25 $ | > | ACME | cheep | 30 $ | > | Roadrunner Inc. | Kaboom | 27 $ | > > ** Code for resorting > > #+name: resorted > #+BEGIN_SRC emacs-lisp :var data=table1 :colnames t > (sort data (lambda (row1 row2) (string< (first row1) (first row2)))) > #+END_SRC > > John > Thanks John, this is really powerful. I changed =first row1= to =elt row1 6= since my real table is more complex. (Again I learned a little bit more about elisp.) Greetings Axel