From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UOZ4LeyVd19vQQAA0tVLHw (envelope-from ) for ; Fri, 02 Oct 2020 21:04:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QOBMKeyVd19rHQAA1q6Kng (envelope-from ) for ; Fri, 02 Oct 2020 21:04:44 +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 D3F3394042F for ; Fri, 2 Oct 2020 21:04:43 +0000 (UTC) Received: from localhost ([::1]:53502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOSEM-00041j-Kv for larch@yhetil.org; Fri, 02 Oct 2020 17:04:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOSDt-00041M-9f for emacs-orgmode@gnu.org; Fri, 02 Oct 2020 17:04:13 -0400 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:46047) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOSDr-0001i3-G1 for emacs-orgmode@gnu.org; Fri, 02 Oct 2020 17:04:13 -0400 Received: by mail-qv1-xf36.google.com with SMTP id cv8so1922257qvb.12 for ; Fri, 02 Oct 2020 14:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version:content-transfer-encoding; bh=drHB/C9e29CtMaEBUgLa87p1PrLLOQPmY1LqsifCu2U=; b=jm5Au6rK69dtwvwxQI1mp9q9V5KbvwgoO3DkRgj967QJmkqfOTGIeRKIWO3nbQhMly fU0FhO19pBgnjlmC0o4x7w0I7mOcgDiiR74344VgozYG6XUu2ouomQ3Ihug5ycX/A6W+ kO8UtRHLIH39ooNr4Y5rX+u4ZeZVVma0CR/QP1rTKrHxs8qr9f53NvPBaK1Axsh3idk4 eB/vBaefiiiAqJTWyKSqPQ97r2N6CAlltnams4Ts8z3FQmGaLNMyTrufVIQjTVD0OrYR mYpRg0kZilyNwZb3pwDnYkclLgH25QCqhj+7qR+vbR7pGYGTA+wM98lkPREzPRIxsOPv GYPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version:content-transfer-encoding; bh=drHB/C9e29CtMaEBUgLa87p1PrLLOQPmY1LqsifCu2U=; b=iz3dgYJGoRWwKhjfu7K/lMtuD/MtAoPVFA7z0P6Kf/cEvJDbl59m/GFH9R1z0HXzkp 5uT00vVykGyq18V60DLARDZeM8a1WZNO+0DjmsTE+IkxwYuK5TQU7DVUtpmJMBOhIsv0 BNx7t+NQemhDDJSVNvcYPslTxJM58n+P0zBREXSrIlDlDAsCD82hrKqyjLlx0YvpuWv6 P0tIpss6z12ELHQQq70nOVqLhV+SygH+2+drIfepyYw604a6vGYWCu16OT6ne6bXDW6z gjm3zsWp/3Ou09eZbz24UPLygRf0ecMpAulbns3P66b0ZKgvMbMtWkO5f/E4u67kiUIB mBwg== X-Gm-Message-State: AOAM530DLjWo8hnc26ht6uR1ri8yrWGBCbIZ4DePVMzA8vS6e0qn2nI8 vmVxz7+Bo3U2QM+mqAmtpFXmO/EPRqsLRQCC X-Google-Smtp-Source: ABdhPJwK7xZst/YJPDzkrgsqpDdQdYBgMUA49ZoLQ7hBKnxDRdbS796JcT9G9JcSNUJ2qPZWsmQjZA== X-Received: by 2002:ad4:47cc:: with SMTP id p12mr3899049qvw.25.1601672649408; Fri, 02 Oct 2020 14:04:09 -0700 (PDT) Received: from Johns-iMac.local ([2601:547:901:1830:9d56:f699:15a8:1df5]) by smtp.gmail.com with ESMTPSA id 205sm1831225qki.118.2020.10.02.14.04.08 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Oct 2020 14:04:08 -0700 (PDT) References: <65644810-71B5-412C-9E13-ADC15CA80CF6@axelkielhorn.de> <3CB77DC4-121C-43D9-A814-16FB1DE307B1@axelkielhorn.de> <58A08721-0871-49F3-B190-F0B1F533C6B7@axelkielhorn.de> User-agent: mu4e 1.4.13; emacs 27.1 From: John Kitchin To: Axel Kielhorn Subject: Re: Two tables with same data but different sorting In-reply-to: <58A08721-0871-49F3-B190-F0B1F533C6B7@axelkielhorn.de> Message-ID: Date: Fri, 02 Oct 2020 17:04:07 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=johnrkitchin@gmail.com; helo=mail-qv1-xf36.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=jm5Au6rK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (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-Spam-Score: 0.09 X-TUID: 13nmy/NA0c8m I don't know of something built in, but dash provides a few things sort of like that: #+BEGIN_SRC emacs-lisp :results raw (-last-item '(a b c)) #+END_SRC #+RESULTS: c #+BEGIN_SRC emacs-lisp :results raw (-slice '(a b c) -1) #+END_SRC #+RESULTS: (c) #+BEGIN_SRC emacs-lisp :results raw (-take-last 1 '(a b c)) #+END_SRC #+RESULTS: (c) surprisingly, it does not seem to support negative indices, but I guess it would not be hard to make a wrapper that does that. Axel Kielhorn writes: >> Am 01.10.2020 um 17:47 schrieb John Kitchin : >> >> Glad it was helpful. You might also try (seventh row1) or (nth 6 row1). = I think it is the same thing, but more obvious to read! > > I agree that =E2=80=9Efirst second =E2=80=A6=E2=80=9C would be easier for= an english speaker. > Having the ordinal number 1 based but the nth number 0 based is irritatin= g (and sadly there is no =E2=80=9Elast=E2=80=9C or =E2=80=9Epenultimate=E2= =80=9C). > > Actually I was looking for something like last element or the element bef= ore the last element. > > (nth -1 row1) for the last row would be fine, but I guess that is the Pyt= hon whispering in my ear. > > Combined with the right :exports I now get what I want. > > Thanks again for this additional information. > > Greetings Axel -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu