all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* find when a word is within the current window
@ 2013-01-23  9:56 Luca Ferrari
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Ferrari @ 2013-01-23  9:56 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: find when a word is within the current window
       [not found] <mailman.18143.1358934985.855.help-gnu-emacs@gnu.org>
@ 2013-01-23 10:24 ` Helmut Eller
  2013-01-23 10:49   ` Luca Ferrari
  0 siblings, 1 reply; 3+ messages in thread
From: Helmut Eller @ 2013-01-23 10:24 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: find when a word is within the current window
  2013-01-23 10:24 ` Helmut Eller
@ 2013-01-23 10:49   ` Luca Ferrari
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Ferrari @ 2013-01-23 10:49 UTC (permalink / raw)
  To: Helmut Eller; +Cc: help-gnu-emacs

Thanks! It's what I was looking for.

Luca



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-23 10:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23  9:56 find when a word is within the current window Luca Ferrari
     [not found] <mailman.18143.1358934985.855.help-gnu-emacs@gnu.org>
2013-01-23 10:24 ` Helmut Eller
2013-01-23 10:49   ` Luca Ferrari

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.