From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Sorting by author name first, then by year Date: Mon, 24 May 2021 13:37:33 +0200 Message-ID: <875yz8jrb6.fsf@web.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11157"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Help Gnu Emacs To: pietru@caramail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 24 13:38:03 2021 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 1ll8uJ-0002nA-9t for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 13:38:03 +0200 Original-Received: from localhost ([::1]:43246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll8uI-0006g0-Cp for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 May 2021 07:38:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll8tw-0006fs-CT for help-gnu-emacs@gnu.org; Mon, 24 May 2021 07:37:40 -0400 Original-Received: from mout.web.de ([212.227.17.11]:35865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll8tt-0004nt-Qy for help-gnu-emacs@gnu.org; Mon, 24 May 2021 07:37:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1621856254; bh=XHy/sfeuIr8Hr5frjfyInEk3XeXZd3+40IuanYasJrU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Acl+BlXb/UjC8mClJF3uxYZ+ovja7hLZrAXScIq1s7UqFeNyKMRnkfK26k5nQcnUV Ae08mJ0hAFC4qvd6O4evKcZyFkc680cpn6MrXmTNtSNsVDr7XmIwM/TlfhAwTmNW9o 1jJSo1I5XRSu5PjNi9CobIH88gme/Pmyd9uUT3R0= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.219.0]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LwqJw-1lMuvt37rU-016PP4; Mon, 24 May 2021 13:37:33 +0200 In-Reply-To: (pietru@caramail.com's message of "Fri, 7 May 2021 00:49:41 +0200") X-Provags-ID: V03:K1:aG9jP9Ws5vg4apTkpZBgNDqJMc16z4e/9FSSo2NmLtdDjd7VYi8 I79gUq2lkBwEZFVutfkWUydVycn6iT82dc6oJvJCrbpInYR9kUTUKoxbSq1icWDolhdzXmh ZQy/jr8nCP9RtNeZL96aRv8TeaqaQslkpbqqr+gEXIRjMAgZG6ijxVJNjEapKzI2gHlHOqQ gRAhvN2hk6dCRO6Lgd5ww== X-UI-Out-Filterresults: notjunk:1;V03:K0:sUp9ri5mFo8=:Q2lSvKE/lhJCLNUafQRkW8 HtQylfKeKqGVAbKFH0y0UBLDJJGVkyLwaQcAogdM9HeXLPqmA6PiuGo2dqqpyoCAXpvjpK6s0 QH/FosF0uKeXhsfKLmNhe4SGnTC/sQiSbOeiMc7VLf1lacyHBr6E5/fLEF7/BakWezeBpA0Be +Z6Zzm5G4/ex263RffvkWxuShaTOBubo9fexouwkubTtrnALRMRJE6uLchUrORDzYhiwtavsO OwPDqn7lBHg9juGKGfY8zNriKcfH03fd6V8wfZdbgZ2AezsvvwTtt0gnI4fgI9GpMb67VXcGp 9VUCySRcG0kG40/CXngFAEjDXlf7CjTv0Ww6leet4Ori+9eD4uoDwzcvnFHyXveDbQzkr1ebD /8qZuSPH5eaOq5EX0QolnDSNTtqBAAXfJLu2vZZ8mJ4lhVQJwF+ZEfSvl6LBFd7Jw0l4vR6iu cfvZeqVQXM0F0636vHrNynNCSIndlJg207fxzyBHynlL9ih5XfvtMrTqoOahy1e4Ub9ISPsHO bBCGhuzIte24DpgHQ1AtZjPhyCsMc8sGuGpaIlq1yJ6+4LHQkyT+nu66drJaILwps+z5ENdBE O0xLnkq+mt+lqzDwKUzt9vG2OAjGs3sHepQKP7xVJYKJiEIxFMNSsummdA1NOIaKUSknOYR3F u2AeBbaLHay2pxcyy7KLlPRiML2n23nI62A9NfEsKASheHDVdwPwQFi9hysdoRUENTjQ9AQPW +xUB6E0na6efQUHoYLfAm7+vaA7SEcTmDvSwhwVbaYuxiW7Obe33HO7qRqUvldp/Hxc0+7YA Received-SPF: pass client-ip=212.227.17.11; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:130173 Archived-At: pietru@caramail.com writes: > I have a texinfo file with blocks as below, sorted first by year, then > by author > surname using strings starting with "bibl-". The contents of each > block are embedded > within "@ifset" and "@end ifset". > > Now I want to sort them, first according to surname, then by year, the > earlier year > put first. > > So I am looking to make a function that could do it. I think `sort-subr' is the function to use. The call could look similar to that in the implementation of `sort-paragraphs' but that command unfortunately doesn't allow to specify a predicate, which you need. Do you know how to write an according predicate? Regards, Michael.