all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to check if point is on a line starting a hidden paragraph?
@ 2010-07-21 17:47 Tassilo Horn
  2010-07-21 17:59 ` Teemu Likonen
  0 siblings, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2010-07-21 17:47 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I need a predicate that checks if the current line after which some
hidden text follows.  I mean those lines ending in an artificial `...'.

Concrete examples are outlines whose contents are hidden, or lines in
gnus summary buffers whose subthread is hidden, or lines after which
more indented text is hidden when using selective-display.

Any ideas?

Bye,
Tassilo




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

* Re: How to check if point is on a line starting a hidden paragraph?
  2010-07-21 17:47 How to check if point is on a line starting a hidden paragraph? Tassilo Horn
@ 2010-07-21 17:59 ` Teemu Likonen
  2010-07-21 18:01   ` Teemu Likonen
  0 siblings, 1 reply; 4+ messages in thread
From: Teemu Likonen @ 2010-07-21 17:59 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

* 2010-07-21 19:47 (+0200), Tassilo Horn wrote:

> I need a predicate that checks if the current line after which some
> hidden text follows. I mean those lines ending in an artificial `...'.
>
> Concrete examples are outlines whose contents are hidden, or lines in
> gnus summary buffers whose subthread is hidden, or lines after which
> more indented text is hidden when using selective-display.

Something like this perhaps?

    (defun invisible-text-starts-from-this-line-p ()
      (save-excursion
        (goto-char (line-end-position))
        (invisible-p (point))))



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

* Re: How to check if point is on a line starting a hidden paragraph?
  2010-07-21 17:59 ` Teemu Likonen
@ 2010-07-21 18:01   ` Teemu Likonen
  2010-07-21 18:21     ` Tassilo Horn
  0 siblings, 1 reply; 4+ messages in thread
From: Teemu Likonen @ 2010-07-21 18:01 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

* 2010-07-21 20:59 (+0300), Teemu Likonen wrote:

>     (defun invisible-text-starts-from-this-line-p ()
>       (save-excursion
>         (goto-char (line-end-position))
>         (invisible-p (point))))

I wrote too quickly. That can be simplified:

    (defun invisible-text-starts-here-p ()
      (invisible-p (line-end-position)))



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

* Re: How to check if point is on a line starting a hidden paragraph?
  2010-07-21 18:01   ` Teemu Likonen
@ 2010-07-21 18:21     ` Tassilo Horn
  0 siblings, 0 replies; 4+ messages in thread
From: Tassilo Horn @ 2010-07-21 18:21 UTC (permalink / raw)
  To: help-gnu-emacs

Teemu Likonen <tlikonen@iki.fi> writes:

Hi Teemu,

> I wrote too quickly. That can be simplified:
>
>     (defun invisible-text-starts-here-p ()
>       (invisible-p (line-end-position)))

Perfectly.  Thanks a lot.

Bye,
Tassilo




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

end of thread, other threads:[~2010-07-21 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 17:47 How to check if point is on a line starting a hidden paragraph? Tassilo Horn
2010-07-21 17:59 ` Teemu Likonen
2010-07-21 18:01   ` Teemu Likonen
2010-07-21 18:21     ` Tassilo Horn

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.