From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Shlyakhter Subject: Re: org-log-note-headings 'state Date: Thu, 29 Mar 2012 17:27:28 -0400 Message-ID: <4F74D3C0.80005@alum.mit.edu> References: <873992lmm8.fsf@hecubus.retroj.net> <874nt9of38.fsf@gnu.org> <87vclpjy02.fsf@hecubus.retroj.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDMsb-0007bE-DT for emacs-orgmode@gnu.org; Thu, 29 Mar 2012 17:27:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDMsZ-0000zM-Od for emacs-orgmode@gnu.org; Thu, 29 Mar 2012 17:27:36 -0400 Received: from mail-qc0-f169.google.com ([209.85.216.169]:64824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDMsZ-0000yg-I7 for emacs-orgmode@gnu.org; Thu, 29 Mar 2012 17:27:35 -0400 Received: by qcsd16 with SMTP id d16so1906265qcs.0 for ; Thu, 29 Mar 2012 14:27:32 -0700 (PDT) In-Reply-To: <87vclpjy02.fsf@hecubus.retroj.net> 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: John J Foerch Cc: emacs-orgmode@gnu.org On 3/27/2012 9:49 PM, John J Foerch wrote: >>> These thoughts lead me to suggest that maybe org-log-note-headings is no >>> longer sufficient to its original purpose, because extensions wish to >>> parse state changes, but that blocks users from configuring the formats. >>> Perhaps it is time to replace it with something that guarantees ability >>> to parse. > I have been experimenting with parsing the format-string to build a > regexp to match the generated-strings. This approach depends upon the > parsability of the expansions of each of the percent-codes. As concerns > org-log-note-headings, %t, %T, %d, %D, %s, %S, and %u all have parseable > expansions, as far as I can tell. I'm not sure about %U, but if the > rest of the string is not too complicated, it shouldn't be a problem. > Format-code flag, width, and precision add some complexity to the > problem of generating regexps to match the codes, and I haven't done > that bit yet. Overall I think this could be a very viable approach, and > I'll paste my scraps of code below: > > ;;; parsing state changes > ;;; Thanks a lot -- I also need the ability to parse state changes for an extension I am writing. It'll be very useful if you could post the final working version of your patch for this. thanks, ilya