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: Sat, 30 Oct 2021 08:40:34 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40036"; 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 Sat Oct 30 17:41:21 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 1mgqTx-000AJ4-En for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 17:41:21 +0200 Original-Received: from localhost ([::1]:50762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgqTw-0006Oa-Ey for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Oct 2021 11:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgqTi-0006NL-4W for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 11:41:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgqTh-0007MQ-Rb for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 11:41:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgqTe-0005Ox-81 for bug-gnu-emacs@gnu.org; Sat, 30 Oct 2021 11:41:05 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 51371-submit@debbugs.gnu.org id=B51371.163560844320719 (code B ref 51371); Sat, 30 Oct 2021 15:41:02 +0000 Original-Received: (at 51371) by debbugs.gnu.org; 30 Oct 2021 15:40:43 +0000 Original-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 Original-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 Original-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) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Oct 2021 08:40:34 -0700 In-Reply-To: (dalanicolai@gmail.com's message of "Mon, 25 Oct 2021 23:46:20 +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:218618 Archived-At: 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!