From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: hook into window's content flux? Date: Tue, 04 Apr 2006 21:38:49 +0300 Message-ID: References: <20060404135012.23333816A@planetmath.cc.vt.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1144175971 3266 80.91.229.2 (4 Apr 2006 18:39:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Apr 2006 18:39:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 04 20:39:26 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FQqQj-0005xS-La for ged-emacs-devel@m.gmane.org; Tue, 04 Apr 2006 20:39:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FQqQj-00060k-7F for ged-emacs-devel@m.gmane.org; Tue, 04 Apr 2006 14:39:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FQqQS-0005y8-IL for emacs-devel@gnu.org; Tue, 04 Apr 2006 14:38:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FQqQQ-0005xH-Q4 for emacs-devel@gnu.org; Tue, 04 Apr 2006 14:38:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FQqQQ-0005xC-Mp for emacs-devel@gnu.org; Tue, 04 Apr 2006 14:38:46 -0400 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FQqTl-0006pV-OS for emacs-devel@gnu.org; Tue, 04 Apr 2006 14:42:14 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-238-116.inter.net.il [83.130.238.116]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DWX39610 (AUTH halo1); Tue, 4 Apr 2006 21:38:44 +0300 (IDT) Original-To: Joe Corneli In-reply-to: <20060404135012.23333816A@planetmath.cc.vt.edu> (message from Joe Corneli on Tue, 4 Apr 2006 09:50:12 -0400 (EDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52403 Archived-At: > From: Joe Corneli > Date: Tue, 4 Apr 2006 09:50:12 -0400 (EDT) > > I'd like to run a function to examine the contexts that are being > displayed in my Emacs windows, whenever these change. I'm > particularly interested in content changes related to scrolling; when > I press next-line or scroll-up, etc., the window's content changes > even though the buffer is not modified. > > There are two things I think I think I'll need to know to achieve this. > > 1. Are there any hooks I can add to that run when the window's content > changes? Did you try looking in the ELisp manual? It has a node called "Window hooks" that describes some likely candidates. > 2. Are there variables that indicate the beginning and end positions > of the string that is being displayed on the screen? Did you try the manual? It describes (in the node "Window Start") two functions called `window-start' and `window-end' that sound like what you are looking for. > Additional motion-dependent question, extending 1, is: are there hooks > I can run when the cursor changes position (whether or not the > window's content changes)? The usual way to accomplish this is to put `point-entered' and `point-left' text properties on regions of text that you want to be cursor-sensitive. See the node "Special Properties" in the ELisp manual. Since the answers to your questions are readily available in the manual, could you please tell why you didn't find them? Perhaps indexing Needs Work (tm) (assuming you did try to find the relevant information using the index search).