bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50642: 27.2; autoload xref-pulse-momentarily


From: Howard Melman
Subject: bug#50642: 27.2; autoload xref-pulse-momentarily
Date: Fri, 17 Sep 2021 21:48:47 -0400

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 via email to

[Prev in Thread] Current Thread [Next in Thread]