From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: keymap in yank-excluded-properties Date: Fri, 30 Aug 2002 12:43:08 -0700 (PDT) Organization: Sony Electronics Inc. Sender: emacs-devel-admin@gnu.org Message-ID: <20020830.124308.81460907.Takaaki.Ota@am.sony.com> References: <20020822.173129.01368056.Takaaki.Ota@am.sony.com> <200208250525.g7P5PfH11882@wijiji.santafe.edu> <5x3ct2y2nr.fsf@kfs2.cua.dk> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1030736685 27455 127.0.0.1 (30 Aug 2002 19:44:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 30 Aug 2002 19:44:45 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17krhC-00078b-00 for ; Fri, 30 Aug 2002 21:44:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17ksE6-0005jb-00 for ; Fri, 30 Aug 2002 22:18:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kric-0007jf-00; Fri, 30 Aug 2002 15:46:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17krfs-0007Xi-00 for emacs-devel@gnu.org; Fri, 30 Aug 2002 15:43:20 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17krfq-0007X1-00 for emacs-devel@gnu.org; Fri, 30 Aug 2002 15:43:20 -0400 Original-Received: from mail6.fw-bc.sony.com ([160.33.98.73]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17krfo-0007WD-00; Fri, 30 Aug 2002 15:43:16 -0400 Original-Received: from mail1.bc.in.sel.sony.com (mail1.bc.in.sel.sony.com [43.144.65.11]) by mail6.fw-bc.sony.com (8.8.8/8.8.8) with ESMTP id TAA02013; Fri, 30 Aug 2002 19:43:11 GMT Original-Received: by mail1.bc.in.sel.sony.com id TAA10121; Fri, 30 Aug 2002 19:43:09 GMT Original-To: storm@cua.dk In-Reply-To: <5x3ct2y2nr.fsf@kfs2.cua.dk> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew-3.0.65 on Emacs-21.3.50.1 (i386-msvc-nt5.0.2195) of 2002-08-30 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7183 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7183 26 Aug 2002 00:49:44 +0200: storm@cua.dk (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. -Tak