From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 09:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 51371@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163506817125411 (code B ref -1); Sun, 24 Oct 2021 09:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Oct 2021 09:36:11 +0000 Received: from localhost ([127.0.0.1]:37941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meZvG-0006bm-If for submit@debbugs.gnu.org; Sun, 24 Oct 2021 05:36:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:56056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meZvC-0006bc-Kb for submit@debbugs.gnu.org; Sun, 24 Oct 2021 05:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meZvC-0006qQ-4j for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 05:36:06 -0400 Received: from mail-ua1-x92a.google.com ([2607:f8b0:4864:20::92a]:38541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meZv7-0006Vu-Ay for bug-gnu-emacs@gnu.org; Sun, 24 Oct 2021 05:36:05 -0400 Received: by mail-ua1-x92a.google.com with SMTP id o26so2298366uab.5 for ; Sun, 24 Oct 2021 02:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=FYThYKl1EiJHL+lpxuyaSvuKEPL8K42WCXtqu3T8xpY=; b=E3OKIC9qe6JQAFlI2qwnxJ/lvqR2T3EbI7qJwlF8gMS7/HfTxvkMtLAQzU0WHQDeIM KPAhatgcZCZ4EupjirzUlOZY8pUvFTlr5Kvezq2MA1l7aFLF47kRyd/1/wQ78tg6Xa4J 7udhmLmDU5tjlv51B8V3JL8+ZeuyDHg59lHwPL7yjgJ3RUtTNu1juqaNLPebXPfs4YM8 jvsIIDc7uCN9KD3wji3MYefFiVEH7QW2oq7lvXvTt7uy4QWIIY1+AUGUki+8qFxejk+H tdMB4wMKL0absOiGtLDUfP+lpSJaS4EpcIoZFd8cHH+xRKDXqX3PpcmFe46h4O5l4S6f 7Q1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=FYThYKl1EiJHL+lpxuyaSvuKEPL8K42WCXtqu3T8xpY=; b=2HCBeLKJshRcWwnmAJyHq48OSfcfg+TjfYnpl3unrSNAE5xoOrReE51ljRZo+q9mx/ v4vwx75n8T9wMUHuSWY6FjY6QEUq/8K0NdadMKJacEnLls37YtNqcfuEA69S/SVr3yrK Dc7ooIG3YRXKCg0RkUOtZpYKoEYiUnTpYsH9FGcKfh5MeQvacVETZyhLs3ER+/hf0ZRE 0DMlWp68EFPN97etLUarqcOHevB3fa/GlEZd/nDP9VsBf8UaiDoh6rd2rW3/anOIX6nD wbgKQq6N6mp1Qoj+BO9C+S5l+RRWQ9ClUphYrhua5IUQTJcLG+e4FD/HMfx60SewDfAj 1sqw== X-Gm-Message-State: AOAM533M7ogbWjhGsJCOlTQkn/2ksJUWJi4aLvvuMsCuZN/A3eNHmU/9 znhnXeAg+abKKcCPoETZ949lIrVjVDNn8uz5AS/eilns92w81w== X-Google-Smtp-Source: ABdhPJyjpzOqn0QKHdLE74ICK9WtaE/7purX421NHpoCqcyLXEI5hSDj9AnvCebCo6VO/eH7lAfuqSy3ex7+INxgKiE= X-Received: by 2002:a9f:2429:: with SMTP id 38mr9799829uaq.109.1635068159025; Sun, 24 Oct 2021 02:35:59 -0700 (PDT) MIME-Version: 1.0 From: dalanicolai Date: Sun, 24 Oct 2021 11:35:47 +0200 Message-ID: Content-Type: multipart/mixed; boundary="000000000000cd758705cf15f82a" Received-SPF: pass client-ip=2607:f8b0:4864:20::92a; envelope-from=dalanicolai@gmail.com; helo=mail-ua1-x92a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000cd758705cf15f82a Content-Type: multipart/alternative; boundary="000000000000cd758405cf15f828" --000000000000cd758405cf15f828 Content-Type: text/plain; charset="UTF-8" Motivation for this patch is that I would like to use the following code snippet in https://elpa.gnu.org/packages/sketch-mode.html. ``` (let ((list-colors-sort 'hsv)) (list-colors-display (mapcar #'car shr-color-html-colors-alist) nil)) ``` 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. With this patch, I can offer a great sorted color selection menu, providing only colors supported by SVG. In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-09-06 built on daniel-fedora Repository revision: c4724add006e62b81f847937db56335a81bdcc74 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Fedora 34 (Workstation Edition) Configured using: 'configure --with-mailutils --with-cairo --with-modules --with-pgtk --with-native-compilation' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 67179 6847) (symbols 48 6625 0) (strings 32 19309 1709) (string-bytes 1 660631) (vectors 16 13095) (vector-slots 8 260900 12229) (floats 8 22 32) (intervals 56 225 0) (buffers 992 11)) --000000000000cd758405cf15f828 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Motivation for this = patch is that I would like to use the following code
<= br>
```
(let ((list-colors-sort 'hsv))
=C2=A0 (list-colors-display (mapcar #'car= shr-color-html-colors-alist)
```

The snippet = passes colors form the shr-color-html-colors-alist variable
to list-colors-display. However, currently,= despite the docstring
sugge= sting to me something different, the list-colors-display function
=
only applies its sort functionality i= f no list is passes as argument.
I don't see a good reason for that limitation, because the limitat= ion is
set using a when cond= ition, 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 li= st, if given, to the sort functionality.
Adapting the docstring is not necessary as it already suggests tha= t the=C2=A0 sort functionality works in general.

With t= his patch, I can offer a great sorted color selection menu,
providing only colors supported by SVG.
=


In GNU Ema= cs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo versi= on 1.17.4)
=C2=A0of 2021-09-= 06 built on daniel-fedora
Re= pository revision: c4724add006e62b81f847937db56335a81bdcc74
Repository branch: master
Windowing system distributor 'The X.Org F= oundation', version 11.0.12011000
System Description: Fedora 34 (Workstation Edition)

Configured using:
=C2= =A0'configure --with-mailutils --with-cairo --with-modules --with-pgtk<= br>
=C2=A0--with-native-compilat= ion'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETT= INGS HARFBUZZ JPEG
JSON LCMS= 2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SEC= COMP SOUND THREADS TIFF
TOOL= KIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important se= ttings:
=C2=A0 value of $LAN= G: en_US.UTF-8
=C2=A0 value = of $XMODIFIERS: @im=3Dnone
= =C2=A0 locale-coding-system: utf-8-unix

Major mode: Lis= p Interaction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t

Load-path shadows:
None f= ound.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-load= defs
rfc822 mml mml-sec epa = derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-ma= cs
eieio-loaddefs password-c= ache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-deco= de mm-bodies
mm-encode mail-= parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm= -util mail-prsvr mail-utils
= iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win = term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode= prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse ji= t-lock
font-lock syntax font= -core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan= thai tai-viet lao
korean ja= panese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese co= mposite charscript charprop
= case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces= cus-face macroexp files
win= dow text-properties overlay sha1 md5 base64 format env code-pages
=
mule custom widget hashtable-print-re= adable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting=
cairo move-toolbar gtk x-to= olkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 67179 6847)
=C2=A0(symbols 48 6625 0)
=C2=A0(strings 32 19309 1709)
=C2=A0(string-bytes 1 660631)
<= /div>
=C2=A0(vectors 16 13095)
=C2=A0(vector-slots 8 260900 12229)=
=C2=A0(floats 8 22 32)
<= /div>
=C2=A0(intervals 56 225 0)
=C2=A0(buffers 992 11))
=

