From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: bug in getting category Date: Sat, 22 Oct 2011 16:25:13 +0200 Message-ID: <87lisdt86u.wl%n142857@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHcVi-00038y-Eb for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 10:25:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHcVh-0000wq-B2 for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 10:25:18 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:64342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHcVg-0000wg-SB for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 10:25:17 -0400 Received: by wwf27 with SMTP id 27so1431478wwf.30 for ; Sat, 22 Oct 2011 07:25:15 -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: org-mode Mailinglist Hi, with org-mode from today I created a file miso.org with this content: --------------------------------------------------- * aaa :PROPERTIES: :CATEGORY: bbb :END: ** TODO ccc ---------------------------------------------------- Then I used an ~/.emacs which said: ---------------------------------------------------- (progn (add-to-list 'load-path "/w/org-mode/lisp") (require 'org-install) (= require 'org) (require 'org-agenda)) (org-agenda-get-day-entries "/home/dc/miso.org" '(10 22 2011) :todo) ---------------------------------------------------- And after running =E2=80=9Eemacs=E2=80=9C I got: ---------------------------------------------------- Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("^ +" nil) (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt))) (progn (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil t= xt))) (setq txt =E2=80=A6 (unwind-protect (progn (if (string-match "^ +" txt) (setq txt (replace-ma= tch "" nil nil tx=E2=80=A6 (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if= (string-match "^ +" txt) =E2=80=A6 (save-match-data (if (string-match "^ +" txt) (setq txt (replace-match ""= nil nil txt))) (setq =E2=80=A6 org-format-agenda-item("" nil #("bbb" 0 3 (fontified nil org-category "mi= so")) nil) (setq marker (org-agenda-new-marker (match-beginning 0)) category (org-ge= t-category) txt (match-string 1) =E2=80=A6 (catch :skip (save-match-data (beginning-of-line) (setq beg (point) end (= save-excursion (out=E2=80=A6 (while (re-search-forward regexp nil t) (catch :skip (save-match-data (be= ginning-of-line) (se=E2=80=A6 (let* ((props (list (quote face) nil (quote done-face) (quote org-agenda-= done) (quote org-not=E2=80=A6 ]*\\)")) marker priority category tags todo-state ee txt beg end) (goto-cha= r (point-min)) (whil=E2=80=A6 org-agenda-get-todos() (setq rtn (org-agenda-get-todos)) =E2=80=A6 ---------------------------------------------------- The second time I ran the code from .emacs I got it right: ---------------------------------------------------- (#("TODO ccc" 0 8 (org-category #("bbb" 0 3 ...) fontified nil tags nil org= -highest-priority 65 org-lowest-priority 67 prefix-length 0 ...))) ---------------------------------------------------- Which seems to be inappropriate, as in previous versions I get: ---------------------------------------------------- (#("TODO ccc" 0 8 (fontified nil org-category nil tags nil org-highest-prio= rity 65 org-lowest-priority 67 prefix-length 0 ...))) ---------------------------------------------------- Via git bisect I traced the bug to: ---------------------------------------------------- ca733df0d41eccced5f8f1abb85d525cb12dd21f is the first bad commit commit ca733df0d41eccced5f8f1abb85d525cb12dd21f Author: Carsten Dominik Date: Mon Jan 3 13:12:42 2011 +0100 Move the category property refresh to org-get-category where possible ---------------------------------------------------- Greetings, Daniel