From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: outline.el, killing, yanking, and invisibility Date: Sun, 02 May 2010 02:11:44 -0400 Message-ID: References: <87brij6fcd.fsf@beth.swift.xxx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272780726 4075 80.91.229.12 (2 May 2010 06:12:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 May 2010 06:12:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Matt Swift Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 02 08:12:05 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O8SPL-0003Wv-6Z for ged-emacs-devel@m.gmane.org; Sun, 02 May 2010 08:12:03 +0200 Original-Received: from localhost ([127.0.0.1]:44348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8SPK-0005Up-7A for ged-emacs-devel@m.gmane.org; Sun, 02 May 2010 02:12:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8SPE-0005UV-Mc for emacs-devel@gnu.org; Sun, 02 May 2010 02:11:56 -0400 Original-Received: from [140.186.70.92] (port=54227 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8SPD-0005UM-5Q for emacs-devel@gnu.org; Sun, 02 May 2010 02:11:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8SPB-0005nB-G3 for emacs-devel@gnu.org; Sun, 02 May 2010 02:11:55 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3307 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8SPB-0005n2-CS for emacs-devel@gnu.org; Sun, 02 May 2010 02:11:53 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAMu03EvO+KoL/2dsb2JhbACdLHK4ZYUSBIwogxE X-IronPort-AV: E=Sophos;i="4.52,311,1270440000"; d="scan'208";a="63068160" Original-Received: from 206-248-170-11.dsl.teksavvy.com (HELO pastel.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 02 May 2010 02:11:45 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8C1F482C3; Sun, 2 May 2010 02:11:44 -0400 (EDT) In-Reply-To: <87brij6fcd.fsf@beth.swift.xxx> (Matt Swift's message of "Tue, 13 Jul 2004 12:29:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124412 Archived-At: A mere 6 years ago, Matt Swift wrote: > The preservation of the invisibility of outline nodes over the > operations of killing and yanking was automatic in the old > `selective-display' implementation of Outline mode (ooutline.el now). > With the advent of overlays, this feature was sacrificed for the > advantages of an overlay implementation, and I have spent years > hacking now and then at ways to recover it. The more-recent advent of > yank-handlers provided me with a way to do it well, and I share this > way below. [...] > Below I include the relevant extracts of my own outline package. This looks like a good feature. With the new filter-buffer-substring-functions I have just installed in Emacs-Bzr, you should now be able to implement it cleanly, without any defadvice and without propertizing the whole buffer: just install a buffer-local filter-buffer-substring-function which will replace the overlay properties from the buffer by corresponding text-properties in the string (and add an appropriate yank-handler text property). Patch welcome, Stefan "always count on a prompt answer"