all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Protesilaos Stavrou <info@protesilaos.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [ELPA] Add 'pulsar' package
Date: Wed, 23 Mar 2022 09:03:50 +0000	[thread overview]
Message-ID: <87czidca6h.fsf@posteo.net> (raw)
In-Reply-To: <87czienuhx.fsf@protesilaos.com> (Protesilaos Stavrou's message of "Tue, 22 Mar 2022 12:37:14 +0200")

Protesilaos Stavrou <info@protesilaos.com> writes:

> On 2022-03-20, 11:29 +0000, Philip Kaludercic <philipk@posteo.net> 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



      reply	other threads:[~2022-03-23  9:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14  7:39 [ELPA] Add 'pulsar' package Protesilaos Stavrou
2022-03-14  8:24 ` Philip Kaludercic
2022-03-14  8:38   ` Protesilaos Stavrou
2022-03-14 16:41     ` Philip Kaludercic
2022-03-16 12:14       ` Protesilaos Stavrou
2022-03-16 16:05         ` Philip Kaludercic
2022-03-20  6:43           ` Protesilaos Stavrou
2022-03-20 11:29             ` Philip Kaludercic
2022-03-22 10:37               ` Protesilaos Stavrou
2022-03-23  9:03                 ` Philip Kaludercic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czidca6h.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=info@protesilaos.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.