[Top][All Lists]

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

Re: keymap in yank-excluded-properties

From: Tak Ota
Subject: Re: keymap in yank-excluded-properties
Date: Fri, 30 Aug 2002 12:43:08 -0700 (PDT)

26 Aug 2002 00:49:44 +0200: address@hidden (Kim F. Storm) wrote:

> Perhaps a new text property `yank-function' which takes a function as value.
> `yank' will look for that property on kill-ring elements and call the
> function with one argument: the string (or rectangle?) to yank.  The
> function is then responsible for inserting the string in the buffer
> and remove any unwanted properties [i.e. it is expected to do the
> actual insertion].
> A table could have this property set to a function which check that 
> the string to insert is really a complete table -- and keep the 
> properties in that case [using insert] -- or remove the properties 
> otherwise [using insert-for-yank].
> This is a simple, but flexible concept which may be used for other
> purposes as well; for example, text killed by a "special" function
> [e.g. kill-rectangle] may be later inserted using plain C-y by another
> special function [e.g. insert-rectangle].

I think this is a neat idea.  However, there is a discussion whether
we want `yank-function' that takes over whole `yank' operation or
`yank-insert-function' that replaces only `insert-for-yank' part of
`yank'.  `insert-for-yank' is the one that actually strips off the
undesired text properties.

I prefer later from `table.el' application point of view but the
former is more generic and flexible.  But then that flexibility
involves the relationship with command replacement which is out of the
scope of this discussion.


reply via email to

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