From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?q?Fran=E7ois_Fleuret?= Newsgroups: gmane.emacs.help Subject: Window-blinker (light) I need advices! Date: 20 Nov 2003 01:00:02 +0100 Organization: I.N.R.I.A Rocquencourt Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069287348 26066 80.91.224.253 (20 Nov 2003 00:15:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2003 00:15:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 20 01:15:46 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMcU6-00089B-00 for ; Thu, 20 Nov 2003 01:15:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMdRL-0006Yb-VV for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Nov 2003 20:16:59 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.ems.psu.edu!news.cse.psu.edu!tiscali!newsfeed1.ip.tiscali.net!irazu.switch.ch!switch.ch!in2p3.fr!univ-lyon1.fr!cines.fr!ciril.fr!univ-angers.fr!news.univ-rennes1.fr!irisa.fr!news-rocq.inria.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: wasabi.inria.fr Original-X-Trace: news-rocq.inria.fr 1069286402 21854 128.93.23.201 (20 Nov 2003 00:00:02 GMT) Original-X-Complaints-To: usenet@inria.fr Original-NNTP-Posting-Date: Thu, 20 Nov 2003 00:00:02 +0000 (UTC) X-Attribution: FF X-Url: http://www-rocq.inria.fr/~fleuret User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:118459 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14400 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14400 Hi, The e-other-window thing is a neat stuff. I wrote my own simpler version (which is not full-featured, but small is beautiful). Two questions: - Is my defadvice usage correct ? It looks sort of odd to me (especially to have to define one symbol for each advice ?) - Is there a better way to change a window background color ? This overlay trick stuff just sucks. First, it wont blink the empty lines (which is very bad for an empty buffer ...) and if several window display areas overlap, they will all blinks ! Regards, F. (make-face 'blinker-face) (set-face-attribute 'blinker-face nil :background "white") (defun blinker-blink-current() (interactive) (make-local-variable 'blinker-overlay) (setq blinker-overlay (make-overlay (window-start) (window-end))) (overlay-put blinker-overlay 'face 'blinker-face) (sit-for 0 50) (delete-overlay blinker-overlay)) (defadvice switch-to-buffer-other-window (after blinker-switch-to-buffer-other-window nil activate) (blinker-blink-current)) (defadvice next-multiframe-window (after blinker-next-multiframe-window nil activate) (blinker-blink-current)) (defadvice previous-multiframe-window (after blinker-previous-multiframe-window nil activate) (blinker-blink-current)) (defadvice other-window (after blinker-other-window nil activate) (blinker-blink-current))