all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Flashing Buffer Region in other Window
@ 2009-11-11 12:20 Nordlöw
  2009-11-11 21:40 ` Andreas Politz
  0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2009-11-11 12:20 UTC (permalink / raw
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Flashing Buffer Region in other Window
  2009-11-11 12:20 Flashing Buffer Region in other Window Nordlöw
@ 2009-11-11 21:40 ` Andreas Politz
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Politz @ 2009-11-11 21:40 UTC (permalink / raw
  To: help-gnu-emacs

Nordlöw <per.nordlow@gmail.com> 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)
      nil)))

-ap





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-11 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 12:20 Flashing Buffer Region in other Window Nordlöw
2009-11-11 21:40 ` Andreas Politz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.