all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to test :invisible property?
@ 2007-12-27 13:49 Lennart Borgman (gmail)
  2007-12-27 13:51 ` Lennart Borgman (gmail)
  2007-12-29  7:45 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-27 13:49 UTC (permalink / raw)
  To: Emacs Devel

Is there an elisp function that tests the :invisible property against 
buffer-invisibility-spec?

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

* Re: How to test :invisible property?
  2007-12-27 13:49 How to test :invisible property? Lennart Borgman (gmail)
@ 2007-12-27 13:51 ` Lennart Borgman (gmail)
  2007-12-27 14:23   ` Lennart Borgman (gmail)
  2007-12-29  7:45 ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-27 13:51 UTC (permalink / raw)
  To: Emacs Devel

Lennart Borgman (gmail) wrote:
> Is there an elisp function that tests the :invisible property against 
> buffer-invisibility-spec?

I mean the  'invisible property

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

* Re: How to test :invisible property?
  2007-12-27 13:51 ` Lennart Borgman (gmail)
@ 2007-12-27 14:23   ` Lennart Borgman (gmail)
  2007-12-27 14:36     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-27 14:23 UTC (permalink / raw)
  To: Emacs Devel

Lennart Borgman (gmail) wrote:
> Lennart Borgman (gmail) wrote:
>> Is there an elisp function that tests the :invisible property against 
>> buffer-invisibility-spec?
> 
> I mean the  'invisible property

There is actually a function in simple.el:

   (defun line-move-invisible-p (pos)
   "Return non-nil if the character after POS is currently invisible."

Maybe this should be mentioned in

   (info "(elisp) Invisible Text")

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

* Re: How to test :invisible property?
  2007-12-27 14:23   ` Lennart Borgman (gmail)
@ 2007-12-27 14:36     ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-27 14:36 UTC (permalink / raw)
  To: Emacs Devel

Lennart Borgman (gmail) wrote:
> Lennart Borgman (gmail) wrote:
>> Lennart Borgman (gmail) wrote:
>>> Is there an elisp function that tests the :invisible property against 
>>> buffer-invisibility-spec?
>>
>> I mean the  'invisible property
> 
> There is actually a function in simple.el:
> 
>   (defun line-move-invisible-p (pos)
>   "Return non-nil if the character after POS is currently invisible."
> 
> Maybe this should be mentioned in
> 
>   (info "(elisp) Invisible Text")


But that function seems not correct. The "(or is list with members in 
common)" in the docs string of buffer-invisibility-spec does not seem to 
be implemented.

BTW that doc string is not quite correct.

Here is a new version of the function above which I believe is correct:

(defun line-move-invisible-p (pos)
   "Return non-nil if the character after POS is currently invisible."
   (let ((prop
          (get-char-property pos 'invisible)))
     (if (eq buffer-invisibility-spec t)
         prop
       (if (listp prop)
           (catch 'invis
             (dolist (p prop)
               (when (or (memq p buffer-invisibility-spec)
                         (assq p buffer-invisibility-spec))
                 (throw 'invis t))))
         (or (memq prop buffer-invisibility-spec)
             (assq prop buffer-invisibility-spec))))))

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

* Re: How to test :invisible property?
  2007-12-27 13:49 How to test :invisible property? Lennart Borgman (gmail)
  2007-12-27 13:51 ` Lennart Borgman (gmail)
@ 2007-12-29  7:45 ` Stefan Monnier
  2007-12-29 11:51   ` Lennart Borgman (gmail)
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2007-12-29  7:45 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

> Is there an elisp function that tests the :invisible property against
> buffer-invisibility-spec?

`invisible-p'


        Stefan

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

* Re: How to test :invisible property?
  2007-12-29  7:45 ` Stefan Monnier
@ 2007-12-29 11:51   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2007-12-29 11:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs Devel

Stefan Monnier wrote:
>> Is there an elisp function that tests the :invisible property against
>> buffer-invisibility-spec?
> 
> `invisible-p'


Thanks, I do not have it. I guess this is a new function?

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

end of thread, other threads:[~2007-12-29 11:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-27 13:49 How to test :invisible property? Lennart Borgman (gmail)
2007-12-27 13:51 ` Lennart Borgman (gmail)
2007-12-27 14:23   ` Lennart Borgman (gmail)
2007-12-27 14:36     ` Lennart Borgman (gmail)
2007-12-29  7:45 ` Stefan Monnier
2007-12-29 11:51   ` Lennart Borgman (gmail)

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.