From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: yank-handler Date: Wed, 14 May 2003 12:03:16 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305141603.h4EG3HZW017616@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052931708 4272 80.91.224.249 (14 May 2003 17:01:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 14 May 2003 17:01:48 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 14 19:01:47 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19FzaP-0000sS-00 for ; Wed, 14 May 2003 18:58:37 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Fzhr-0003o3-00 for ; Wed, 14 May 2003 19:06:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FzUC-00065Q-03 for emacs-devel@quimby.gnus.org; Wed, 14 May 2003 12:52:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19FzTs-00063L-00 for emacs-devel@gnu.org; Wed, 14 May 2003 12:51:52 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19FzHG-0002Vl-00 for emacs-devel@gnu.org; Wed, 14 May 2003 12:38:53 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19Fyir-0007xb-00 for emacs-devel@gnu.org; Wed, 14 May 2003 12:03:17 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h4EG3Hx6017618 for ; Wed, 14 May 2003 12:03:17 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h4EG3HZW017616; Wed, 14 May 2003 12:03:17 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13865 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13865 I'd like to get diff-mode to behave as follows: If I kill a piece of a hunk and then yank it in some other buffer, the "[+-! ]" prefix added to each and every line should be removed (unless I'm yanking back into a diff-mode buffer or unless there's something like a "@@ -463,4 +463,36 @@" marker, obviously). I'm still not quite sure whether it's a good idea or not, but to figure that out, I'd like to experiment with it, but I can't seem to figure out how to do it. More specifically, it seems that the yank-handler property can only be set by passing the proper argument to `kill-new' (or one of its front men). Is that right ? Why is that ? I don't want to rebind C-k, C-w, M-w and whatnot just to do that. I'd rather either put the property directly on the text, or set some buffer-local `default-yank-handler-for-kill' variable. Any comment ? Stefan