From unknown Thu Aug 21 14:54:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72636: [PATCH] Modify the pulsation effect of pulse.el Resent-From: Gautier Ponsinet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2024 08:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 72636@debbugs.gnu.org Cc: Protesilaos Stavrou , zappo@gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172370951619897 (code B ref -1); Thu, 15 Aug 2024 08:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2024 08:11:56 +0000 Received: from localhost ([127.0.0.1]:48306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seVaN-0005Aq-Gh for submit@debbugs.gnu.org; Thu, 15 Aug 2024 04:11:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:45536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seUxI-000478-1u for submit@debbugs.gnu.org; Thu, 15 Aug 2024 03:31:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUwh-00008u-SL for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 03:30:55 -0400 Received: from 11.mo584.mail-out.ovh.net ([46.105.34.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUwf-0004ms-6B for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 03:30:55 -0400 Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.140.5]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 4WkxcR1QLFz1D2r for ; Thu, 15 Aug 2024 07:30:47 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-bv82q (unknown [10.110.188.21]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 5191B1FE68; Thu, 15 Aug 2024 07:30:46 +0000 (UTC) Received: from gautierponsinet.xyz ([37.59.142.99]) by ghost-submission-6684bf9d7b-bv82q with ESMTPSA id 076eDaauvWYDnA0AnZV3Uw (envelope-from ); Thu, 15 Aug 2024 07:30:46 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-99G0034e7b0a77-a8ce-4782-a2c7-1268ad3f6ead, 19F201BFFDC4C2452DC7AC0C77E4B9C6AB6BA584) smtp.auth=gautier@gautierponsinet.xyz X-OVh-ClientIp: 2.87.16.101 From: Gautier Ponsinet Date: Thu, 15 Aug 2024 09:30:35 +0200 Message-ID: <87ed6q1bvo.fsf@gautierponsinet.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Ovh-Tracer-Id: 12584746211240830835 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 70 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddruddthedguddvvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecufghrlhcuvffnffculdejtddmnecujfgurhephffvvefufffkgggtsehmtderredttddtnecuhfhrohhmpefirghuthhivghrucfrohhnshhinhgvthcuoehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiiqeenucggtffrrghtthgvrhhnpeejieevheduveduieeguddukeethefgheekleetuddvkeetleetudejvdeutedtfeenucfkphepuddvjedrtddrtddruddpvddrkeejrdduiedruddtuddpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiipdhnsggprhgtphhtthhopedupdhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekgedpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=cUSykgrewFBJLOsCTppeKTowxksvqcc2t2xYyxMDnQE=; c=relaxed/relaxed; d=gautierponsinet.xyz; h=From; s=ovhmo4576755-selector1; t=1723707047; v=1; b=HHGCOMGY9iVpw7nj0j3kQFgYUyU6b82ZS94/DJJF6AAR74YXCceBBqc1XIIwmWRh0BntBOAj 7p4rlobcBqO/Yo6WZ7j5gRrNS/3+ZFqDfH8Hk2j8iZ3lKGU/LWNbpstwkxRLidHjmYQgxrnYcDw Bq0c+uySBh65XYNAmvipERmGosHGX8TuYv6A4fjhayAR34ejXB7ouDWp0CZug8oMMhz6lPkpl9d U5Md50ntuJVeXdDtqFUyhR+8t4HD5cQcChBhqeC0H7/l0uRDrN18XyOkLlH6Nsk5POeONgl6i+R BblasisPWJjWpNJwkngW3mKiNwt90axhkSIW6dYRKAhag== Received-SPF: pass client-ip=46.105.34.195; envelope-from=gautier@gautierponsinet.xyz; helo=11.mo584.mail-out.ovh.net 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Thu, 15 Aug 2024 04:11:54 -0400 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 Tags: patch Hello everyone, CC: Eric M. Ludlam (author of pulse.el) and Protesilaos Stavrou (author of pulsar.el). I wanted to use pulse.el without the pulse effect, that is, I have set the variable pulse-iterations to 1, and I was expecting the pulse library to simply highlight a region or line for the duration specified in the variable pulse-delay with the face pulse-highlight-start-face. It works, except that the face used is not pulse-highlight-start-face. To reproduce in emacs -Q: (require 'pulse) (setopt pulse-iterations 1) (setopt pulse-delay 5) (set-face-background 'pulse-highlight-start-face "#ff0000") (pulse-momentary-highlight-one-line) Note that the color used by pulse is not pulse-highlight-start-face (pure red). If I understand correctly, this behavior comes from the function pulse-momentary-highlight-overlay. The function pulse-momentary-highlight-overlay sets an overlay using the face pulse-highlight-face (reseted to pulse-highlight-start-face by default, that is, if the argument of pulse-momentary-highlight-overlay is nil), the function then immediatly starts the pulsation effect. The list of colors for the pulsation effect is generated by the function color-gradient, but the documentation of color-gradient says about its output: "It does not include the START and STOP color in the resulting list". Thus the first visible color is the first color of the list returned by color-gradient which is different that the starting face (pulse-highlight-start-face by default). A simple solution would be to add the starting color (pulse-highlight-start-face by default) at the beginning of the list of colors used for the pulsation effect in pulse-momentary-highlight-overlay. Please find attached to this mail a patch for pulse.el which does this modification. All the best, Gautier ------------------------------------------------------------------------ In GNU Emacs 31.0.50 (build 61, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw3d scroll bars) of 2024-08-08 built on gautier-laptop Repository revision: 8b662047074f7413c280c9092d1c39763f8b0e5b Repository branch: makepkg Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-m17n-flt --without-gconf --with-native-compilation=no --with-xinput2 --with-x-toolkit=lucid --without-xft --with-xaw3d --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/gautier/.packages/aur/emacs-git/src=/usr/src/debug/emacs-git -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Modify-the-pulsation-effect-of-pulse.el.patch >From 9def4e3b1536a1eba73adb351954569d396fb164 Mon Sep 17 00:00:00 2001 From: Gautier Ponsinet Date: Thu, 15 Aug 2024 09:17:42 +0200 Subject: [PATCH] Modify the pulsation effect of pulse.el * lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Add the start color to the list of colors used for the pulsation effect. --- lisp/cedet/pulse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index d9f6a40865a..53256ba3a81 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -158,7 +158,7 @@ ;;; Convenience Functions (face-background 'pulse-highlight-face nil 'default))) (stop (color-name-to-rgb (face-background 'default))) (colors (mapcar (apply-partially 'apply 'color-rgb-to-hex) - (color-gradient start stop pulse-iterations)))) + (cons start (color-gradient start stop (1- pulse-iterations)))))) (setq pulse-momentary-timer (run-with-timer 0 pulse-delay #'pulse-tick colors -- 2.46.0 --=-=-=-- From unknown Thu Aug 21 14:54:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Gautier Ponsinet Subject: bug#72636: closed (Re: bug#72636: [PATCH] Modify the pulsation effect of pulse.el) Message-ID: References: <86h6banwk6.fsf@gnu.org> <87ed6q1bvo.fsf@gautierponsinet.xyz> X-Gnu-PR-Message: they-closed 72636 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 72636@debbugs.gnu.org Date: Sat, 24 Aug 2024 08:42:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1724488922-28106-1" This is a multi-part message in MIME format... ------------=_1724488922-28106-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #72636: [PATCH] Modify the pulsation effect of pulse.el which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 72636@debbugs.gnu.org. --=20 72636: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72636 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1724488922-28106-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 72636-done) by debbugs.gnu.org; 24 Aug 2024 08:41:14 +0000 Received: from localhost ([127.0.0.1]:40435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shmKf-0007I9-RW for submit@debbugs.gnu.org; Sat, 24 Aug 2024 04:41:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shmKc-0007Hq-U8 for 72636-done@debbugs.gnu.org; Sat, 24 Aug 2024 04:41:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1shmJj-0008D1-Qu; Sat, 24 Aug 2024 04:40:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4DOPRGI87Qqt5I7EVSrWUzFYffMh2x3USRZrQEh5kmo=; b=hWvMFdWP1AgF 7iF3ZlahQ0rEnv6q/ZC2j84SNIS/5nL4OfwrE49b1DAufDom0EV8FVd19o3V/F+gO5vy9qx634NNx MsSJw0rVfITeAICc6SIZ1dpuxaq4rA8dG7/MHEZ+kNP6ZtEWhbVaTxZdZlapZwJni0u2uoHfetj7i TZjpKPJMnIMeNegi5XBl6XmqeTgOMSlphkHieyYii7r6w84pwQt+9+ZA0hu95zxIiKcKpFmfm+kGg 3JE/W1g/wqUPNtEnmdsVkJXZHJxcUK3jRInLHWIVarfakis87ssoFkUqe5ZL7whUkpM+tJd8HqseS OirY7YonwucqBtKf8em1oQ==; Date: Sat, 24 Aug 2024 11:40:09 +0300 Message-Id: <86h6banwk6.fsf@gnu.org> From: Eli Zaretskii To: Gautier Ponsinet In-Reply-To: <87ed6q1bvo.fsf@gautierponsinet.xyz> (message from Gautier Ponsinet on Thu, 15 Aug 2024 09:30:35 +0200) Subject: Re: bug#72636: [PATCH] Modify the pulsation effect of pulse.el References: <87ed6q1bvo.fsf@gautierponsinet.xyz> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 72636-done Cc: 72636-done@debbugs.gnu.org, zappo@gnu.org, public@protesilaos.com 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 (---) > Cc: Protesilaos Stavrou , zappo@gnu.org > From: Gautier Ponsinet > Date: Thu, 15 Aug 2024 09:30:35 +0200 > > I wanted to use pulse.el without the pulse effect, that is, I have set > the variable pulse-iterations to 1, and I was expecting the pulse > library to simply highlight a region or line for the duration specified > in the variable pulse-delay with the face pulse-highlight-start-face. > > It works, except that the face used is not pulse-highlight-start-face. > > To reproduce in emacs -Q: > (require 'pulse) > (setopt pulse-iterations 1) > (setopt pulse-delay 5) > (set-face-background 'pulse-highlight-start-face "#ff0000") > (pulse-momentary-highlight-one-line) > > Note that the color used by pulse is not pulse-highlight-start-face > (pure red). > > If I understand correctly, this behavior comes from the function > pulse-momentary-highlight-overlay. The function > pulse-momentary-highlight-overlay sets an overlay using the face > pulse-highlight-face (reseted to pulse-highlight-start-face by default, > that is, if the argument of pulse-momentary-highlight-overlay is nil), > the function then immediatly starts the pulsation effect. The list of > colors for the pulsation effect is generated by the function > color-gradient, but the documentation of color-gradient says about its > output: "It does not include the START and STOP color in the resulting > list". Thus the first visible color is the first color of the list > returned by color-gradient which is different that the starting face > (pulse-highlight-start-face by default). > > A simple solution would be to add the starting color > (pulse-highlight-start-face by default) at the beginning of the list of > colors used for the pulsation effect in > pulse-momentary-highlight-overlay. Please find attached to this mail a > patch for pulse.el which does this modification. Thanks, I installed this improvement on the master branch, and I'm therefore closing this bug. ------------=_1724488922-28106-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Aug 2024 08:11:56 +0000 Received: from localhost ([127.0.0.1]:48306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seVaN-0005Aq-Gh for submit@debbugs.gnu.org; Thu, 15 Aug 2024 04:11:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:45536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1seUxI-000478-1u for submit@debbugs.gnu.org; Thu, 15 Aug 2024 03:31:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUwh-00008u-SL for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 03:30:55 -0400 Received: from 11.mo584.mail-out.ovh.net ([46.105.34.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seUwf-0004ms-6B for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2024 03:30:55 -0400 Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.140.5]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 4WkxcR1QLFz1D2r for ; Thu, 15 Aug 2024 07:30:47 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-bv82q (unknown [10.110.188.21]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 5191B1FE68; Thu, 15 Aug 2024 07:30:46 +0000 (UTC) Received: from gautierponsinet.xyz ([37.59.142.99]) by ghost-submission-6684bf9d7b-bv82q with ESMTPSA id 076eDaauvWYDnA0AnZV3Uw (envelope-from ); Thu, 15 Aug 2024 07:30:46 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-99G0034e7b0a77-a8ce-4782-a2c7-1268ad3f6ead, 19F201BFFDC4C2452DC7AC0C77E4B9C6AB6BA584) smtp.auth=gautier@gautierponsinet.xyz X-OVh-ClientIp: 2.87.16.101 From: Gautier Ponsinet To: bug-gnu-emacs@gnu.org Subject: [PATCH] Modify the pulsation effect of pulse.el Date: Thu, 15 Aug 2024 09:30:35 +0200 Message-ID: <87ed6q1bvo.fsf@gautierponsinet.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Ovh-Tracer-Id: 12584746211240830835 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 70 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddruddthedguddvvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecufghrlhcuvffnffculdejtddmnecujfgurhephffvvefufffkgggtsehmtderredttddtnecuhfhrohhmpefirghuthhivghrucfrohhnshhinhgvthcuoehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiiqeenucggtffrrghtthgvrhhnpeejieevheduveduieeguddukeethefgheekleetuddvkeetleetudejvdeutedtfeenucfkphepuddvjedrtddrtddruddpvddrkeejrdduiedruddtuddpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiipdhnsggprhgtphhtthhopedupdhrtghpthhtohepsghughdqghhnuhdqvghmrggtshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekgedpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=cUSykgrewFBJLOsCTppeKTowxksvqcc2t2xYyxMDnQE=; c=relaxed/relaxed; d=gautierponsinet.xyz; h=From; s=ovhmo4576755-selector1; t=1723707047; v=1; b=HHGCOMGY9iVpw7nj0j3kQFgYUyU6b82ZS94/DJJF6AAR74YXCceBBqc1XIIwmWRh0BntBOAj 7p4rlobcBqO/Yo6WZ7j5gRrNS/3+ZFqDfH8Hk2j8iZ3lKGU/LWNbpstwkxRLidHjmYQgxrnYcDw Bq0c+uySBh65XYNAmvipERmGosHGX8TuYv6A4fjhayAR34ejXB7ouDWp0CZug8oMMhz6lPkpl9d U5Md50ntuJVeXdDtqFUyhR+8t4HD5cQcChBhqeC0H7/l0uRDrN18XyOkLlH6Nsk5POeONgl6i+R BblasisPWJjWpNJwkngW3mKiNwt90axhkSIW6dYRKAhag== Received-SPF: pass client-ip=46.105.34.195; envelope-from=gautier@gautierponsinet.xyz; helo=11.mo584.mail-out.ovh.net 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 15 Aug 2024 04:11:54 -0400 Cc: Protesilaos Stavrou , zappo@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: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Hello everyone, CC: Eric M. Ludlam (author of pulse.el) and Protesilaos Stavrou (author of pulsar.el). I wanted to use pulse.el without the pulse effect, that is, I have set the variable pulse-iterations to 1, and I was expecting the pulse library to simply highlight a region or line for the duration specified in the variable pulse-delay with the face pulse-highlight-start-face. It works, except that the face used is not pulse-highlight-start-face. To reproduce in emacs -Q: (require 'pulse) (setopt pulse-iterations 1) (setopt pulse-delay 5) (set-face-background 'pulse-highlight-start-face "#ff0000") (pulse-momentary-highlight-one-line) Note that the color used by pulse is not pulse-highlight-start-face (pure red). If I understand correctly, this behavior comes from the function pulse-momentary-highlight-overlay. The function pulse-momentary-highlight-overlay sets an overlay using the face pulse-highlight-face (reseted to pulse-highlight-start-face by default, that is, if the argument of pulse-momentary-highlight-overlay is nil), the function then immediatly starts the pulsation effect. The list of colors for the pulsation effect is generated by the function color-gradient, but the documentation of color-gradient says about its output: "It does not include the START and STOP color in the resulting list". Thus the first visible color is the first color of the list returned by color-gradient which is different that the starting face (pulse-highlight-start-face by default). A simple solution would be to add the starting color (pulse-highlight-start-face by default) at the beginning of the list of colors used for the pulsation effect in pulse-momentary-highlight-overlay. Please find attached to this mail a patch for pulse.el which does this modification. All the best, Gautier ------------------------------------------------------------------------ In GNU Emacs 31.0.50 (build 61, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw3d scroll bars) of 2024-08-08 built on gautier-laptop Repository revision: 8b662047074f7413c280c9092d1c39763f8b0e5b Repository branch: makepkg Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-m17n-flt --without-gconf --with-native-compilation=no --with-xinput2 --with-x-toolkit=lucid --without-xft --with-xaw3d --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/gautier/.packages/aur/emacs-git/src=/usr/src/debug/emacs-git -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Modify-the-pulsation-effect-of-pulse.el.patch >From 9def4e3b1536a1eba73adb351954569d396fb164 Mon Sep 17 00:00:00 2001 From: Gautier Ponsinet Date: Thu, 15 Aug 2024 09:17:42 +0200 Subject: [PATCH] Modify the pulsation effect of pulse.el * lisp/cedet/pulse.el (pulse-momentary-highlight-overlay): Add the start color to the list of colors used for the pulsation effect. --- lisp/cedet/pulse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index d9f6a40865a..53256ba3a81 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -158,7 +158,7 @@ ;;; Convenience Functions (face-background 'pulse-highlight-face nil 'default))) (stop (color-name-to-rgb (face-background 'default))) (colors (mapcar (apply-partially 'apply 'color-rgb-to-hex) - (color-gradient start stop pulse-iterations)))) + (cons start (color-gradient start stop (1- pulse-iterations)))))) (setq pulse-momentary-timer (run-with-timer 0 pulse-delay #'pulse-tick colors -- 2.46.0 --=-=-=-- ------------=_1724488922-28106-1--