--000000000000cd758405cf15f828-- --000000000000cd758705cf15f82a Content-Type: text/x-patch; charset="US-ASCII"; name="facemenu.patch" Content-Disposition: attachment; filename="facemenu.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kv51cs0a0 ZGlmZiAtLWdpdCBhL2xpc3AvZmFjZW1lbnUuZWwgYi9saXNwL2ZhY2VtZW51LmVsCmluZGV4IDc0 MTdiYjEyMDMuLmQ0ZDY5NzUwNjEgMTAwNjQ0Ci0tLSBhL2xpc3AvZmFjZW1lbnUuZWwKKysrIGIv bGlzcC9mYWNlbWVudS5lbApAQCAtNTQyLDggKzU0Miw3IEBAIGxpc3QtY29sb3JzLWRpc3BsYXkK IGNvbG9ycyB0aGF0IHRoZSBjdXJyZW50IGRpc3BsYXkgY2FuIGhhbmRsZS4gIEN1c3RvbWl6ZQog YGxpc3QtY29sb3JzLXNvcnQnIHRvIGNoYW5nZSB0aGUgb3JkZXIgaW4gd2hpY2ggY29sb3JzIGFy ZSBzaG93bi4KIFR5cGUgXFw8aGVscC1tb2RlLW1hcD5cXFtyZXZlcnQtYnVmZmVyXSBhZnRlciBj dXN0b21pemluZyBcCi1gbGlzdC1jb2xvcnMtc29ydCcgdG8gcmVkaXNwbGF5IGNvbG9ycyBpbgot dGhlIG5ldyBvcmRlci4KK2BsaXN0LWNvbG9ycy1zb3J0JyB0byByZWRpc3BsYXkgY29sb3JzIGlu IHRoZSBuZXcgb3JkZXIuCiAKIElmIHRoZSBvcHRpb25hbCBhcmd1bWVudCBCVUZGRVItTkFNRSBp cyBuaWwsIGl0IGRlZmF1bHRzIHRvIFwiKkNvbG9ycypcIi4KIApAQCAtNTUxLDggKzU1MCw4IEBA IGxpc3QtY29sb3JzLWRpc3BsYXkKIGZ1bmN0aW9uIHRvIGNhbGwgZWFjaCB0aW1lIHRoZSB1c2Vy IHR5cGVzIFJFVCBvciBjbGlja3Mgb24gYQogY29sb3IuICBUaGUgZnVuY3Rpb24gc2hvdWxkIGFj Y2VwdCBhIHNpbmdsZSBhcmd1bWVudCwgdGhlIGNvbG9yIG5hbWUuIgogICAoaW50ZXJhY3RpdmUp Ci0gICh3aGVuIChhbmQgKG51bGwgbGlzdCkgKD4gKGRpc3BsYXktY29sb3ItY2VsbHMpIDApKQot ICAgIChzZXRxIGxpc3QgKGxpc3QtY29sb3JzLWR1cGxpY2F0ZXMgKGRlZmluZWQtY29sb3JzKSkp CisgICh3aGVuICg+IChkaXNwbGF5LWNvbG9yLWNlbGxzKSAwKQorICAgIChzZXRxIGxpc3QgKGxp c3QtY29sb3JzLWR1cGxpY2F0ZXMgKG9yIGxpc3QgKGRlZmluZWQtY29sb3JzKSkpKQogICAgICh3 aGVuIGxpc3QtY29sb3JzLXNvcnQKICAgICAgIDs7IFNjaHdhcnR6aWFuIHRyYW5zZm9ybSB3aXRo IGAoY29sb3Iga2V5MSBrZXkyIGtleTMgLi4uKScuCiAgICAgICAoc2V0cSBsaXN0IChtYXBjYXIK --000000000000cd758705cf15f82a-- From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general 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 To: dalanicolai Cc: 51371@debbugs.gnu.org Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.16350796345573 (code B ref 51371); Sun, 24 Oct 2021 12:48:01 +0000 Received: (at 51371) by debbugs.gnu.org; 24 Oct 2021 12:47:14 +0000 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 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 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) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 24 Oct 2021 05:47:07 -0700 From: Stefan Kangas In-Reply-To: (dalanicolai@gmail.com's message of "Sun, 24 Oct 2021 11:35:47 +0200") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sun, 24 Oct 2021 05:47:07 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) 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? From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 24 08:47:09 2021 Received: (at control) by debbugs.gnu.org; 24 Oct 2021 12:47:09 +0000 Received: from localhost ([127.0.0.1]:38124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mecu5-0001RY-Am for submit@debbugs.gnu.org; Sun, 24 Oct 2021 08:47:09 -0400 Received: from mail-pj1-f54.google.com ([209.85.216.54]:36853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mecu4-0001Qj-4y for control@debbugs.gnu.org; Sun, 24 Oct 2021 08:47:08 -0400 Received: by mail-pj1-f54.google.com with SMTP id v1-20020a17090a088100b001a21156830bso2771457pjc.1 for ; Sun, 24 Oct 2021 05:47:08 -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:mime-version:date:message-id:subject:to; bh=99RjcheN6v1DalRujJ0j88gcbzRnbFfbFvs7pgKttmo=; b=KnXyqjXwlyWcNZFjUjmfJtz223TjQHJ/qenJhn0fl6Y2qNyWm6rNrEAeYZRroCxxve 8G7jmQiL0Kc330c3t1uifyLWV7TcCrwth9lc3naZLza5EDtrIe2q7ynQwDqqq6TV/0je 2RMasS1yqU1iTCJGRn86hRBUZuaXyjJZGN/DHw/FoAQFJRHl8N3edB0+Q2DynzcETGx7 9pPagFQ1Yrvx7pXHcCfukq7cAwB90ku63Wi/XQp3K4tgU5siiFOdJw4UdIrwjuK93R7V Ak3YXE1108tSxXcwmsS3x/joI/57c8w34ihME4cntLHOQrie2AaWE2AF04Ny27rkeL5A 1SZw== X-Gm-Message-State: AOAM533BV3Ed6LHPzd24A4pe0JUcRHFENJ82DRVQ88a47rxear4FHgs9 G2Z3kDsehlg4R2baWDjSv8avoCcWGjwKafWm/5oV95hC X-Google-Smtp-Source: ABdhPJzi3BedGzSjM5diwXR/d7iyZZ4wQJTWQyCc24rMER6vxoyomSNL9e7sMbIZGuQ85KPHaSTaL0LNf1SZ/AFGbl4= X-Received: by 2002:a17:902:b691:b029:12d:2b6:d116 with SMTP id c17-20020a170902b691b029012d02b6d116mr10314973pls.71.1635079622495; Sun, 24 Oct 2021 05:47:02 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 24 Oct 2021 05:47:02 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 24 Oct 2021 05:47:02 -0700 Message-ID: Subject: control message for bug #51371 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) severity 51371 wishlist quit From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 13:17:02 +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 To: Stefan Kangas Cc: 51371@debbugs.gnu.org Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.163508139121484 (code B ref 51371); Sun, 24 Oct 2021 13:17:02 +0000 Received: (at 51371) by debbugs.gnu.org; 24 Oct 2021 13:16:31 +0000 Received: from localhost ([127.0.0.1]:38172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medMU-0005a8-Fb for submit@debbugs.gnu.org; Sun, 24 Oct 2021 09:16:30 -0400 Received: from mail-ua1-f41.google.com ([209.85.222.41]:42500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medMS-0005UH-D0 for 51371@debbugs.gnu.org; Sun, 24 Oct 2021 09:16:28 -0400 Received: by mail-ua1-f41.google.com with SMTP id b4so4624509uaq.9 for <51371@debbugs.gnu.org>; Sun, 24 Oct 2021 06:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NnL2z7lw1MIM9IH8GNlkzOqXFsq0MZ/Fv9TSc5AwiNc=; b=q3XmmwPXAo0MIOSlGtHrfiVy0puK8em1ylIf+AZHi5zRntCz+VLestYZ2uAzHvuHsa UqokUFWO1MKGf59liFw0caNhlSoxU5Yed3ke1yFiZGxv8FUa39RywfvWvna4Q6pWFrD0 A94dsWCJdO2doEYnitjED1AXlKDlyAXuqE+UD20HrwY+0+mmL9JRRvMZwkFJ+toHJaeb SLNVEQgI8eKQBDNzJZSFNKrc/h36IAodWFnKkYiJZoCDTFKxcAkyy57lC56hxmiB/a7R uqbktn1x5IVE09huoNPkXSqYx1MDtZQulz9dXhRN/C3esxJqnIDoWXqMR9Ba58r3fiCU +RqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NnL2z7lw1MIM9IH8GNlkzOqXFsq0MZ/Fv9TSc5AwiNc=; b=V01PssN0gZVXuqVnsXmGW67GzWGIpwufOWRZ/VwlPhKSCT+L9rXh6je/yfRDmC8JeA 4OqRMOax47K3Qw3DO4CgbJXCQEvDKYQ0X3sUP2ZGAvI7TvHnlaCDcdLCk/eITAeDvRuu nDp88wzMaelh2mdrVdj9G3gI5J+9xnLb9I+1BfyLiygpH0AX/MbzH+JxLF1YwhIP393A z15ICyJesGv2sSN55IR4XqhZVNSx0TGO4CAIU/n8X/T8WfeVN+LlcTB6qk1pPYxs40HS uAdzpA6U7ZNl32hzp2qG4QxTvr7J1255Ydwmvgv6C7AsVzTSOL0Mt1L07ld2eDmceP5P gkoQ== X-Gm-Message-State: AOAM5304e1kvEChg+W9WFIZDICratwto5qDWLEA934W9FZjgKKIAUexb tvpCGOf3drgrLo/+oiNTBcUWWjCuL7uSwRgm+yw= X-Google-Smtp-Source: ABdhPJxeXkn2RLHnP8PQxmPvJoM9OItb/7bZjl5qy8pEYJBSqRnrrBQ0Ov4ceVDwowyuni1qUeMNofRyrqc9CEuMoB0= X-Received: by 2002:a05:6102:3ec3:: with SMTP id n3mr10041248vsv.48.1635081383036; Sun, 24 Oct 2021 06:16:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: dalanicolai Date: Sun, 24 Oct 2021 15:16:12 +0200 Message-ID: Content-Type: multipart/alternative; boundary="00000000000003cc3c05cf190d78" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000003cc3c05cf190d78 Content-Type: text/plain; charset="UTF-8" (@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 wrote: > 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? > --00000000000003cc3c05cf190d78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
(@stefan Did not notice it was a group message)
=

Not really, I think. But if so then I guess we cou= ld just call it with list-colors-sort set to nil:
```
(= let ((list-colors-sort 'nil))
=C2=A0 (list-colors-display (mapcar #&= #39;car shr-color-html-colors-alist)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil))
```



On Sun, 24 Oct 2021 at 14:47, Stefan Kang= as <stefan@marxist.se> wrote= :
dalanicolai &l= t;dalanicolai@gm= ail.com> writes:

> The snippet passes colors form the shr-color-html-colors-alist variabl= e
> 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.<= br> > I don't see a good reason for that limitation, because the limitat= ion is
> set using a when condition, while the sort function works perfectly fi= ne
> 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 th= e=C2=A0 sort functionality works in general.

Is there any situation in which you wouldn't want the list sorted?
--00000000000003cc3c05cf190d78-- From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 13:20:03 +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 To: Stefan Kangas Cc: 51371@debbugs.gnu.org Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.163508154325298 (code B ref 51371); Sun, 24 Oct 2021 13:20:03 +0000 Received: (at 51371) by debbugs.gnu.org; 24 Oct 2021 13:19:03 +0000 Received: from localhost ([127.0.0.1]:38176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medOx-0006Zx-2e for submit@debbugs.gnu.org; Sun, 24 Oct 2021 09:19:03 -0400 Received: from mail-vk1-f174.google.com ([209.85.221.174]:37791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1medOr-0006ZP-Ok for 51371@debbugs.gnu.org; Sun, 24 Oct 2021 09:19:01 -0400 Received: by mail-vk1-f174.google.com with SMTP id j12so3853255vka.4 for <51371@debbugs.gnu.org>; Sun, 24 Oct 2021 06:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TuyNnIpO/7RHokArf+AmE5n586nVSs/Uon57O4q93eU=; b=HUbSa3a8rZ906YCCRdm09uhFvfBVS9bftHR//wx+kyFyza4lNViTPUyeyO6JXZSZq6 LN/28j13/CB+Tms5ToOmkrnOeVXF4J/QlrNgOGUTf5mVacyqTtReJp0T70sdzJ37+NN2 zFXZXCncMaHcn099+K+PPlSryHAhSPVMT5exjdjC3Lw3DhH831VY32KsqAq9ISHTPKbB 3ImFnkzeoXeoxfsXjaRzZeIP2/lJ5Ru3n8G97cOaqLDKKFsvYvH24AOcRsgUQUHXo/WJ Do5r+zsXOe30BR87nDvRGMXL6oN3Hmo86a2uXAVFAG3m1AS9dXN5lgwimozWGTBpQncz Ekuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TuyNnIpO/7RHokArf+AmE5n586nVSs/Uon57O4q93eU=; b=egW+8w+h6aCs/iLcq0JrHhIBmP8kWsMbWcZwvReACEz/q3KHSWa+EmrsvxJ2fvKe9G 8YDCag9NjuhJBKV0YEtCqbyzGM46t2OYvpjZaxpTS0I7FrMnAJDJJiN8Q6E1++rR1y7f ha7/8h4kboLprSIok9XsGD4EiYbdzBH9ZNw2olB0T6PUz43BqvnmsgIvfU6oamjPZ51z ynVJb8rLXs5zDIYmCDOZqJ07m+Qonz02Bu+j1S9/SPDaV6TSRVnx3v5cpKLqCWVwME6h +gJ0kxT6rrk9tviEY/0WcMUuXwUb+mDb3WH9KFJ6NZaDfkZVR0ceVfEW69sfrBMApcmS L5IQ== X-Gm-Message-State: AOAM530/M/Ci/GwY2AirxC8LeG3KxFLrjVGftdZI7MMDGH3t3yR9Ultj 1i1mZH1mtKrC9iI+3kLlg8GbSP6iF4QHVYwrOq4= X-Google-Smtp-Source: ABdhPJwzzoRiSsCxFem1H+uvOoXv2Pj9QlQHrn5pqrb+FWlvrUNZyEtN3TtPUQuu2E+YhUeBrJ7R2H3UibdRBJ7Sn+w= X-Received: by 2002:a1f:f8c5:: with SMTP id w188mr5614278vkh.5.1635081531372; Sun, 24 Oct 2021 06:18:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: dalanicolai Date: Sun, 24 Oct 2021 15:18:40 +0200 Message-ID: Content-Type: multipart/alternative; boundary="000000000000db383105cf191515" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000db383105cf191515 Content-Type: text/plain; charset="UTF-8" The nil (again) without the quote of course On Sun, 24 Oct 2021 at 15:16, dalanicolai 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 wrote: > >> 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? >> > --000000000000db383105cf191515 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The nil (again) without the quote of course

On Sun, 24 Oct = 2021 at 15:16, dalanicolai <dal= anicolai@gmail.com> wrote:
(@stefan Did not notice it was a gr= oup message)

Not really, I think. But if so t= hen I guess we could just call it with list-colors-sort set to nil:
```
(let ((list-colors-sort 'nil))
=C2=A0 (list-colors-= display (mapcar #'car shr-color-html-colors-alist)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil))
```



On Sun, 24 Oct 2021 at = 14:47, Stefan Kangas <stefan@marxist.se> wrote:
dalanicolai <dalanicolai@gmail.com> writes:

> The snippet passes colors form the shr-color-html-colors-alist variabl= e
> 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.<= br> > I don't see a good reason for that limitation, because the limitat= ion is
> set using a when condition, while the sort function works perfectly fi= ne
> 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 th= e=C2=A0 sort functionality works in general.

Is there any situation in which you wouldn't want the list sorted?
--000000000000db383105cf191515-- From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Oct 2021 22:09:02 +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 To: dalanicolai Cc: 51371@debbugs.gnu.org Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.163511333524982 (code B ref 51371); Sun, 24 Oct 2021 22:09:02 +0000 Received: (at 51371) by debbugs.gnu.org; 24 Oct 2021 22:08:55 +0000 Received: from localhost ([127.0.0.1]:41187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1melfi-0006Us-Qw for submit@debbugs.gnu.org; Sun, 24 Oct 2021 18:08:54 -0400 Received: from mail-pg1-f175.google.com ([209.85.215.175]:37734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1melfh-0006UZ-Aj for 51371@debbugs.gnu.org; Sun, 24 Oct 2021 18:08:53 -0400 Received: by mail-pg1-f175.google.com with SMTP id s136so9030913pgs.4 for <51371@debbugs.gnu.org>; Sun, 24 Oct 2021 15:08:53 -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:mime-version:date :message-id:subject:to:cc; bh=n0POP3WP+Y1xccRVFjz6wRBMwjlCl85G2gklY8EWa+o=; b=Aji2DpWjV4sYSzug0HUJ9m/EejuILNevbOep3Aw+1Lchl923PbcdLaSavvF6V7btaA sGwHfgyAiBR1MuyPHUHAL0L2KyZamz5SRWyyPnGvzUqtubFQh4DTmBa884nE0GQG6x/0 WPu8CirUOZy8d351t/xKB0qsyeNHGVIXZqtLGZLyrsWnMl9zOao054JF40cMEe4tQzNm GGqFHGBgRdtJGb3+1hwsiYWBxdGfnz+pIw2Lm7Xxa4aW0gZJCTDCrKWJtopkM7JYbg5O JjCrChFTyGRic7ojSa2kAA2j9mufYJSG9ENfSHIUsKHLNXkKeViuZFSqjQrLoJkaOqUg M8cA== X-Gm-Message-State: AOAM531S196veNfCkVSFvaeXN68Uf06TwOmkzc6mCw9c7xgWKFx0h7Fx MrlSJ7NEDBO6axlFQjMunPhieoTNR2xvR/EFI50= X-Google-Smtp-Source: ABdhPJwUajGvyQq88qCmKuTasBtva24yvZjSY00p4dnJmARHJ7kklidyEwW/TWL8P3t2D7V6H2hxiizStzFr7LwyvG4= X-Received: by 2002:a05:6a00:1950:b0:44d:9402:3396 with SMTP id s16-20020a056a00195000b0044d94023396mr14535312pfk.70.1635113327779; Sun, 24 Oct 2021 15:08:47 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 24 Oct 2021 15:08:47 -0700 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Sun, 24 Oct 2021 15:08:47 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) dalanicolai writes: > (@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)) ^ no need to quote nil, BTW. > (list-colors-display (mapcar #'car shr-color-html-colors-alist) > nil)) > ``` Do we have any data from e.g. GNU ELPA, MELPA, GitHub or something to back that up? I checked, and we have only one call to `list-colors-display' in the Emacs tree: in `widget-color--choose-action'. Does that function still work as it should with your patch? From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Oct 2021 21:47:02 +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 To: Stefan Kangas Cc: 51371@debbugs.gnu.org Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.163519839915174 (code B ref 51371); Mon, 25 Oct 2021 21:47:02 +0000 Received: (at 51371) by debbugs.gnu.org; 25 Oct 2021 21:46:39 +0000 Received: from localhost ([127.0.0.1]:44515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf7nj-0003wf-0c for submit@debbugs.gnu.org; Mon, 25 Oct 2021 17:46:39 -0400 Received: from mail-ua1-f51.google.com ([209.85.222.51]:46767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf7nh-0003wS-A1 for 51371@debbugs.gnu.org; Mon, 25 Oct 2021 17:46:37 -0400 Received: by mail-ua1-f51.google.com with SMTP id x3so5885560uar.13 for <51371@debbugs.gnu.org>; Mon, 25 Oct 2021 14:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FutOsKUtKhOwgGZAvdQtV6V6n+1nBIra8JNyRC9eA7U=; b=Lx24GDt+hkZdRRN9Ho/D5M20MVoNdTPuxdXdOHwTWjFoKcF7ckNi142dB3aYQZCJMS JD6WbnqKnUIj4IQ6yshEsNl2vJpjvhKCGu7rCWC+f40gHF7RG3x67Ux0WLM590/ZuZk+ Hwys9QagRW2WSdd8DBjnbQmLKZO9QnmSTet8q0gG1TAxlY0D/PgoPBSUqZ3ZzdzVgebz gIL3OnJCiCH/eokPXSBcoZ85HWTLOumFFoRa+HD5VH7td1iQlcqK9i0qLCIQfEr2FUxP BA+IQvKuVnjc4SeZa67/xiUVE3ko1qUMRtFtkiUfjMYoDrxdEm5E0bFNcR0QS9urT3B4 We1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FutOsKUtKhOwgGZAvdQtV6V6n+1nBIra8JNyRC9eA7U=; b=iPBUDRuSZ9DTjdA/IrSbTMMmHS/GwHuCP08OkV8wjTuRj7xRpbUWFZDU7pAeyhqWNP HYJyvuoABY/aCXkcbpxZae6vobGBOMCr/RYT/aBpG3WFVKhyViaZNy5fqMjG3V4GXNtC 5JAub1FgT5GhbW/bnQRTUSmEdYQ/7raEDtHSWdwlZ7Y9jLOUCE0ktqH88Imn1KkLlTFr FRD9bugjlYEmDeRq/BJSFCP2muHIrRf6np7dg2MQhjTiu2AGswfWcryoOTWUOrn9EmkS xeDGDOdi/XieWnDPjmftyeqaoUZ8i+9pei7lUN2HDmIVVIQpbhdQSx1FgH4n8S8gYwIh +Z4Q== X-Gm-Message-State: AOAM530/YVIG+LnF2YEPyQRisdsJTU5inofpXVzAhZpwY9F13v3ZHlTz 5J2cCp/tExMR4QtNj+7/RxQCM2YanYnANg9LeaKeObss4hY= X-Google-Smtp-Source: ABdhPJwWXlRZDUluKh9N8XPsBFY634OFa/wSm/cMs86US12MZ6ckwwR7attWdL18BdTH/oVZGUimleSArhjLlGwj3GI= X-Received: by 2002:ab0:6e8a:: with SMTP id b10mr11023895uav.134.1635198391738; Mon, 25 Oct 2021 14:46:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: dalanicolai Date: Mon, 25 Oct 2021 23:46:20 +0200 Message-ID: Content-Type: multipart/alternative; boundary="00000000000046e57405cf344ba9" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000046e57405cf344ba9 Content-Type: text/plain; charset="UTF-8" I see, it is called when setting the face foreground/background via the customize menu. I've tested it, and it works still perfectly fine (as expected... predicting the expected effects/implications in this case seems quite straightforward to me). On Mon, 25 Oct 2021 at 00:08, Stefan Kangas wrote: > dalanicolai writes: > > > (@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)) > ^ no need to quote nil, BTW. > > (list-colors-display (mapcar #'car shr-color-html-colors-alist) > > nil)) > > ``` > > Do we have any data from e.g. GNU ELPA, MELPA, GitHub or something to > back that up? > > I checked, and we have only one call to `list-colors-display' in the > Emacs tree: in `widget-color--choose-action'. Does that function still > work as it should with your patch? > --00000000000046e57405cf344ba9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I see, it is called when setting the face foreground/= background via the customize menu.
I've tested it, and it wor= ks still perfectly fine (as expected... predicting the expected
e= ffects/implications in this case seems quite straightforward to me).

On Mon, 25 Oct 2021 at 00:08, Stefan Kangas <stefan@marxist.se> wrote:
dalanicolai <dalanicolai@gmail.com> writes:

> (@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))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ^ no need to quote nil, BTW.
>=C2=A0 =C2=A0(list-colors-display (mapcar #'car shr-color-html-colo= rs-alist)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 nil))
> ```

Do we have any data from e.g. GNU ELPA, MELPA, GitHub or something to
back that up?

I checked, and we have only one call to `list-colors-display' in the Emacs tree: in `widget-color--choose-action'.=C2=A0 Does that function = still
work as it should with your patch?
--00000000000046e57405cf344ba9-- From unknown Mon Jun 23 13:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51371: 28.0.50; [PATCH] Make list-colors-display sorting support general Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Oct 2021 15:41:02 +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 To: dalanicolai Cc: 51371@debbugs.gnu.org Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.163560844320719 (code B ref 51371); Sat, 30 Oct 2021 15:41:02 +0000 Received: (at 51371) by debbugs.gnu.org; 30 Oct 2021 15:40:43 +0000 Received: from localhost ([127.0.0.1]:58184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgqTL-0005O6-0h for submit@debbugs.gnu.org; Sat, 30 Oct 2021 11:40:43 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:33596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgqTJ-0005Nl-3Y for 51371@debbugs.gnu.org; Sat, 30 Oct 2021 11:40:41 -0400 Received: by mail-pl1-f177.google.com with SMTP id s24so8855486plp.0 for <51371@debbugs.gnu.org>; Sat, 30 Oct 2021 08:40:41 -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 :content-transfer-encoding; bh=Q0aqiYsZmYyIJtuwD3h1XjNIMSMFPw3BlRMCpH3CE4k=; b=6yBSCZq6KTQrI77xkNZDjo5UvpymIR0zfAW6sgftTxvi7V2VCMq5VgCZUS1j54sNnG iQ93QjIUII9cVhzzXmND81co1d3n18WoUaSNKBTp9KDI5CIljpsI9pD80G4WUYU2pWfn rvb5Yi6D3trjQwWPFvA3qnjxW7G2A8z5oKu3lV6sQznjlrxzBoPVu5g8YNGuKl9uADKk iupkXmNUceGMy2YGD+/8YmpVpZqcA2r+FnXEfYR2kpnyH8ixFGjWks4bGD2CfVqEofdV 0vJ7rFQo+Ru01QWncoDTzVinDG78vRrtln5MXYXAnfzkmtesOdCEKdRUli+7t84PU8xF FbJA== X-Gm-Message-State: AOAM533m/d6kwfDTE4b/PpQkRZ2hQBwbBJxJTaZEJg3RvZ1BXzTdrZfN awL0y26tHA9UfeiarILHjO7kB0QvatJT3HRfmQg= X-Google-Smtp-Source: ABdhPJzufmYaS7vbJD6BDFGrv+MPCvgPJtKGRObJxGXsFs9lomax3CIiZMPgqNtxd87dJA7sQyvnI7xcHgVps1ZoZwk= X-Received: by 2002:a17:90b:3b86:: with SMTP id pc6mr26597231pjb.143.1635608435286; Sat, 30 Oct 2021 08:40:35 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Oct 2021 08:40:34 -0700 From: Stefan Kangas In-Reply-To: (dalanicolai@gmail.com's message of "Mon, 25 Oct 2021 23:46:20 +0200") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sat, 30 Oct 2021 08:40:34 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) close 51371 29.1 thanks dalanicolai writes: > I see, it is called when setting the face foreground/background via the c= ustomize menu. > I've tested it, and it works still perfectly fine (as expected... predict= ing the expected > effects/implications in this case seems quite straightforward to me). OK, I think you are correct, and furthermore a caller can disable sorting themselves by let-binding `list-colors-sort'. So I've pushed your patch to master, after fixing it up to follow our conventions for ChangeLog, etc. (See commit eb07b3d9b3.) However, I skipped this hunk, @@ -542,8 +542,7 @@ list-colors-display colors that the current display can handle. Customize `list-colors-sort' to change the order in which colors are shown. Type \\\\[revert-buffer] after customizing \ -`list-colors-sort' to redisplay colors in -the new order. +`list-colors-sort' to redisplay colors in the new order. If the optional argument BUFFER-NAME is nil, it defaults to \"*Colors*= \". as it would lead to this incorrectly filled docstring, Display names of defined colors, and show what they look like. If the optional argument LIST is non-nil, it should be a list of colors to display. Otherwise, this command computes a list of colors that the current display can handle. Customize =E2=80=98list-colors-sort=E2=80=99 to change the order in which colors = are shown. Type g after customizing =E2=80=98list-colors-sort=E2=80=99 to redispla= y colors in the new order. You had missed that "\" character, which indicates a continued line. In the future, you could send the patch using "git format-patch -1 HEAD" to get a full git patch with your author details already filled in. That makes it easier for us to install. Thanks for the patch!