all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Text/overlay property to hide buffer contents from lisp?
@ 2011-04-10  8:49 Tom
  2011-04-10 16:02 ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Tom @ 2011-04-10  8:49 UTC (permalink / raw
  To: help-gnu-emacs

I know there are the `invisible' and `intangible' properties to
hide parts of the buffer from the user, but these hidden regions
are apparently not hidden from lisp commands like
query-replace-regexp.

Is there a property which can hide buffer contents like narrow
does, so that lisp commands can't access it either? 





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

* Re: Text/overlay property to hide buffer contents from lisp?
       [not found] <mailman.3.1302425364.25365.help-gnu-emacs@gnu.org>
@ 2011-04-10 14:16 ` Stefan Monnier
  2011-04-10 15:05   ` Tom
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2011-04-10 14:16 UTC (permalink / raw
  To: help-gnu-emacs

> I know there are the `invisible' and `intangible' properties to
> hide parts of the buffer from the user, but these hidden regions
> are apparently not hidden from lisp commands like
> query-replace-regexp.

> Is there a property which can hide buffer contents like narrow
> does, so that lisp commands can't access it either? 

Other than delete-region, no.


        Stefan


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

* Re: Text/overlay property to hide buffer contents from lisp?
  2011-04-10 14:16 ` Stefan Monnier
@ 2011-04-10 15:05   ` Tom
  0 siblings, 0 replies; 5+ messages in thread
From: Tom @ 2011-04-10 15:05 UTC (permalink / raw
  To: help-gnu-emacs

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> > Is there a property which can hide buffer contents like narrow
> > does, so that lisp commands can't access it either? 
> 
> Other than delete-region, no.
> 

It's pity, because it could be useful.

I don't know if emacs maintainers plan to implement this feature someday,
but if they don't they should.





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

* Re: Text/overlay property to hide buffer contents from lisp?
  2011-04-10  8:49 Text/overlay property to hide buffer contents from lisp? Tom
@ 2011-04-10 16:02 ` Andreas Röhler
  2011-04-10 17:51   ` Perry Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2011-04-10 16:02 UTC (permalink / raw
  To: help-gnu-emacs

Am 10.04.2011 10:49, schrieb Tom:
> I know there are the `invisible' and `intangible' properties to
> hide parts of the buffer from the user, but these hidden regions
> are apparently not hidden from lisp commands like
> query-replace-regexp.
>

If query-replacs goes into `intangible' sounds like a bug for me.

Whilst with `invisible' it seems reasonable. Emacs don't need eyes... :)

Cheers

Andreas

> Is there a property which can hide buffer contents like narrow
> does, so that lisp commands can't access it either?
>
>
>
>




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

* Re: Text/overlay property to hide buffer contents from lisp?
  2011-04-10 16:02 ` Andreas Röhler
@ 2011-04-10 17:51   ` Perry Smith
  0 siblings, 0 replies; 5+ messages in thread
From: Perry Smith @ 2011-04-10 17:51 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]


On Apr 10, 2011, at 11:02 AM, Andreas Röhler wrote:

> Am 10.04.2011 10:49, schrieb Tom:
>> I know there are the `invisible' and `intangible' properties to
>> hide parts of the buffer from the user, but these hidden regions
>> are apparently not hidden from lisp commands like
>> query-replace-regexp.
>> 
> 
> If query-replacs goes into `intangible' sounds like a bug for me.
> 
> Whilst with `invisible' it seems reasonable. Emacs don't need eyes... :)

`intangible' is a new concept to me.  For anyone else trying to follow along, intangible is documented in the Elisp manual (but not in Emacs' Concept Index which is the first place I looked).

One thing it mentions:

>      When the variable `inhibit-point-motion-hooks' is non-`nil', the
>      `intangible' property is ignored.


I assume that is not set but it might be.

From grep'ing the source and looking at what is in the Elisp manual and the comments in the code, I too would expect searches to not enter intangible areas.  The code also mentioned "sticky forward" and "sticky backward" -- not sure what that is (yet) but that might be affecting things too.


[-- Attachment #2: Type: text/html, Size: 1895 bytes --]

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

end of thread, other threads:[~2011-04-10 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10  8:49 Text/overlay property to hide buffer contents from lisp? Tom
2011-04-10 16:02 ` Andreas Röhler
2011-04-10 17:51   ` Perry Smith
     [not found] <mailman.3.1302425364.25365.help-gnu-emacs@gnu.org>
2011-04-10 14:16 ` Stefan Monnier
2011-04-10 15:05   ` Tom

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.