[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sorting by author name first, then by year
From: |
Emanuel Berg |
Subject: |
Re: Sorting by author name first, then by year |
Date: |
Mon, 24 May 2021 14:53:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Michael Heerdegen wrote:
>> 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.
Or `sort-fields' depending on how the data look like.
(defun sort-second-field (beg end)
(interactive "r")
(sort-fields 2 beg end) )
--
underground experts united
https://dataswamp.org/~incal