unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Howard Melman <hmelman@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 50642@debbugs.gnu.org
Subject: bug#50642: 27.2; autoload xref-pulse-momentarily
Date: Fri, 17 Sep 2021 21:48:47 -0400	[thread overview]
Message-ID: <9F48766D-5656-422E-9608-C1F7203FB8E5@gmail.com> (raw)
In-Reply-To: <bff7fea5-ca9a-e365-6e91-dc48f5383ed0@yandex.ru>

On Sep 17, 2021, at 8:14 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
> Well, um. I don't really mind but xref-pulse-momentarily was designed to pulse after a jump to an xref location. That's why it refers to xref--current-item in its implementation.
> 
> It does fall back to pulsing the whole line, so I suppose it can be useful in other cases too.
> 
> But maybe Counsel wants to provide its own version of this function? It can call xref-pulse-momentarily after xref navigations, but maybe do some more useful fallbacks for other commands? I'm not sure which other kinds of jumps consult-after-jump-hook also handles.

I'm not the consult author, but given that it doesn't actually use a pulse function, it just suggests one possible one, I doubt it will.

It looked to me in some cases consult wasn't pulsing the whole line but rather just a symbol, but perhaps I'm mistaken (I can't seem to get it to do so now).  It uses this hook in various grep/imenu/outline/etc. navigation commands.

I do still think it would be nice for pulse.el to define a function suitable for use in a jump-like hook that take no arguments and pulses the current line or maybe symbol.  The former is trival, but if pulse-momentary-highlight-one-line allowed it's POINT argument to be optional, emacs could provide it for everyone.  It seems like in Emacs 27 all the callers of it just pass (point) anyway.

Or maybe pulse-line-hook-function is supposed to be this?  In which case it should be autoloaded and pulse-command-advice-flag should be a defcustom and have a docstring?

Howard




  reply	other threads:[~2021-09-18  1:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 14:43 bug#50642: 27.2; autoload xref-pulse-momentarily Howard Melman
2021-09-18  0:14 ` Dmitry Gutov
2021-09-18  1:48   ` Howard Melman [this message]
2021-09-18 14:14     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=9F48766D-5656-422E-9608-C1F7203FB8E5@gmail.com \
    --to=hmelman@gmail.com \
    --cc=50642@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).