From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Danjou Subject: Re: Re: Problem with agenda and diary Date: Thu, 17 Mar 2011 17:46:37 +0100 Message-ID: References: <87sjul50xb.fsf@rochester.rr.com> <8762rhg8o8.fsf@member.fsf.org> <87vczhep74.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from [140.186.70.92] (port=36848 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0GLU-0002Dh-TE for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 12:47:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0GLS-0004RL-Pb for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 12:46:44 -0400 Received: from prometheus.naquadah.org ([212.85.154.174]:47408 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0GLS-0004R4-Hf for emacs-orgmode@gnu.org; Thu, 17 Mar 2011 12:46:42 -0400 In-Reply-To: <87vczhep74.fsf@member.fsf.org> (Tassilo Horn's message of "Thu, 17 Mar 2011 16:34:07 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tassilo Horn Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 > # org-marker # 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:]_@#%:]+:\\)\\)?[ ]*$" 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 =E2=80=A6)) #+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. =2D-=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJNgjrtAAoJEGEbqVCLeKXCA2gQAKGkYMf7PAGN3di3LtP8sF0J lvIOGE3V2smOwdvj7EXVzpdxFsUHvPgirwd1TeialduKk2iZxjxHhULeGQVwIrEp 48OsEud7j9b/DkigiDzMDH0/1nQtPnjnrIv0Cw5Ca29Pg+gsChMgMFguFB3Y0YVF DynaCG1wY6kjh0bwTufiPnowZ0F5tzEtxy6TUS9lDgl66f49Rn6ELOC5w6v5JfLa +hI1xy/sc9M8FzKqDEMlTWIy6fL02hF8U1NMneO9/iK0w8e3zLosjpDRJs4208T+ sr7kp0vHQuc43oEkXpXcvOKtNYuCKhilAYzHuOZc4ZZtQF7g3SsYW5gx2B2xc2NC n3cH2OzcQec4eKAoM60/3gcuFNQfddgI/IrHO5X58swNS5KCDkC0KMMQCK6wV52o qVgfkv9jZCTGcPdKlvd538hA/1YmtXKJ4EQZyBHr0QLJAm60/qEg/B4RmuLEeaOc 4mc3tuB3upHhou/G7uJR8195EIz2TJBkHktrFsS5O6xcNNQIcgd13154umfbqbVo tEfjJeaDUitgaVu7Y+o7Rg5wnai6oFtQKjfuw514dhRfs4J9o1lUf+4zqvSICG+S K6XwD7sjePPJwZsxET6U/jFm2R5NK7S/iw70gKhAIuOG9ebi5MDn5H65O4SHKN8R m9RODT0RewwiFIZF4YMG =Xibb -----END PGP SIGNATURE----- --=-=-=--