From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Date: Sun, 24 Oct 2021 05:47:07 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2824"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51371@debbugs.gnu.org To: dalanicolai Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 24 14:48:18 2021 Return-path: Envelope-to: geb-bug-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 1mecvA-0000Xx-AY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Oct 2021 14:48:16 +0200 Original-Received: from localhost ([::1]:41842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mecv8-0006yd-PT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Oct 2021 08:48:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mecuw-0006y9-8e for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 08:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mecuv-00031v-WB for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 08:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mecuv-0001Vx-Us for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 08:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 12:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.16350796345573 (code B ref 51371); Sun, 24 Oct 2021 12:48:01 +0000 Original-Received: (at 51371) by debbugs.gnu.org; 24 Oct 2021 12:47:14 +0000 Original-Received: from localhost ([127.0.0.1]:38127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mecuA-0001Rp-G9 for submit@debbugs.gnu.org; Sun, 24 Oct 2021 08:47:14 -0400 Original-Received: from mail-pf1-f173.google.com ([209.85.210.173]:34637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mecu9-0001RW-OF for 51371@debbugs.gnu.org; Sun, 24 Oct 2021 08:47:14 -0400 Original-Received: by mail-pf1-f173.google.com with SMTP id d5so8134824pfu.1 for <51371@debbugs.gnu.org>; Sun, 24 Oct 2021 05:47:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=p0P7WLzVfkg8RiY0QOD+Q6k54SmR3waabDHV0BpciCY=; b=Hc18pu/9ozIa1o4ZUoBzCbe2OgznnCP6s7c8d4uhRKvZp6p79et2B7Bk4QTzbKIgJH yb2gahJVqyeDrk4BiDmOzuyc4KEIExlzwBSmKnsGjAcHyKLTE/GUvU12cy2ifZj4/L24 uw9RCxlMa0c5mV2bvITUFGwpe8ornhzIzIz2Gw7/s8TjsslhepsJzao93/BEGuhDzFMF SL0Ju3W853mG6VUIaM4zVdeHFKIKm9b3XFZvYLP+bO/B4zVz8YOWA7BxKPMOXAXSvxVR TP6Cz/in44G95MZnyxyLpDghXQFtab427j4vEfel+jwks6VSZ0aGu2xT39RtOFiRdW/u rESQ== X-Gm-Message-State: AOAM530WEVyLD+K1NmyOh6+yDYtBG075dMoR9Nv0o0lpH9FbWvNPeK+t eG/F1jhJVpqufDG4bXtbOCdXmYDNf3x+MjhISqFN1ihg X-Google-Smtp-Source: ABdhPJzIXuRPbe1gyiCQLuXZU6LqB+D7RVQQRD85+s3D3BnMfI08biD/i2uKji7Wb0JeT++NsTzNSWEVv+VLNjHJDcY= X-Received: by 2002:aa7:99c3:0:b0:47b:e21d:7315 with SMTP id v3-20020aa799c3000000b0047be21d7315mr4501528pfi.35.1635079628123; Sun, 24 Oct 2021 05:47:08 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 24 Oct 2021 05:47:07 -0700 In-Reply-To: (dalanicolai@gmail.com's message of "Sun, 24 Oct 2021 11:35:47 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218107 Archived-At: dalanicolai 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?