all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: find when a word is within the current window
Date: Wed, 23 Jan 2013 11:24:49 +0100	[thread overview]
Message-ID: <m2sj5s8adq.fsf@gmail.com> (raw)
In-Reply-To: mailman.18143.1358934985.855.help-gnu-emacs@gnu.org

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


       reply	other threads:[~2013-01-23 10:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.18143.1358934985.855.help-gnu-emacs@gnu.org>
2013-01-23 10:24 ` Helmut Eller [this message]
2013-01-23 10:49   ` find when a word is within the current window Luca Ferrari
2013-01-23  9:56 Luca Ferrari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sj5s8adq.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.