From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?KOI8-R?B?5dfHxc7JyiDiz8zExc7Lz9c=?= Subject: TODO is red in MobileOrg - the problem in org-mobile.el Date: Thu, 19 May 2011 10:35:40 +0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMwpk-0007b4-Cg for emacs-orgmode@gnu.org; Thu, 19 May 2011 02:35:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMwpj-0007P8-CX for emacs-orgmode@gnu.org; Thu, 19 May 2011 02:35:44 -0400 Received: from mail-px0-f171.google.com ([209.85.212.171]:58680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMwpj-0007Oe-7o for emacs-orgmode@gnu.org; Thu, 19 May 2011 02:35:43 -0400 Received: by pxi7 with SMTP id 7so1621500pxi.30 for ; Wed, 18 May 2011 23:35:41 -0700 (PDT) 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 I had some problem with the way MobileOrg display TODO states. But it evidently the problem is not in MobileOrg, but in org-mobile.el. There are several TODO states defined in my org files. This is done by including this line to org file: #+SEQ_TODO: TODO(t) MAYBE(m) WAITING(w) APPT(a) | DONE(d) CANCELLED(c) DEFERRED(f) The tags from the first part needs some actions and should be displayed in red while the tags from the second doesn't assume any actions and should be displayed in green. In MobileOrg "CANCELLED" and "DEFERRED" where green but "DONE" was red. Another thing - in MobileOrg the list of the possible TODO states contained two DONE items, all other items were listed only once. Having examined the index.org file, which was generated for MobileOrg, I saw two lines: #+TODO: TODO DONE #+TODO: MAYBE WAITING APPT | DONE CANCELLED DEFERRED So, that was a problem. The first line contains default TODO types, which are defined in org-todo-keywords (org.el). The second line contains my custom TODO types. This is a problem of defailt org-mode settings. org-mobile.el (in function org-mobile-create-index-file) write default TODO types in first line. Then it excludes default types from my custom list and writes the rest to the second line. As default, the value of org-todo keywords is ((sequence "TODO" "DONE")). So, org-mobile.el have no way to determine which of these to types need some action and which doesn't need. This information could be obtained from my custom string "+SEQ_TODO", but org-mobile-create-index-file ignores it. It would be better to write all the custom TODO types in the first line. In the second line should be default values except for the same as custom. The modification of org-mobile.el is needed. I could suggest another solution without org-mobile.el modification. I simply set the value of org-todo-keywords to nil in my ~/.emacs. Now I have only one record in index.org: #+TODO: TODO MAYBE WAITING APPT | DONE CANCELLED DEFERRED This have solved my problem and now "DONE" is displayed in green in MobileOrg. Org-mode 7.3, MobileOrg Android 0.5.5.