GNU bug report logs -
#72636
[PATCH] Modify the pulsation effect of pulse.el
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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''
[0001-Modify-the-pulsation-effect-of-pulse.el.patch (text/patch, attachment)]
This bug report was last modified 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.