GNU bug report logs - #48936
27.2; pulse-reset-face and extend attribute of pulse-highligh-face

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Gustavo Barros <gusbrs.2016@HIDDEN>; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 28.1, send any further explanations to 48936 <at> debbugs.gnu.org and Gustavo Barros <gusbrs.2016@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 48936 <at> debbugs.gnu.org:


Received: (at 48936) by debbugs.gnu.org; 13 Jun 2021 12:49:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 08:49:44 2021
Received: from localhost ([127.0.0.1]:42947 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lsPYd-0006Z7-SH
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2021 08:49:44 -0400
Received: from quimby.gnus.org ([95.216.78.240]:53746)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lsPYc-0006Yr-IL
 for 48936 <at> debbugs.gnu.org; Sun, 13 Jun 2021 08:49:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=rQlVHG7OPMA18JewYeRfT/X11WeYhEHlw/RK6MVOA/k=; b=YUByhD5BDCfb/buf6mAXxtujG4
 p4YtGLKz7pMXTKdwinc0DahHuzFpl80BaXV5CBQn+S9wQqGkB6ZZXL3vxGZhLIzEAQVV2GFvK28j3
 QrXdswEVPmcdoxm0dNNuL1ZE54aRxcDXJQNket/I8kyZueWZvwblm6Qx/j89jChAulOA=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lsPYU-0004Cl-9K; Sun, 13 Jun 2021 14:49:36 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Gustavo Barros <gusbrs.2016@HIDDEN>
Subject: Re: bug#48936: 27.2; pulse-reset-face and extend attribute of
 pulse-highligh-face
References: <878s3j86pc.fsf@HIDDEN>
X-Now-Playing: Slam's _#savefabric (8)_: "Government Problem"
Date: Sun, 13 Jun 2021 14:49:33 +0200
In-Reply-To: <878s3j86pc.fsf@HIDDEN> (Gustavo Barros's message of "Wed, 09
 Jun 2021 11:15:43 -0300")
Message-ID: <87k0my2ale.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Gustavo Barros <gusbrs.2016@HIDDEN> writes: > Considering
 the role `pulse-highlight-face' plays in the way `pulse' > works, it would
 be expected that this resetting should also be done for > the `:extend'
 attribute when the function is called w [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 48936
Cc: 48936 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Gustavo Barros <gusbrs.2016@HIDDEN> writes:

> Considering the role `pulse-highlight-face' plays in the way `pulse' 
> works, it would be expected that this resetting should also be done for 
> the `:extend' attribute when the function is called without an argument, 

I think that sounds correct, so I've now made this change in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#48936; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Jun 2021 14:15:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 09 10:15:55 2021
Received: from localhost ([127.0.0.1]:34358 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lqyzr-0006cS-4G
	for submit <at> debbugs.gnu.org; Wed, 09 Jun 2021 10:15:55 -0400
Received: from lists.gnu.org ([209.51.188.17]:46214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gusbrs.2016@HIDDEN>) id 1lqyzp-0006cK-0p
 for submit <at> debbugs.gnu.org; Wed, 09 Jun 2021 10:15:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38102)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gusbrs.2016@HIDDEN>)
 id 1lqyzo-0003eG-QF
 for bug-gnu-emacs@HIDDEN; Wed, 09 Jun 2021 10:15:52 -0400
Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]:41873)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gusbrs.2016@HIDDEN>)
 id 1lqyzm-0001o1-Ah
 for bug-gnu-emacs@HIDDEN; Wed, 09 Jun 2021 10:15:52 -0400
Received: by mail-ot1-x331.google.com with SMTP id
 36-20020a9d0ba70000b02902e0a0a8fe36so24065827oth.8
 for <bug-gnu-emacs@HIDDEN>; Wed, 09 Jun 2021 07:15:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:user-agent:from:to:subject:message-id:date:mime-version;
 bh=QmZalQ+6uwsTEgrou7ym8Vhu432YIIabQq6XKyhGYbE=;
 b=ppD+EQCF1Tv/wKSxuDONMgIeIyaipribPsOR5j4sTG6u6FrKNCUh57NlxXUkhUiqYM
 KGzAErsbY4YbSoOtypLaCwD6uu4goNnCazwL28aHyeoWGkLQJf7uBcDDljUbaOfahAJR
 nLE8u21bAwYgNgFEfOuNztCFr6ac3bE8Iotc+W/dsIeIW9O1KLXgL9rowuLR8zA7CDIJ
 DYNww9MPFpbtNicC/OD4HN6YlWIpcvjm1pSM2xeTqtJ+tkm6l4XeB/DTEbxtKFBcGaYV
 LrPCewT0mZNBdAdhSKlmFolqcbY92HXGJFcbUap7sKf5azPP/YNoH5xRKGYY84N2cMgQ
 pRgQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:user-agent:from:to:subject:message-id
 :date:mime-version;
 bh=QmZalQ+6uwsTEgrou7ym8Vhu432YIIabQq6XKyhGYbE=;
 b=VmqOLT1TrOAtZ76xjyJkHAz8+fqKgTgbwBtPdrwF2YXgVUI2mdj0YE7mttx+voK8WN
 ub9gI92h4CmEC9AlhpFfEKpE0a6H5icCFTXVCQFR9dU3toxXCwC2liLcyz2H2EEdnz0P
 7f/TAhByVI3yvUdeo4Z+Iax0FFOqSK1mEBWzDSiy7tTZP+B1eQvu+gsHTxqfYAfxu4Nj
 youSR2HkVmt1i8q8thNCuHDKhpAsY9sWOLG7zzjrSicUONl0JYyOV/6fdKy7KAcX21VB
 FLYH5t6tZ+0FAtnCTCs9dAoc7za4PK6a5uWobHImPumqnzzzkSfPQxpQAQJ5B7AVtZDD
 kcgw==
X-Gm-Message-State: AOAM5331/9deFNPnTSiECJRp/zvmt9XjPrc3bvI4+DrRDnGHbaWNRep4
 37A6JcXRN37WfZhVzV+u3P+BxhOTVKQ=
X-Google-Smtp-Source: ABdhPJyKocZu+jK+mA3iOOQnTR3mc3wct6x6UdjM2jSZxRsPCdR7/MmkQHjMRcacNGKZdmoWzyYXDA==
X-Received: by 2002:a9d:7ada:: with SMTP id m26mr12049689otn.88.1623248147594; 
 Wed, 09 Jun 2021 07:15:47 -0700 (PDT)
Received: from gusbrs-laptop ([143.244.34.233])
 by smtp.gmail.com with ESMTPSA id o24sm22479otp.13.2021.06.09.07.15.45
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 09 Jun 2021 07:15:46 -0700 (PDT)
User-agent: mu4e 1.4.15; emacs 27.2
From: Gustavo Barros <gusbrs.2016@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.2; pulse-reset-face and extend attribute of pulse-highligh-face
Message-ID: <878s3j86pc.fsf@HIDDEN>
Date: Wed, 09 Jun 2021 11:15:43 -0300
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Received-SPF: pass client-ip=2607:f8b0:4864:20::331;
 envelope-from=gusbrs.2016@HIDDEN; helo=mail-ot1-x331.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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.1 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

Hi All,

`pulse-reset-face' in `pulse.el' "resets" the `:extend' attribute of 
`pulse-highlight-face' only when it is called with an argument. This is 
done by:

#+begin_src emacs-lisp
(and face
     (set-face-extend 'pulse-highlight-face
                      (face-extend-p face nil t)))
#+end_src

Considering the role `pulse-highlight-face' plays in the way `pulse' 
works, it would be expected that this resetting should also be done for 
the `:extend' attribute when the function is called without an argument, 
otherwise, that face attribute is left in an arbitrary state when one of 
the `pulse-momentary-highlight-...` user facing functions is called 
without an argument.  That state is "the extend attribute of whatever 
face was last passed as an argument to one of the pulsing functions".

An ECM to reproduce the effects of this is the following.  Start `emacs 
-Q', and set `pulse's default face `:extend' to t.

#+begin_src emacs-lisp
(load-library "pulse")
(set-face-extend 'pulse-highlight-start-face t)
#+end_src

Examination of `pulse-highlight-start-face' with `describe-face' shows 
the attribute in place. And, if we evaluate (make sure it is not the 
last line of the buffer when calling `C-x C-e'):

#+begin_src emacs-lisp
(pulse-momentary-highlight-one-line (point))

#+end_src

And the `:extend' does not work. Now eval:

#+begin_src emacs-lisp
(pulse-momentary-highlight-one-line (point) 'pulse-highlight-start-face)

#+end_src

And the pulse face is indeed extended this time. And then, if we eval 
again:

#+begin_src emacs-lisp
(pulse-momentary-highlight-one-line (point))

#+end_src

Now the extend works for this one.

If we want to "revert" the state, it is enough that we call, for 
example:

#+begin_src emacs-lisp
(pulse-momentary-highlight-one-line (point) 'highlight)

#+end_src

(`hightlight' is the face used for this purpose by 
`flymake-show-diagnostic', but any other face with no `extend' attribute 
called by any other user of `pulse.el' infrastructure would do the 
same).

And now,

#+begin_src emacs-lisp
(pulse-momentary-highlight-one-line (point))

#+end_src

no longer works as expected (again).

My suggested fix is that `pulse-reset-face' do the same for the `extend' 
attribute as it does for `background', namely: if it is called with a 
`face' argument, use the extend attribute of that face; otherwise, use 
the extend attribute of `pulse's default face 
`pulse-highlight-start-face'.

Best regards,
Gustavo.




In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
cairo version 1.16.0)
 of 2021-03-25 built on gusbrs-laptop
Windowing system distributor 'The X.Org Foundation', version 
11.0.12009000
System Description: Linux Mint 20.1

Recent messages:
Loading pulse...done
t
nil
[nil 24768 52127 785690 0.03 pulse-tick 
((11422590749233444063540913557203 . 7036874417766400000000)) nil 
395000]
[nil 24768 52130 912738 0.03 pulse-tick 
((57112953856190749572945063578143 . 35184372088832000000000)) nil 
808000]
[nil 24768 52132 913706 0.03 pulse-tick 
((57112953926593103094281339013663 . 35184372088832000000000)) nil 
41000]
[nil 24768 52135 937847 0.03 pulse-tick 
((57112954032995665628571964672543 . 35184372088832000000000)) nil 
679000]
[nil 24768 52139 121924 0.03 pulse-tick 
((11422590829005067355650957168339 . 7036874417766400000000)) nil 
746000]
Making completion list...
command-execute: Command attempted to use minibuffer while in minibuffer
Quit
Configured using:
 'configure --with-mailutils --with-xwidgets --with-modules
 --with-cairo'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LC_MONETARY: pt_BR.UTF-8
  value of $LC_NUMERIC: pt_BR.UTF-8
  value of $LANG: en_US.UTF-8
  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
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils pulse time-date subr-x
cl-loaddefs cl-lib 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 timer select scroll-bar mouse jit-lock font-lock
syntax facemenu 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 loaddefs button faces cus-face macroexp files
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
xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 45282 7952)
 (symbols 48 6067 2)
 (strings 32 15716 2078)
 (string-bytes 1 510505)
 (vectors 16 9328)
 (vector-slots 8 125104 10630)
 (floats 8 22 48)
 (intervals 56 279 7)
 (buffers 1000 12))




Acknowledgement sent to Gustavo Barros <gusbrs.2016@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#48936; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 13 Jun 2021 13:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.