From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.help Subject: Re: find when a word is within the current window Date: Wed, 23 Jan 2013 11:24:49 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358936714 31129 80.91.229.3 (23 Jan 2013 10:25:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jan 2013 10:25:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 23 11:25:33 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TxxWM-0005RD-Nk for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 11:25:30 +0100 Original-Received: from localhost ([::1]:54777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxxW5-0007sU-3C for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 05:25:13 -0500 Original-Path: usenet.stanford.edu!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.kpnqwest.it!news.kpnqwest.it.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 23 Jan 2013 04:24:47 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:FvuAtJWy0QJUrBmmRgrjR6TkXRg= Original-Lines: 16 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 212.46.182.85 Original-X-Trace: sv3-Tffa3gxdWs+wTpVsPNGmEPQul/KlcpY+/04JDnuc215SOjziadEwKb/Ry/SmEeTTuaxXi8y0aHrZYfU!qaio1P3/nGZnVSYnACmWuK2nX9f48X1wv89r3po60gTtEcHJZoeRTZ71O9EqWw== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1727 Original-Xref: usenet.stanford.edu gnu.emacs.help:196486 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88780 Archived-At: On Wed, Jan 23 2013, Luca Ferrari wrote: > Hi all, > I'm implementing a jump-to-label function that would split the current > window and scroll up/down within the same buffer to the point where a > label is defined. And it works! However, I'd like to have the split to > happen only when the label I'm searching for is not visible within the > current window (i.e., it makes sense to jump to it). How can I find if > a word is currently visible within the current window? I suspect, > since I already know at which line the label is, one way is to check > with window window boundaries against the label line number, but there > could be a smarter way. pos-visible-in-window-p seems appropriate. Helmut