all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Gabriel <gabriel376@hotmail.com>, Eli Zaretskii <eliz@gnu.org>,
	emacs-devel@gnu.org
Subject: Re: Little improvements on pulse.el
Date: Wed, 10 Mar 2021 19:18:25 +0200	[thread overview]
Message-ID: <87tupjort6.fsf@mail.linkov.net> (raw)
In-Reply-To: <CADwFkmnp3UUMcJb+uT7-XJ6AgUodDfGJTUx-Q8kdjVmF-t+NrA@mail.gmail.com> (Stefan Kangas's message of "Wed, 10 Mar 2021 05:41:45 -0800")

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> 2. The name and the docstring mention the use with hooks, but would be
>>> nice to use with advices as well. For example, to highlight the current
>>> line when the cursor, buffer or window changes:
> [...]
>>
>> I'd prefer not to use advices for such a simple job.  For example, how
>> about defining a new hook, which will receive the argument(s) you want
>> to pass it?
>
> Besides the implementation details, how about packing this up in a
> global minor mode, like `pulse-change-window-mode' or something?
> I could see myself using something like that.

Maybe simply something like:

  (defun pulse-line (&rest _)
    (pulse-momentary-highlight-one-line (point)))

  (add-hook 'window-state-change-functions #'pulse-line)
or
  (add-hook 'window-configuration-change-hook #'pulse-line)



  reply	other threads:[~2021-03-10 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  5:39 Little improvements on pulse.el Gabriel
2021-03-10 12:13 ` Eli Zaretskii
2021-03-10 13:41   ` Stefan Kangas
2021-03-10 17:18     ` Juri Linkov [this message]
2021-03-10 18:51       ` Juri Linkov
2021-03-10 19:11         ` Eli Zaretskii
2021-03-11 23:42   ` Gabriel
2021-03-12  7:29     ` Eli Zaretskii
2021-03-10 18:59 ` Juri Linkov
2021-03-11 15:35 ` Stefan Monnier

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=87tupjort6.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gabriel376@hotmail.com \
    --cc=stefankangas@gmail.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.