[Top][All Lists]

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

Re: Flashing Buffer Region in other Window

From: Andreas Politz
Subject: Re: Flashing Buffer Region in other Window
Date: Wed, 11 Nov 2009 22:40:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Nordlöw <address@hidden> writes:

> I am trying to find a function that temporarily highlight/flash the a
> buffer region in a window other than the active one (other-window).
> Neither hl-line-highlight nor highwin works. They require the flashing
> window to be active. Do I have to create the overlay myself and delete
> it after a timeout? How does grep and occur solve their flashing? Any
> other package to recommend for this purpose?
> Thanks,
> Nordlöw

Some imagination please.

(defun flash-region (start end &optional window timeout face)
  (with-selected-window (or window (selected-window))
    (let ((ov (make-overlay start end)))
      (overlay-put ov 'window (selected-window))
      (overlay-put ov 'face (or face 'next-error))
      (run-with-timer (or timeout 0.35) nil #'delete-overlay ov)


reply via email to

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