emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yanking text properties


From: Richard Stallman
Subject: Re: Yanking text properties
Date: Fri, 2 Nov 2001 19:00:01 -0700 (MST)

    Aren't there some properties we never want to yank?  In that case we
    could change Emacs to

    3. Never copy these special text properties with kill/yank.

    Or we could do it with a buffer local variable:

    4. (setq yank-ignore-properties '(field read-only intangible)

If we implement a variable saying not to copy certain properties,
that variable could easily be given a local binding in some buffers.
So the real question is this: is it the case that certain properties
should never be copied?  Is that kind of interface the right one?

If we are not avoid copying certain properties, where should that be
done?  Perhaps in `insert' is the best place.  That way,
buffer-substring will show you all these properties, and there is no
need to try to distinguish between "copying text out of the buffer"
(to kill it) and "looking at what's in the buffer" (not for purposes
of killing).

    Or we could disable the special properties on a buffer per buffer
    basis, so they are still copied, just ignored:

    5. (setq inhibit-text-properties '(field read-only intangible))

This doesn't fit the job.  The most generic case is where you copy the
text with special properties into some Fundamental mode buffer.  If we
want to use this approach and have it solve the problem, we would need
to have inhibit-text-properties set globally to ignore those
properties.

But that means it is really a matter of *enabling* the functioning of
these properties in certain special contexts, not disabling them in
certain special contexts.  So it would be better to have a way to say
which of these properties should function, not which ones to ignore.

But is this the right interface?  Is saying that "intangible should
work in this buffer" for certain specific buffers really the right
functionality?  Or is saying "it is ok to insert intangible properties
into this buffer" the right functionality?

I tend to think an interface that lets you say "it is ok to insert
intangible properties into this buffer" is the best.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]