From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: TIL about string-rectangle Date: Thu, 31 Dec 2020 15:03:43 +0700 Message-ID: References: <87a6tvkmaf.fsf@passepartout.tim-landscheidt.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33388"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help GNU Emacs , Tim Landscheidt To: Skip Montanaro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 31 09:04:31 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kuswg-0008an-Ks for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 31 Dec 2020 09:04:30 +0100 Original-Received: from localhost ([::1]:53922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuswf-0006qj-NP for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 31 Dec 2020 03:04:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuswB-0006qZ-DP for help-gnu-emacs@gnu.org; Thu, 31 Dec 2020 03:03:59 -0500 Original-Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]:38246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kusw7-0008CE-Uy for help-gnu-emacs@gnu.org; Thu, 31 Dec 2020 03:03:59 -0500 Original-Received: by mail-ua1-x933.google.com with SMTP id j59so5950790uad.5 for ; Thu, 31 Dec 2020 00:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fnK8ZpmgVtG0NrSKZsRR8cdJw0uWFFxzFS+Q6ztyJEo=; b=Ua8v89UVGwy+7tHW1pLusACaIP4Yj5RWdVn7bQE7HGYvYyNqUdV6LBcf3iIhQ/4dG6 B1G3hCiCdDoLlTF6TsPVcWmHF6ChiMVTYxcfYdHE4FCJtpnliLLvCsHxuCLuLZhZgIFR tNvc3aMGvor3JjDTJwcdhloshm/BRYb+x4VF+8IUprOjlSa0GDPU+rP2kV4qTRh0TiJC S0Hr0SZYutasKgXMzF7N0Hh1q79nCxhbTMzwsEliA/9AbfG7l9pDbbnJC66O/1C7SZdu dRcwtVL0LrD6akHv3sQXYpyqsTRMu+QfHwxm56/7yT9e9Wo6QHvbD2jIxYVSURHJ35Cj bJeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fnK8ZpmgVtG0NrSKZsRR8cdJw0uWFFxzFS+Q6ztyJEo=; b=pu+FyCtG9ANX4LaJdjN9yGmrHWbrVQ/Z8HjOL8qd1GhRrPdgHo93ssGwxRPl4CnelD 0fj7W92PAZiTfe8QH9E9QGGEMFC+6Eid8RYFWERvkt88UoastHhI7DLHU/3CkesgR84J +oCcNOikKCioG60Xv+x5lgadKf6Wg0pH18THLGUv2xgK//J0ND7DAe4+lUn+qbAXxq5O VFchru68FWUztlZJsdTeOmCZy61i8i1+puNkEtKgW5OanJSk07L+RHpuLcroPRzJ550d OI3gKRzEYVasqiRLO93GSc+kE9FqVxO0aPdJVb/iNu1DzSE2meydFBqSIuz8izDDEWl4 I8yA== X-Gm-Message-State: AOAM532TdxQrhWDUZC2cucnDbfd/Gzq/C2scLqFVmsgFa9hZuOVF/9pa C+lKB7vxttUuu8yNhwpPJYw31r0UKLqT6nQ0F5s= X-Google-Smtp-Source: ABdhPJwfYoKjy91WZ/ZPHKXK+LiMJJnvozAtI5SDWM0xAd+yFEOwr7gXXt7owrIqpitDRRWj7h72VTEyMKWVGM0I0GU= X-Received: by 2002:ab0:5542:: with SMTP id u2mr26148547uaa.41.1609401834475; Thu, 31 Dec 2020 00:03:54 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::933; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x933.google.com 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, FREEMAIL_FROM=0.001, 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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126933 Archived-At: On Thu, 31 Dec 2020 at 05:13, Skip Montanaro wrote: > > For complex sorts, I once wrote a function that enhances > > sort-regexp-fields (and needs a docstring and comments that > > I could understand after eight years): ... > > Thanks. I've used the Unix sort(1) command for a few decades now. It's > kind of burned into my brain. I know Emacs Lisp is exceedingly > powerful (I used it as my Lisp interpreter as the one and only Lisp > class I took), but sort(1) does just what I wanted here other than not > terminating the third (year) field at the comma. It's kind of hard to > argue with its economy. Regular expressions are quite handy, but also > pretty verbose for this task. You will have an easier time sorting by date if you keep dates in the ISO 8601 format: YYYY-MM-DD.