From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Hyatt Subject: Adding the ability to archive into the datetree (updated) Date: Sat, 28 Jan 2012 23:43:35 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf3071c81a776e1604b7a35ff9 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrMc6-00067L-3I for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 23:43:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrMc5-0007o4-2s for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 23:43:38 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:42345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrMc5-0007l7-0K for emacs-orgmode@gnu.org; Sat, 28 Jan 2012 23:43:37 -0500 Received: by mail-vw0-f41.google.com with SMTP id fd1so2454001vbb.0 for ; Sat, 28 Jan 2012 20:43:36 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Bernt Hansen --20cf3071c81a776e1604b7a35ff9 Content-Type: text/plain; charset=ISO-8859-1 Hi everyone, I previously sent out a patch to add the ability to archive into the datetree. The ability to store finished items by date (along with any other journal-type entry) seems pretty useful to me, which is why I wrote this. Bernt Hansen did a review of my previous patch, and did a great job in testing it out, catching several issues. Thanks, Bernt! I've fixed all the reported issues, and am attaching the modified patch. I'd love for this to get into the next release. If anyone has a desire to try this out, I'd love to hear if it is clear how to use it, and if you encounter any issues. --20cf3071c81a776e1604b7a35ff9 Content-Type: application/octet-stream; name="0001-Add-the-ability-to-archive-to-the-datetree.patch" Content-Disposition: attachment; filename="0001-Add-the-ability-to-archive-to-the-datetree.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxzl1yrn0 RnJvbSBhOGI3ZTM2MGE2NjE1NDMxOWUxNzhlZWQwNzc2MGU0NmVhYmQ2MjdlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyZXcgSHlhdHQgPGFoeWF0dEBnbWFpbC5jb20+CkRhdGU6 IFNhdCwgMjggSmFuIDIwMTIgMjE6NDE6MDEgLTA1MDAKU3ViamVjdDogW1BBVENIXSBBZGQgdGhl IGFiaWxpdHkgdG8gYXJjaGl2ZSB0byB0aGUgZGF0ZXRyZWUuCgotLS0KIGRvYy9vcmcudGV4aSAg ICAgICAgfCAgIDIyICsrKysrKysrKysrKystLS0tLS0tLS0KIGxpc3Avb3JnLWFyY2hpdmUuZWwg fCAgIDI3ICsrKysrKysrKysrKysrKysrKysrKy0tLS0tLQogbGlzcC9vcmcuZWwgICAgICAgICB8 ICAgMTAgKysrKysrKysrKwogMyBmaWxlcyBjaGFuZ2VkLCA0NCBpbnNlcnRpb25zKCspLCAxNSBk ZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9kb2Mvb3JnLnRleGkgYi9kb2Mvb3JnLnRleGkKaW5k ZXggOTU4MWNlYy4uMTFjOTA2ZiAxMDA2NDQKLS0tIGEvZG9jL29yZy50ZXhpCisrKyBiL2RvYy9v cmcudGV4aQpAQCAtNjg3MCwxNiArNjg3MCwyMCBAQCBpcyBpbnZva2VkLCB0aGUgbGV2ZWwgMSB0 cmVlcyB3aWxsIGJlIGNoZWNrZWQuCiBAY2luZGV4IGFyY2hpdmUgbG9jYXRpb25zCiBUaGUgZGVm YXVsdCBhcmNoaXZlIGxvY2F0aW9uIGlzIGEgZmlsZSBpbiB0aGUgc2FtZSBkaXJlY3RvcnkgYXMg dGhlCiBjdXJyZW50IGZpbGUsIHdpdGggdGhlIG5hbWUgZGVyaXZlZCBieSBhcHBlbmRpbmcgQGZ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