What it's doing is this:
((5 . "last text here") (3 . "this item here") (2 . "another item here") (1 . "remaining item") (5 . "another list and more text") (3 . "last element in this list of five, but not entire block"))
Now, I've an idea and I'd love some collaborative help. Shouldn't be too difficult, but my brain is fried from all the above today.
Using the above list and setting it to a variable, I've pulled out all car values and sorted them >, like so:
(setq sortlist (vl-sort (mapcar 'car format) '>))
What I want to now achieve is this:
convert the main list, using sortlist as a compare test, place each element in a list from (in this case) 5-1. Where there are no elements that match, i.e. 4, leave it blank and prepend it with a comma, so it looks something like:
(("remaining item,another item here,this item here,,last text here")
(",,,last element in this list of five but not entire block,,another list and more text"))
Notice, the number 5 element is last and number 1 is first and each block of 5-1 is placed in its own list within the list.
Anybody interested in throwing something together for me, or if you have any other ways to achieve the same results, would you mind putting something together and posting it? Much appreciated. Thanks.