emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Re: Problem with agenda and diary


From: Julien Danjou
Subject: Re: [O] Re: Problem with agenda and diary
Date: Thu, 17 Mar 2011 17:46:37 +0100
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux)

On Thu, Mar 17 2011, Tassilo Horn wrote:

> Sure, here it is.  There' nothing private in it, so we can stay on
> list.

There's something I really do not understand in this bt.

> Debugger entered--Lisp error: (wrong-type-argument integerp nil)
>   substring(#("  Diary:      St. Patrick's Day" 0 2 (org-category
>   "diary" tags nil org-highest-priority 65 org-lowest-priority 67
>   time-of-day nil duration nil effort nil effort-minutes nil txt
>   #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time ""
>   extra "" dotime time fontified nil org-heading t type "diary" date
>   (3 17 2011) face org-todo) 2 14 (org-category "diary" tags nil
>   org-highest-priority 65 org-lowest-priority 67 time-of-day nil
>   duration nil effort nil effort-minutes nil txt #("St. Patrick's Day"
>   0 17 (fontified nil org-heading t)) time "" extra "" dotime time
>   fontified nil org-heading t type "diary" date (3 17 2011) face
>   org-agenda-diary) 14 31 (org-heading t fontified nil org-category
>   "diary" tags nil org-highest-priority 65 org-lowest-priority 67
>   time-of-day nil duration nil effort nil effort-minutes nil txt
>   #("St. Patrick's Day" 0 17 (fontified nil org-heading t)) time ""
>   extra "" dotime time type "diary" date (3 17 2011) face
>   org-agenda-diary)) nil)

This is (substring x (match-end 3))
So the string `x' is well, the entry about St. Patrick.

>   (concat (substring x 0 (match-end 1)) (format
>   org-agenda-todo-keyword-format (match-string 2 x)) (org-add-props
>   #(" " 0 1 (done-face org-agenda-done undone-face org-warning face
>   org-todo date (3 17 2011) type "diary" todo-state #("STARTED" 0 7
>   (fontified nil org-category "uni")) priority 1002 org-hd-marker
>   #<marker at 11277 in uni.org> org-marker #<marker at 11332 in
>   uni.org> help-echo "mouse-2 or RET jump to org file
>   ~/repos/org/uni.org" org-complex-heading-regexp "^\\(\\*+\\)[
>   
> ]+\\(?:\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>\\)?\\(?:[
>   ]*\\(\\[#.\\]\\)\\)?[       ]*\\(.*?\\)\\(?:[
>   ]+\\(:[[:alnum:address@hidden:]+:\\)\\)?[   ]*$" org-todo-regexp
>   "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\|DONE\\|CANCELLED\\)\\>"
>   org-not-done-regexp "\\<\\(TODO\\|STARTED\\|DELEGATED\\|IDEA\\)\\>"
>   mouse-face highlight dotime time extra "" time "" txt #("St.
>   Patrick's Day" 0 17 (fontified nil org-heading t)) effort-minutes
>   nil effort nil duration nil time-of-day nil org-lowest-priority 67
>   org-highest-priority 65 tags nil ...)) (text-properties-at 0 x))
>   (substring x (match-end 3)))

Where the this is coming from ?
The code is:

#+begin_src emacs-lisp
            (setq x (concat (substring x 0 (match-end 1))
                            (format org-agenda-todo-keyword-format
                                    (match-string 2 x))
                          (org-add-props " " (text-properties-at 0 x))
                          (substring x (match-end 3)))))
#+end_src

How the " " used as first arg of `org-add-props' can have so much
properties, like a todo-state set to "STARTED" and even a org-marker set
to a position in the uni.org file set? It's an empty string for Emacs's
sake.

What's even more troubling is that this code is executed only if `re' is
not nil:

#+begin_src emacs-lisp
(setq re (get-text-property 0 'org-todo-regexp x))
        (when (and re
…))
#+end_src

How `re' cannot be nil since there's no org-todo-regexp in `x' (the
entry about St. Patrick.

Tassilo, if you can reproduce the backtrace, could you take a look at
the value of `re', `x' and `pl'? Maybe it can help, I'm a bit lost right
now.

-- 
Julien Danjou
❱ http://julien.danjou.info

Attachment: pgpOf8QGa2lMJ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]