|
From: | Dmitry Gutov |
Subject: | bug#50642: 27.2; autoload xref-pulse-momentarily |
Date: | Sat, 18 Sep 2021 03:14:06 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 17.09.2021 17:43, Howard Melman wrote:
I'm not sure about this but can xref-pulse-momentarily be autoloaded? I'm using consult and it has a consult-after-jump-hook which recommends xref-pulse-momentarily as something you may want to use in it. I set it and xref-after-jump-hook to: '(reposition-window xref-pulse-momentarily). It works great, but if I use consult before xref I get the error: run-hooks: Symbol's function definition is void: xref-pulse-momentarily If I add an autoload call myself it does not error. I looked but didn't find a more suitable function to use. It seems like pulse.el should define a function suitable for use in a hook, but in its absense xref-pulse-momentarily does seem like the best option (though I couldn't follow its implementation).
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.
[Prev in Thread] | Current Thread | [Next in Thread] |