|
From: | Stefan Monnier |
Subject: | Re: Is there any existing solution to move list number backwards, forwards in a list? |
Date: | Fri, 21 Oct 2022 09:13:21 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> Let us say item is number 7 in following list: > > '(1 2 3 4 5 6 7 8 9) > > Then I wish to move item number 7 to different number and renumber all > items so that number 7 becomes number 6 and number 6 comes in the > place of number 7. That was clear (ahem) :-) > Situation is more complex, I suspect so. From where I stand, the normal answer is to change the priority of the relevant object and then to pass your list to `sort` with the appropriate so it re-sorts based on the new priorities. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |