From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Engster Subject: Re: Timestamps in properties not exported by icalendar exporter Date: Sat, 22 Feb 2014 17:12:15 +0100 Message-ID: <87y513gm8w.fsf@engster.org> References: <87bny0ia7d.fsf@engster.org> <87lhx34h2h.fsf@gmail.com> <877g8nig99.fsf@engster.org> <871tyvz86p.fsf@gmail.com> <8738jbi8tm.fsf@engster.org> <87sirbxnx9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHFBl-0004lZ-5m for emacs-orgmode@gnu.org; Sat, 22 Feb 2014 11:12:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHFBf-0003Fu-5q for emacs-orgmode@gnu.org; Sat, 22 Feb 2014 11:12:29 -0500 Received: from randomsample.de ([5.45.97.173]:49516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHFBe-0003C8-R4 for emacs-orgmode@gnu.org; Sat, 22 Feb 2014 11:12:23 -0500 In-Reply-To: <87sirbxnx9.fsf@gmail.com> (Nicolas Goaziou's message of "Sat, 22 Feb 2014 14:44:02 +0100") 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: > David Engster writes: > >> It's these multitude of timestamp locations which makes changing the >> timestamp of an existing entry through Elisp so tedious (I had to deal >> with that in org-caldav) > > The number of locations may be daunting but all of them make sense > actually. Also, I don't think it is really difficult to change > a timestamp through Elisp, due to specialized functions (e.g. > `org-schedule'). Not difficult, but tedious. The problem is that an entry might have several timestamps, and you have to find the correct one to change. > Anyway, if you think this area can be improved, feel free to make > suggestions. I'm actually not sure what org-element is capable of nowadays. What I'd like to have is a way to parse entries into a structure which lets me access certain elements of the entry, like headline, timestamps, properties, body text, etc., and also a way to convert this structure *back* to a plain Org entry. This way, I could change certain elements of the entry in a robust way. It might be that the *appearance* of the entry changes a bit during this procedure, but its elements should be preserved. (BTW: This is similar to what we have in CEDET, where the Semantic parser generates 'tags' which describes things like variable or function declarations, and you can define SRecode templates which can generate textual output from these tags in pretty much any way you like.) For example, in org-caldav I had to write a function which changes the headline of an entry, but preserves any timestamps which might be in it. Again: not difficult to do, especially since there is org-complex-heading-regexp, but it's still tedious since Org entries are so flexible in their appearance. >> so using a property for it seemed like a good idea. > > This has been discussed a few times on this ML already. > > Carsten's argument is that new users shouldn't have to deal with hidden > data, like property drawers, for such basic features. Oh no, the user shouldn't have to do this, I agree completely. Properties are nice for *code*, since they can be easily parsed. -David