From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gustavo Barros Newsgroups: gmane.emacs.bugs Subject: bug#48936: 27.2; pulse-reset-face and extend attribute of pulse-highligh-face Date: Wed, 09 Jun 2021 11:15:43 -0300 Message-ID: <878s3j86pc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.15; emacs 27.2 To: 48936@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 09 16:16:11 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 1lqz05-0004eV-DQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Jun 2021 16:16:09 +0200 Original-Received: from localhost ([::1]:58710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqz04-0003eb-Ch for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Jun 2021 10:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqyzy-0003eT-Aa for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 10:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqyzy-0001wZ-39 for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 10:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqyzy-0006cr-05 for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gustavo Barros Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Jun 2021 14:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48936 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162324815525452 (code B ref -1); Wed, 09 Jun 2021 14:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jun 2021 14:15:55 +0000 Original-Received: from localhost ([127.0.0.1]:34358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqyzr-0006cS-4G for submit@debbugs.gnu.org; Wed, 09 Jun 2021 10:15:55 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqyzp-0006cK-0p for submit@debbugs.gnu.org; Wed, 09 Jun 2021 10:15:54 -0400 Original-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 ) id 1lqyzo-0003eG-QF for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 10:15:52 -0400 Original-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 ) id 1lqyzm-0001o1-Ah for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2021 10:15:52 -0400 Original-Received: by mail-ot1-x331.google.com with SMTP id 36-20020a9d0ba70000b02902e0a0a8fe36so24065827oth.8 for ; 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) Original-Received: from gusbrs-laptop ([143.244.34.233]) by smtp.gmail.com with ESMTPSA id o24sm22479otp.13.2021.06.09.07.15.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 07:15:46 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::331; envelope-from=gusbrs.2016@gmail.com; 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-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:208295 Archived-At: 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))