all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@lsi.nec.co.jp>
Cc: emacs-devel@gnu.org
Subject: Re: Question about copy-region-as-kill
Date: 08 Apr 2002 15:18:24 +0900	[thread overview]
Message-ID: <buoelhqogr3.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <1018235388.4269.38.camel@space-ghost>

Colin Walters <walters@verbum.org> writes:
> > Whether or not they use the same underlying
> > mechanism is an implementation detail (about which others are more
> > knowledgable than I).
> 
> No, it's not just an implementation detail!  With the current text
> properties/overlays separation, it is going to be a big pain to change
> ibuffer to use overlays.

I am claiming that text-properties and overlays are desirable
_interfaces_ to certain bits of functionality.  If you `change ibuffer
to use overlays' you're changing which _interface_ you use.  This
interface change wouldn't be any easier if text-properties were
implemented in terms of some sort of super-overlay.

What you _really_ seem want (though you never seem to come right out and
say it; or at least I missed it) is to be able to have buffer-specific
text-properties without changing the interface you use.  That is, to
extend the functionality of text-properties to include something that
overlays do.  I happen to think this would be a great change to
text-properties -- but that doesn't mean that the existing
implementations are fatally flawed!  Maybe they are, but this isn't the
evidence that shows that.

> Maybe there is a better way to do it, but I really don't see one (if
> someone does, please speak up!).  And it will certainly be slower, as
> you noted in a different thread.  Not only that, but it will generate
> more garbage: I will have to cons up at least one cell for each string
> returned, plus bind lots of variables, *and* add properties to the
> overlay one at a time.

I think the right answer is to extend text-properties so that you can
control which ones are copied out of a buffer.  Note that this solution
has _none_ of the drawbacks you list above.  [well, I think, anyway,
since some of them were a bit vague]

> If we had extents like mechanism as the underlying implementation of
> both text properties and overlays, then I could fall back to just using
> the raw extents interface to solve my problem.

Since the `raw extents' interface is (I think!) overlay-like, it
sounds like you'd have all the same pain, actually.

> > We've already got an implementation that provides both; why change (but
> > see below)?
> 
> It provides both, as totally separate things.  I want to be able to pick
> and choose from the features of each.

Please be more specific.  One reason why I don't think having two
separate implementations is bad, is that I don't think the separation is
as arbitrary as you do.

So:

If there are text-property features that you think overlays should
have, state them, and give some practical justification why they would
be good.

If there are overlay features that you think text-properties should
have, state them, and give practical justification why they would
be good.

You've already given example of the latter -- you want buffer-specific
text properties.  Now, as it happens this particular feature would be
pretty trivial to implement using the existing text-property
implementation.

However, if there's a long list of such (well justified!) features, then
maybe you're right, and a merged implementation would be better.  There
are a lot of disadvantages to such a merged implementation, so there
has to be a lot of justification too.

> > From your description, it sounds like you would be happy if [certain]
> > text-properties could be optionally suppressed from being copied by a
> > user; true?
> 
> That would solve this particular problem, yes. 

Good.

> I guess the only thing I can say to this is that extents make a whole
> lot more sense to me.  I agree with you that text properties and
> overlays cover the majority of cases, but I think there is something
> more fundamental lying behind both of them.

I've been very happy with TPs and overlays -- except for the issue of
unwanted copying of text properties.  In previous discussions about
how to handle that problem, the main stumbling block was what policy to
use to copy, and a merged implementation wouldn't help that at all.

Cheers,

-Miles

-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]

  reply	other threads:[~2002-04-08  6:18 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03 23:23 Question about copy-region-as-kill John Wiegley
2002-04-05  6:02 ` Richard Stallman
2002-04-05 21:39   ` John Wiegley
2002-04-06  7:19     ` Eli Zaretskii
2002-04-06  8:21       ` John Wiegley
2002-04-06 10:29         ` Karl Eichwalder
2002-04-06 17:46           ` Kai Großjohann
2002-04-06 18:05             ` Alex Schroeder
2002-04-07 18:50               ` Richard Stallman
2002-04-08  1:23                 ` Miles Bader
2002-04-06 18:30             ` Karl Eichwalder
2002-04-06 23:03               ` Alan Shutko
2002-04-07  7:42                 ` Karl Eichwalder
2002-04-08 15:53                   ` Stefan Monnier
2002-04-08 21:21                     ` John Wiegley
2002-04-09  9:31                       ` Kim F. Storm
2002-04-09 11:03                         ` Eli Zaretskii
2002-04-09 10:23                           ` Miles Bader
2002-04-09 13:05                             ` Kim F. Storm
2002-04-09 13:24                               ` Miles Bader
2002-04-09 14:42                               ` Eli Zaretskii
2002-04-10 14:24                           ` Richard Stallman
2002-04-10 14:24                         ` Richard Stallman
2002-04-10 16:27                           ` Kim F. Storm
2002-04-11 14:53                             ` Richard Stallman
2002-04-11 16:27                               ` Kim F. Storm
2002-04-12 19:49                                 ` Richard Stallman
2002-04-12 10:36                               ` Francesco Potorti`
2002-04-09 15:26                       ` Per Abrahamsen
2002-04-09 21:28                         ` John Wiegley
2002-04-07  3:56               ` Tak Ota
2002-04-06 15:05         ` Andreas Schwab
2002-04-06 17:32     ` Richard Stallman
2002-04-06 20:38       ` John Wiegley
2002-04-06 23:03         ` Alex Schroeder
2002-04-07  0:12           ` Colin Walters
2002-04-07  0:56             ` Miles Bader
2002-04-07  2:53               ` John Wiegley
2002-04-07  4:44                 ` Colin Walters
2002-04-07  4:58                   ` Miles Bader
2002-04-07  5:32                     ` Colin Walters
2002-04-07  6:53                       ` Miles Bader
2002-04-07  7:46                         ` Colin Walters
2002-04-07  8:18                           ` Alex Schroeder
2002-04-07 12:20                           ` Miles Bader
2002-04-08  3:09                             ` Colin Walters
2002-04-08  6:18                               ` Miles Bader [this message]
2002-04-09 22:04                                 ` Colin Walters
2002-04-10 20:17                                   ` Richard Stallman
2002-04-09 12:07                               ` Richard Stallman
2002-04-09 22:12                                 ` Colin Walters
2002-04-07  6:36                   ` John Wiegley
2002-04-07  6:55                     ` Colin Walters
2002-04-07 23:42                   ` Richard Stallman
2002-04-08  3:14                     ` Colin Walters
2002-04-09 12:07                       ` Richard Stallman
2002-04-09 22:06                         ` Colin Walters
2002-04-07  4:41               ` Colin Walters
2002-04-07  4:58                 ` Miles Bader
2002-04-07  5:43                   ` Colin Walters
2002-04-07 10:52         ` Kai Großjohann
2002-04-06 17:43     ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buoelhqogr3.fsf@mcspd15.ucom.lsi.nec.co.jp \
    --to=miles@lsi.nec.co.jp \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.