emacs-devel
[Top][All Lists]
Advanced

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

Re: hook into window's content flux?


From: Eli Zaretskii
Subject: Re: hook into window's content flux?
Date: Tue, 04 Apr 2006 21:38:49 +0300

> From: Joe Corneli <address@hidden>
> 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).




reply via email to

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