From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pete Phillips Subject: Re: How to copy an agenda buffer into another buffer for editing Date: Wed, 17 Jan 2007 12:04:39 +0000 Message-ID: <22244.1169035479@lap1.smtl.co.uk> References: <19307.1168962923@lap1.smtl.co.uk> <04281800b8c6d767df83d777695c7b2d@science.uva.nl> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H79X4-0004ci-0w for emacs-orgmode@gnu.org; Wed, 17 Jan 2007 07:04:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H79X2-0004b3-BB for emacs-orgmode@gnu.org; Wed, 17 Jan 2007 07:04:45 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H79X2-0004aZ-22 for emacs-orgmode@gnu.org; Wed, 17 Jan 2007 07:04:44 -0500 Received: from [193.131.77.174] (helo=mailhost.smtl.co.uk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H79X1-0002NT-BL for emacs-orgmode@gnu.org; Wed, 17 Jan 2007 07:04:43 -0500 In-Reply-To: Message from Carsten Dominik of "Tue, 16 Jan 2007 23:52:13 +0100." <04281800b8c6d767df83d777695c7b2d@science.uva.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org Hi Carsten >>>>> "Carsten" == Carsten Dominik writes: Carsten> Now that is an interesting bug, and it is actually Carsten> dangerous. :-) Carsten> This is, in fact, a dangerous bug, because if, for example, Carsten> you press C-k on one of those lines, the corresponding Carsten> entry in the org-mode file or in the diary will be Carsten> *removed*. So don't do that, and I hope you have not Carsten> destroyed something already. Nearly. Thank goodness for undo eh ? Carsten> A work-around is to use the following function to copy the Carsten> region from the agenda buffer. It does the same thing as Carsten> M-w, but does not take along any text properties. I haven't tried that because I tried: Carsten> Hmmmmm, I am just thinking, that a general solution for Carsten> this might instead be: Carsten> (add-hook 'org-agenda-mode-hook (lambda () Carsten> (make-local-variable 'buffer-substring-filters) (setq Carsten> buffer-substring-filters (cons (lambda (x) Carsten> (set-text-properties 0 (length x) nil x) x) Carsten> buffer-substring-filters)))) and this works (once I killed the *Org Agenda* buffer off and regenerated it). Superb. Thanks. Pete