When the cursor is in the *xref* buffer, following dired-do-find-regexp, the found string in the adjacent frame flashes, but too briefly, making it quite hard to see.

A simple solution is to increase the duration of the pulse of the found string.

The code goes through the following functions in xref.el(.gz):

(On macOS: /Applications/Emacs.app/Contents/Resources/lisp/progmodes/xref.el.gz)

  • xref-next-line
  • xref-show-location-at-point
  • xref--show-location
  • xref--show-pos-in-buf
  • xref-after-jump-hook
  • xref-pulse-momentarily
  • pulse-momentary-highlight-region

and the calls continue in pulse.el.gz:

(on macOS: /Applications/Emacs.app/Contents/Resources/lisp/cedet/pulse.el.gz)

  • pulse-momentary-highlight-region
  • pulse-momentary-highlight-overlay

It would be enough to increase pulse-delay

defcustom pulse-delay .03

but that doesn't change the pulse time.

How can I increase the duration of the pulse?

This is a sequel question.

  • Sounds like a bug or an enhancement request. If you don't get a satisfactory answer here, please consider filing a bug report / enhancement request, using M-x report-emacs-bug. – Drew Nov 3 '17 at 18:06
(setq pulse-delay 0.09)

works for me, and really increases the duration of the pulse. The problem is likely in how you change that value.


Beside pulse-delay there is the option pulse-iterations. The default for pulse-iterations is 10 (which is quite low). Increase it to your liking. I've tried 100 which slows down the pulse considerably.

(emacs-version: 25.1.50)

  • I had tried that. It doesn't work. Puzzling that it works on your version even though you're also on 25.x. Which OS are you on? Perhaps the underlying toolkit is the reason for the difference? For completeness, here is my version string: GNU Emacs 25.3.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2017-09-12. – Calaf Nov 6 '17 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.