emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about copy-region-as-kill


From: Kim F. Storm
Subject: Re: Question about copy-region-as-kill
Date: 10 Apr 2002 18:27:34 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

Richard Stallman <address@hidden> writes:

> It might be possible to divide all major modes into a few named
> categories, such that we could design a reasonable plan for what to do
> with text props on copying of text, given the category of the buffer
> being copied from and the category of the buffer being copied to.

This scheme may cover perhaps 90% of all cases, so I still think having
buffer-local lists of properties to discard on copy/yank would provide
a (possible) solution for the last 10%...

> 
> Here is a starting list of categories:
> 
> A. Buffers where properties are determined from the characters.
> (E.g., programming language mode using font-lock, Rmail, and Info.)
> 
> B. Buffers where properties are put on by Lisp code but can't be
> determined from the characters.  (E.g., the minibuffer, the output
> of list-faces-display, and Shell mode).
> 
> C. Buffers which should have no text properties.
> (E.g., programming language mode without font-lock).
> 
> D. Buffers where properties can be assigned by users.
> (E.g., Enriched mode, and maybe Fundamental mode).
> 
> Perhaps all text properties should be discarded when copying into
> buffers of categories A, B and C.  But what should be done with images
> copied into these buffers?

Again, it depends...  E.g. if we enhance RMAIL to show small icons
for unread or urgent messages (or whatever), we don't want to copy
those images -- but if a mail message contains an image, we would
(probably) want to copy that (as an image).

> 
> Perhaps certain specific properties should be discarded when
> copying into category D buffers.
> 
Such as mouse-face and read-only...

> Are any more alternative categories or subdivisions of them needed?

Can't think of any, but I suppose there will be those 10% of special
cases which will never fit (entirely) into a specific category.

But what about (also) having a user command:

        yank-without-properties

which can be bound to C-Y (when supported) and C-x C-y?

-- 
Kim F. Storm <address@hidden> http://www.cua.dk




reply via email to

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