I'd like to be able to paste text into a buffer and have emacs give a visual confirmation by flashing the region (highlighting and unhighlighting) the text that was pasted in the buffer. Is there an example of how to do this?


There are three ways that I know of:

  • volatile-highlights: an external package which gives you visual feedback for many operations, including yanking.

  • pulse: a built-in library you can leverage to achieve what you want. You can advice yank to use pulse-momentary-highlight-region, for instance.

  • goggles: another external package. This one uses pulse to do the highlighting. From its README:

This library is the holy counterpart of evil-goggles. Another comparable library is volatile-highlights, which does not use pulse. By setting goggle-pulse to nil, the goggles-mode behaves similarly to the volatile-highlights-mode.

  • thanks for that. volatile highlights is a great package.
    – zcaudate
    Dec 18 '20 at 7:54

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.