From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Add 'pulsar' package Date: Wed, 23 Mar 2022 09:03:50 +0000 Message-ID: <87czidca6h.fsf@posteo.net> References: <87pmmpasom.fsf@protesilaos.com> <87ee359c2e.fsf@posteo.net> <871qz5x72t.fsf@protesilaos.com> <87v8wg1o7b.fsf@posteo.net> <87zglqdrht.fsf@protesilaos.com> <87h77x51d6.fsf@posteo.net> <87o821f7js.fsf@protesilaos.com> <87k0con9pc.fsf@posteo.net> <87czienuhx.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1094"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Protesilaos Stavrou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 23 10:07:18 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nWwxa-00006G-6u for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Mar 2022 10:07:18 +0100 Original-Received: from localhost ([::1]:60792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWwxW-0005b7-Kc for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Mar 2022 05:07:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWwuQ-0004it-EF for emacs-devel@gnu.org; Wed, 23 Mar 2022 05:04:02 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:34481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWwuO-0007WU-12 for emacs-devel@gnu.org; Wed, 23 Mar 2022 05:04:02 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8EB8C240108 for ; Wed, 23 Mar 2022 10:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1648026236; bh=rVtr7C9QLsZElXPwTYBwFCx2nfQ3tWgS50XK+GCnbWM=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=HmV7DdMIxOgolyf/SfpoaCS4OIW3NbPIA6Eccw95FVrd76WGaEJgprmiUduHesKwn xJ0SSRq516QzCMaYArUOwNg7uBEbm4qDUa2nD+z5Cqo/AnhVpLPmjxS8x8msxCs+5Q UQWX9jRXYW0fm1bDw2RVdGlAERr9/jN2RF+9UTN77lPxnP1QUbp2eSUQILgXRmY2aH rQub1ohPJAPJFvQAW6Tk2nhvGqmVFm2hNHDw8BWc9zpZu7KRGbl7KvDQXZRaOBR8JT LzJolXFlgErmbWve5grysbzFM24YN3qSbF7Y6hcW3O8XDJ7g+uJqoX+f2hWivE8Wdf wjsof/GslQn0A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KNj8C4YL1z6tpj; Wed, 23 Mar 2022 10:03:55 +0100 (CET) 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 In-Reply-To: <87czienuhx.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Tue, 22 Mar 2022 12:37:14 +0200") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287383 Archived-At: Protesilaos Stavrou writes: > On 2022-03-20, 11:29 +0000, Philip Kaludercic wrote: > >>> As I wrote before, I do not know how best to do this in core. This is >>> not me faking ignorance to support a different opinion: I genuinely do >>> not know how to do this with a single option. Please do it if you >>> can---it will also help me learn something new. >> >> This is a quick sketch: >> >> diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el >> index f7af10887c..97803d08c1 100644 >> --- a/lisp/cedet/pulse.el >> +++ b/lisp/cedet/pulse.el >> @@ -102,6 +102,22 @@ pulse-delay >> :group 'pulse >> :type 'number) >> >> +;;;###autoload >> +(defcustom pulse-after-commands '() >> + "List of commands to pulse the current line after invocation." >> + :set (lambda (sym val) >> + (funcall (if val #'add-hook #'remove-hook) >> + 'post-command-hook >> + #'pulse--after-command) >> + (set-default sym val)) >> + :group 'pulse >> + :type '(repeat symbol)) >> + >> +(defun pulse--after-command () >> + "Pulse if the current command is in `pulse-after-commands'." >> + (when (memq this-command pulse-after-commands) >> + (pulse-momentary-highlight-one-line))) >> + >> ;;; Convenience Functions >> ;; >> (defvar pulse-momentary-overlay nil >> >> This can be extended by allowing regular expressions to match sets of >> commands, or cons-cells to configure additional details (color, >> duration, multiple pulses, ...) for specific case. > > That's neat. Thanks for sharing! In the original version of my code I > was using an advice, but changed it to post-command-hook following > feedback from Daniel Mendler. > > Will you include a variant of this in pulse.el? Then I can reference it > in pulsar's manual and tell people to use it if they want. I am currently short on time, and have other projects with higher priorities, so finding the time to implement and discuss a feature I am not personally interested in is a bit difficult right now. >>> To your point though about patching the core, I repeat what I already >>> stated in unequivocal terms: I will deprecate pulsar when the Emacs >>> version that includes its functionality becomes the stable version of >>> Emacs. Until then, the package has a good reason to exist and be >>> readily available. >> >> I don't even think this is necessary. IMO there is nothing wrong with >> having a package on ELPA that extends or improves on a core feature. > > Okay. I stand by my commitment and will adapt to what core Emacs is > doing. In that case the above patch should certainly be expanded, so that it is even in a position to eventually deprecate pulsar. -- Philip Kaludercic