GNU bug report logs -
#51371
28.0.50; [PATCH] Make list-colors-display sorting support general
Previous Next
Reported by: dalanicolai <dalanicolai <at> gmail.com>
Date: Sun, 24 Oct 2021 09:37:01 UTC
Severity: wishlist
Tags: patch
Found in version 28.0.50
Fixed in version 29.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 51371 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The nil (again) without the quote of course
On Sun, 24 Oct 2021 at 15:16, dalanicolai <dalanicolai <at> gmail.com> wrote:
> (@stefan Did not notice it was a group message)
>
> Not really, I think. But if so then I guess we could just call it with
> list-colors-sort set to nil:
> ```
> (let ((list-colors-sort 'nil))
> (list-colors-display (mapcar #'car shr-color-html-colors-alist)
> nil))
> ```
>
>
>
> On Sun, 24 Oct 2021 at 14:47, Stefan Kangas <stefan <at> marxist.se> wrote:
>
>> dalanicolai <dalanicolai <at> gmail.com> writes:
>>
>> > The snippet passes colors form the shr-color-html-colors-alist variable
>> > to list-colors-display. However, currently, despite the docstring
>> > suggesting to me something different, the list-colors-display function
>> > only applies its sort functionality if no list is passes as argument.
>> > I don't see a good reason for that limitation, because the limitation is
>> > set using a when condition, while the sort function works perfectly fine
>> > with custom color-lists (e.g. try the snippet above).
>> >
>> > So this patch simply removes the (when (null list)) condition, and
>> > passes the list, if given, to the sort functionality.
>> > Adapting the docstring is not necessary as it already suggests that
>> the sort functionality works in general.
>>
>> Is there any situation in which you wouldn't want the list sorted?
>>
>
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.