From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luca Ferrari Newsgroups: gmane.emacs.help Subject: find when a word is within the current window Date: Wed, 23 Jan 2013 10:56:21 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1358934988 14965 80.91.229.3 (23 Jan 2013 09:56:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jan 2013 09:56:28 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 23 10:56:47 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 1Txx4Y-00051v-Ss for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 10:56:47 +0100 Original-Received: from localhost ([::1]:42545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Txx4H-0007m1-Np for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 04:56:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Txx4C-0007lu-01 for help-gnu-emacs@gnu.org; Wed, 23 Jan 2013 04:56:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Txx4B-0006as-0X for help-gnu-emacs@gnu.org; Wed, 23 Jan 2013 04:56:23 -0500 Original-Received: from mail-wg0-f50.google.com ([74.125.82.50]:63886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Txx4A-0006ae-Og for help-gnu-emacs@gnu.org; Wed, 23 Jan 2013 04:56:22 -0500 Original-Received: by mail-wg0-f50.google.com with SMTP id es5so1020311wgb.5 for ; Wed, 23 Jan 2013 01:56:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=5UjR0yPipluN/URf/PExqaKoR4byhvSWoi3MdQGxiPE=; b=rvWsWhnsmdUqe716/zpDx6++kcLuXHOKMNkjRi+pS+T5CJZQeSz565rtVvUbc27qBe a/eJE44hWcQ74dmiey5VqmFEZ4C8A+Z1X3gKeJuDk7nWU0VnZG0eYrESVf3cFoJQ7E2Y JrDNPIToDroE4jn5Oqpqsfty+1jyBSnjQZRVCLbD3ZsB0Z/BvYTM4xEIhhU2JAOgwC3T m70ClSJTD+9hwTWeJtMgMiM1aV1SVtwTZd9KM3M92EFcGij3t82ZLj7vokakaFxmTF6W Vj2BeEGWj8KL9V/aHehixSxrrybzI3tZhJlocIgGXDuN7wQfzOXv4CreFo/87Gs2Krh4 MyIw== X-Received: by 10.180.82.170 with SMTP id j10mr1297755wiy.2.1358934981858; Wed, 23 Jan 2013 01:56:21 -0800 (PST) Original-Received: by 10.194.39.1 with HTTP; Wed, 23 Jan 2013 01:56:21 -0800 (PST) X-Google-Sender-Auth: BGt3ms63hy15izgZ04NAOhSyj9Q X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.50 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:88779 Archived-At: 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. Thanks, Luca