From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: sorting entries on date created? Date: Wed, 29 Apr 2009 13:41:54 -0400 Message-ID: <8410.1241026914@alphaville.usa.hp.com> References: <87prevbein.wl%MarkoSchuetz@web.de> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LzDoT-00051t-SQ for emacs-orgmode@gnu.org; Wed, 29 Apr 2009 13:43:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LzDoS-000501-PH for emacs-orgmode@gnu.org; Wed, 29 Apr 2009 13:43:16 -0400 Received: from [199.232.76.173] (port=52640 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LzDoQ-0004zk-Ho for emacs-orgmode@gnu.org; Wed, 29 Apr 2009 13:43:14 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:6186) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LzDoP-0001s1-PC for emacs-orgmode@gnu.org; Wed, 29 Apr 2009 13:43:13 -0400 In-Reply-To: Message from Marko =?us-ascii?Q?=3D=3FISO-8859-1=3FQ=3FSch=3D?= =?us-ascii?Q?FCtz=3F=3D?= of "Wed\, 29 Apr 2009 12\:39\:28 EDT." <87prevbein.wl%MarkoSchuetz@web.de> 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: Marko =?us-ascii?Q?=3D=3FISO-8859-1=3FQ=3FSch=3DFCtz=3F=3D?= Cc: Org Mode Mailing List Marko Sch=C3=BCtz wrote: > I use remember to add todo entries. Mine look like this >=20 > ** TODO kpdf as standard pdf viewer from auctex > [2008-07-19 Sat] >=20 > where the inactive timestamp is added at creation. >=20 > I'd like to use org-sort to sort such entries by creation date. I'd > assume I could use sorting-type ?f with a suitable getkey-func. So, is > there already a function in org that I could use to extract this date? >=20 Not sure if this helps (it does not answer your question directly): There are two places in org-sort-entries-or-items (which is called by org-sort under the conditions at hand) where a regexp, org-ts-regexp, is used when sorting-type is selected to be ?t: one is for when you are sorting plain lists and the other is when you are sorting top-level entries or the active region. If you change the relevant instance of org-ts-regexp to org-ts-regexp-both, it will match both active and inactive timestamps and sort appropriately. I have not tried to figure out what happens if there are multiple timestamps, active or inactive, in an entry. But if you just have a single inactive timestamp per entry, as you have indicated above, that should work. HTH, Nick