From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 29 10:58:38 2022 Received: (at submit) by debbugs.gnu.org; 29 Sep 2022 14:58:38 +0000 Received: from localhost ([127.0.0.1]:39275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oduzm-0007t5-GD for submit@debbugs.gnu.org; Thu, 29 Sep 2022 10:58:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:46354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oduzk-0007sx-O0 for submit@debbugs.gnu.org; Thu, 29 Sep 2022 10:58:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oduzc-0007P1-6S for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 10:58:28 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:40515) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oduza-0001ai-2F for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 10:58:27 -0400 Received: by mail-ej1-x631.google.com with SMTP id l14so3340877eja.7 for ; Thu, 29 Sep 2022 07:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=qGH8LvobEWiXbU3fit5nt1tu4n2LYey5CyOxgPCF9bU=; b=W+AFTEtwvajSjR/iZvhmhnEnEuBCuMWoPDvSCrKG3VmoK5e3i8tnV1zN19hbep5S3I dh6eRiPC8d88KMG6Tj0yG6cDuMVDDHaqTn3Vu+OEucV5ssT7/cH8FJAnPGeKith0gXzV 4dWLfRxt2H2yBm5vbI8DbViuSmx1nnD3tcFLxPrx4e5oFXYePbRQMLiQ+kfw/ZuV0vWz jtSoKYzrBB740uyYDYkSkdRgwkwD+JgInSnZ6GVulZXsrGYML3PiaYCyxFXqGVs9HjWI GExXfHRcxkYy7pMXziFOxKdUBvqXBd0u0Yz5YWYMgB+Ketm86xNfxhBSfcAEipYxyr48 IcQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qGH8LvobEWiXbU3fit5nt1tu4n2LYey5CyOxgPCF9bU=; b=taoyfTtwoFky2jHCDb8v2KmQjwF+E56m1Ol8MilDnR8R8lNOaZBcSFgpgIjr5NYP42 E5fc0Iq5rofFN86gGhDYjDNT9gAcqKx4Ly3mJljbVtAs3+qhk8xTAz5mUUURhfsAhapy Cab3hHnEvLwiadxHuK5mzM4Xq5CudTQyNWYG6Qn5hgz0WfPZ4HOFmliyQ+VoRD/5Ior2 zm9gwL5LBL4K3aoN9utMBOIhM8VkRLDLHgkyacFLXlt0Lndal1tWDLNwdfIA0obLPEV4 A0DI/5A7YuAryqOtECACmSGz83LYhBDorGldeCCJ2K/1T2TkbKJt81+ZK0d688JyzI51 M+eQ== X-Gm-Message-State: ACrzQf1M1ru+M756T4z2QFeZGvKH/f57oV3qGJm2WsF8Q+rVlMn5PCXk N/sgmDHMQR5yJWsUVpWt5Cxl9vy2ANM= X-Google-Smtp-Source: AMsMyM5GMX9169lk/tJl20T5642hvq5O+O15bPMtncYC8iP21fl/SPgORhu+qhAUwAFGuRlzTWwHbw== X-Received: by 2002:a17:906:8b81:b0:77e:cd92:9d with SMTP id nr1-20020a1709068b8100b0077ecd92009dmr3030950ejc.484.1664463503303; Thu, 29 Sep 2022 07:58:23 -0700 (PDT) Received: from thuna ([193.205.24.159]) by smtp.gmail.com with ESMTPSA id ez23-20020a1709070bd700b00780a26edfcesm4048971ejc.60.2022.09.29.07.58.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 07:58:22 -0700 (PDT) From: Thuna To: bug-gnu-emacs@gnu.org Subject: [Patch] [GNU ELPA] rcirc-color: Allow recoloring nicks Date: Thu, 29 Sep 2022 16:58:21 +0200 Message-ID: <87mtaiw7le.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=thuna.cing@gmail.com; helo=mail-ej1-x631.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, 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-Debbugs-Envelope-To: submit 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 (--) --=-=-= Content-Type: text/plain I think rcirc-color should allow a nick to be "recolored" with the command `/color nick', instead of signalling an error as it does now. This is useful, for example, when two similar nicks are assigned the same color but there's no specific color you want to reassign to either of them. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-rcirc-color-Select-a-random-color-on-color-nick.patch Content-Description: The patch >From 4462df8aa6c0f9986629d5fab7df43e502552ba3 Mon Sep 17 00:00:00 2001 From: Thuna Date: Thu, 29 Sep 2022 14:12:20 +0200 Subject: [PATCH] rcirc-color: Select a random color on `/color nick' * rcirc-color.el: When `/color' is called with a nick but no color, choose a random color from `rcirc-colors' instead of signalling an error. --- rcirc-color.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/rcirc-color.el b/rcirc-color.el index 2eff965267..7bcc46c91d 100644 --- a/rcirc-color.el +++ b/rcirc-color.el @@ -134,7 +134,9 @@ NICK is the nick for which the new color ist set; if nil, all the nicks in `rcirc-color-mapping' are shown with their corresponding faces. -COLOR is the color to use as the new foreground-color. +COLOR is the color to use as the new foreground-color. If COLOR +is not supplied, a random color from `rcirc-colors' is used +instead. PROCESS and TARGET are the standard arguments for rcirc commands." @@ -149,9 +151,12 @@ commands." rcirc-color-mapping) (rcirc-print process (rcirc-nick process) "NOTICE" target (mapconcat 'identity names " "))) - (unless color - (error "Use what color?")) - (puthash nick (cons 'foreground-color color) rcirc-color-mapping))) + (puthash nick + (cons 'foreground-color + (or color + (elt rcirc-colors + (random (length rcirc-colors))))) + rcirc-color-mapping))) (advice-add 'rcirc-handler-NICK :before #'rcirc-color--handler-NICK) (defun rcirc-color--handler-NICK (_process sender args _text) -- 2.35.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 29 17:02:48 2022 Received: (at 58165) by debbugs.gnu.org; 29 Sep 2022 21:02:48 +0000 Received: from localhost ([127.0.0.1]:39805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oe0gB-0000Tf-LM for submit@debbugs.gnu.org; Thu, 29 Sep 2022 17:02:48 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oe0g6-0000TN-8S for 58165@debbugs.gnu.org; Thu, 29 Sep 2022 17:02:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 26BE3240103 for <58165@debbugs.gnu.org>; Thu, 29 Sep 2022 23:02:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664485356; bh=s8e+PXmqfIhO+SkpprmfpBlC4g0Z+TR6a/3mxMMtk84=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=EGAT073rsSmBL99PwEbVqn/ctlYcrY4QuxxH+5gXLnTTeyNI1E6PtMJ2xl32h1+Xh lplgLB35er5X9sEErBrD2ylDi3lxW+KzSqO26SoJ7egaYI3/HNIPS92/+4dntj3Koi 69lXtkdXiRdYzbMr3Xm8DXjmokHJtPFGJvPHH43FJkSI9wmT+rEaaBu81z+YGyr4KS aKTaf+a8QNHk03DBZ/XPEPIqW+BpivLNqBdlCRC+4mxrtlZfUfdJf48C9j+xSt2Guo M0eVLkcvU+HRM/arVvz6KWKk2WOI1WNRbFrM47XMTnJWMZu5Br4mLoTK5gi+tLJxS4 wGFepKtXuee/g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mdm5l4HlBz6tqs; Thu, 29 Sep 2022 23:02:32 +0200 (CEST) From: Philip Kaludercic To: Thuna Subject: Re: bug#58165: [Patch] [GNU ELPA] rcirc-color: Allow recoloring nicks In-Reply-To: <87mtaiw7le.fsf@gmail.com> (Thuna's message of "Thu, 29 Sep 2022 16:58:21 +0200") References: <87mtaiw7le.fsf@gmail.com> Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Thu, 29 Sep 2022 21:02:27 +0000 Message-ID: <87ill5yjvg.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58165 Cc: 58165@debbugs.gnu.org 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: -3.3 (---) Thuna writes: > I think rcirc-color should allow a nick to be "recolored" with the > command `/color nick', instead of signalling an error as it does now. > > This is useful, for example, when two similar nicks are assigned the > same color but there's no specific color you want to reassign to either > of them. > >>>From 4462df8aa6c0f9986629d5fab7df43e502552ba3 Mon Sep 17 00:00:00 2001 > From: Thuna > Date: Thu, 29 Sep 2022 14:12:20 +0200 > Subject: [PATCH] rcirc-color: Select a random color on `/color nick' > > * rcirc-color.el: When `/color' is called with a nick but no color, > choose a random color from `rcirc-colors' instead of signalling an > error. > --- > rcirc-color.el | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/rcirc-color.el b/rcirc-color.el > index 2eff965267..7bcc46c91d 100644 > --- a/rcirc-color.el > +++ b/rcirc-color.el > @@ -134,7 +134,9 @@ NICK is the nick for which the new color ist set; if = nil, all the > nicks in `rcirc-color-mapping' are shown with their corresponding > faces. >=20=20 > -COLOR is the color to use as the new foreground-color. > +COLOR is the color to use as the new foreground-color. If COLOR > +is not supplied, a random color from `rcirc-colors' is used > +instead. >=20=20 > PROCESS and TARGET are the standard arguments for rcirc > commands." > @@ -149,9 +151,12 @@ commands." > rcirc-color-mapping) > (rcirc-print process (rcirc-nick process) "NOTICE" target > (mapconcat 'identity names " "))) > - (unless color > - (error "Use what color?")) > - (puthash nick (cons 'foreground-color color) rcirc-color-mapping))) > + (puthash nick > + (cons 'foreground-color > + (or color > + (elt rcirc-colors > + (random (length rcirc-colors))))) > + rcirc-color-mapping))) While at it one could replace the `foreground-color', since (elisp) Special Properties says: =E2=80=A2 A cons cell of the form =E2=80=98(foreground-color . COLO= R-NAME)=E2=80=99 or =E2=80=98(background-color . COLOR-NAME)=E2=80=99. This specifie= s the foreground or background color, similar to =E2=80=98(:foreground COLOR-NAME)=E2=80=99 or =E2=80=98(:background COLOR-NAME)=E2=80= =99. This form is supported for backward compatibility only, and should be avoided. Also, it would be nice to also reformat the code using a let* block. Something like (let* ((index (random (length rcirc-colors))) (color (elt rcirc-colors index)) (face (cons 'foreground-color color))) (puthash nick face rcirc-color-mapping)) > (advice-add 'rcirc-handler-NICK :before #'rcirc-color--handler-NICK) > (defun rcirc-color--handler-NICK (_process sender args _text) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 29 20:30:37 2022 Received: (at 58165) by debbugs.gnu.org; 30 Sep 2022 00:30:37 +0000 Received: from localhost ([127.0.0.1]:39941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oe3vJ-0005db-37 for submit@debbugs.gnu.org; Thu, 29 Sep 2022 20:30:37 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:41777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oe3vC-0005dJ-Np for 58165@debbugs.gnu.org; Thu, 29 Sep 2022 20:30:35 -0400 Received: by mail-ej1-f54.google.com with SMTP id hy2so5958481ejc.8 for <58165@debbugs.gnu.org>; Thu, 29 Sep 2022 17:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4rtXgXcQNzVIi7lOgJoWSzTXRKih+fo2FbJuT0sRm44=; b=grdEYLbl5+3QbUigynE85LxugM8f7dGbaB3ySLDr7Avw8MnyCYQ4H4ZcgBujR1Rc3e 9FzI9x5AeKP4wo9cDWXryyqOSKZKzd2diE+mtaxdr65CoLiR7zTJQOX9VkjBKzN+HtO5 3xI6eBRCox6AxqW9qMYGk7hVGNgLTw5BSBsRL81ABcaPlXl7sEHI0ErRK/Tgw9hpn8Nm M6LE5hH523c3024qbOurhvChj28E4U3550TDtw7fQb1xmTCOfUA2OQhl6bVgBFStOUNP A4gSDo1TbFo9Fj211sMji+9YnhhwkU+713HulCB5SfK6xQe0svZgxuenVU4ifviSaYjd 02Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4rtXgXcQNzVIi7lOgJoWSzTXRKih+fo2FbJuT0sRm44=; b=1ACtTtgErwH9rPx6kcKlwNKzNjKdkTVeGSW2SIKfm3xw839IMLYIk/arMm1ttKpo5n JvSf9CemDywJNjempDz3vxW03fUtt9i913WV3qM3lCHJrN8jHb6+7vW+vn5EkD5hUD38 hBnCNQc8oW+w5grQobPbvt7HIWrhRoWGjZV/VKa82jAJViCBaXfDJo6i4vAbOAM4v/1r 28HDk9glUftR0E3y44DVNY0ozs+xIWFAVjSjrReyr+affCv2kUoQu4aQ3zNm1URywl9v qIWtW4sdRAP6GO/gvimyVHDFUNHoNFW6VYZWDs+qlcIuu15yWH5KdXU/awxtE/KRVjE1 IZzg== X-Gm-Message-State: ACrzQf0nGQRgEqEPOztco3UiuJsMDu5bxlAG5TPSmW6Ei310QhURkTSM ZkeBTRKJ5wfC29iYlBCrOhxzxEG4JEg= X-Google-Smtp-Source: AMsMyM5cjqpvMFt2AoIpBCjtRM4hDTl7h7h1hIkXPhXvifdYfM6NfYKjHaZyD7iCH7mJtRulZMy6BA== X-Received: by 2002:a17:907:78d:b0:740:33e1:998 with SMTP id xd13-20020a170907078d00b0074033e10998mr4771490ejb.162.1664497823554; Thu, 29 Sep 2022 17:30:23 -0700 (PDT) Received: from thuna ([90.147.71.105]) by smtp.gmail.com with ESMTPSA id f27-20020a17090631db00b0073cf6ec3276sm275267ejf.207.2022.09.29.17.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 17:30:23 -0700 (PDT) From: Thuna To: Philip Kaludercic Subject: Re: bug#58165: [Patch] [GNU ELPA] rcirc-color: Allow recoloring nicks In-Reply-To: <87ill5yjvg.fsf@posteo.net> References: <87mtaiw7le.fsf@gmail.com> <87ill5yjvg.fsf@posteo.net> Date: Fri, 30 Sep 2022 02:30:22 +0200 Message-ID: <87pmfdzotd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58165 Cc: 58165@debbugs.gnu.org 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 (-) > While at it one could replace the `foreground-color', since (elisp) > Special Properties says: > > =E2=80=A2 A cons cell of the form =E2=80=98(foreground-color . CO= LOR-NAME)=E2=80=99 or > =E2=80=98(background-color . COLOR-NAME)=E2=80=99. This specif= ies the > foreground or background color, similar to =E2=80=98(:foreground > COLOR-NAME)=E2=80=99 or =E2=80=98(:background COLOR-NAME)=E2=80= =99. This form is > supported for backward compatibility only, and should be > avoided. I avoided it on the off chance something would break, but I don't mind either way. > Also, it would be nice to also reformat the code using a let* block. > Something like > > (let* ((index (random (length rcirc-colors))) > (color (elt rcirc-colors index)) > (face (cons 'foreground-color color))) > (puthash nick face rcirc-color-mapping)) Seems ok to me. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 30 07:24:40 2022 Received: (at 58165-done) by debbugs.gnu.org; 30 Sep 2022 11:24:40 +0000 Received: from localhost ([127.0.0.1]:40637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeE8G-0005fq-3u for submit@debbugs.gnu.org; Fri, 30 Sep 2022 07:24:40 -0400 Received: from mout02.posteo.de ([185.67.36.66]:58403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oeE8B-0005fa-Vh for 58165-done@debbugs.gnu.org; Fri, 30 Sep 2022 07:24:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id F1F9B240104 for <58165-done@debbugs.gnu.org>; Fri, 30 Sep 2022 13:24:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1664537070; bh=17ap60H3mXbVUoe28d6ZaNy8VWDfNKo2+W3eY/GhkHI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=YOIX3OsKXdkNMu8U21lTgCLowj9hk5DtBFftOKdilulLIsyZU34RT6MnoFfyR/kV3 piCWJw0QAXm4AoZw97Ve2lamP4O4GUdEbOLypPZEqgwGZWrVTzwuUXtg+Av69Pncje LUWGkDW3vpektLDFe+fD/AIZM1gCgHFNtaYjpPrebvcuRcr0mCKRDyojMkAANxlNql y3qHJzVZy7TI6VIDeKMBSP8s2dwrjUPYOEvvzKwG1Y8YLJ0c6n6XP9+gj++urHKk4n qnJCnB+g72R6Q4QxM9x7sfQGaSQbygDsCCSxdjMDAzNE1KGN2QheuYSI82IqbQ8N+e RhlxMkzWf7M8g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mf7DF2MFtz9rxH; Fri, 30 Sep 2022 13:24:29 +0200 (CEST) From: Philip Kaludercic To: Thuna Subject: Re: bug#58165: [Patch] [GNU ELPA] rcirc-color: Allow recoloring nicks In-Reply-To: <87pmfdzotd.fsf@gmail.com> (Thuna's message of "Fri, 30 Sep 2022 02:30:22 +0200") References: <87mtaiw7le.fsf@gmail.com> <87ill5yjvg.fsf@posteo.net> <87pmfdzotd.fsf@gmail.com> Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Fri, 30 Sep 2022 11:24:23 +0000 Message-ID: <87a66hxfyw.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58165-done Cc: 58165-done@debbugs.gnu.org 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: -3.3 (---) Thuna writes: >> While at it one could replace the `foreground-color', since (elisp) >> Special Properties says: >> >> =E2=80=A2 A cons cell of the form =E2=80=98(foreground-color . C= OLOR-NAME)=E2=80=99 or >> =E2=80=98(background-color . COLOR-NAME)=E2=80=99. This speci= fies the >> foreground or background color, similar to =E2=80=98(:foregrou= nd >> COLOR-NAME)=E2=80=99 or =E2=80=98(:background COLOR-NAME)=E2= =80=99. This form is >> supported for backward compatibility only, and should be >> avoided. > > I avoided it on the off chance something would break, but I don't mind > either way. I think I can do this. >> Also, it would be nice to also reformat the code using a let* block. >> Something like >> >> (let* ((index (random (length rcirc-colors))) >> (color (elt rcirc-colors index)) >> (face (cons 'foreground-color color))) >> (puthash nick face rcirc-color-mapping)) > > Seems ok to me. I'll pull your patch and make this change in a subsequent commit. So thank you for the patch. From unknown Mon Jul 21 02:27:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 29 Oct 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator