all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Problem with agenda and diary
Date: Thu, 17 Mar 2011 17:46:37 +0100	[thread overview]
Message-ID: <sa3y64d66fm.fsf@cigue.easter-eggs.fr> (raw)
In-Reply-To: <87vczhep74.fsf@member.fsf.org> (Tassilo Horn's message of "Thu, 17 Mar 2011 16:34:07 +0100")

[-- Attachment #1: Type: text/plain, Size: 3615 bytes --]

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:]_@#%:]+:\\)\\)?[ 	]*$" 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 #2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2011-03-17 16:47 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 13:30 Problem with agenda and diary Dan Griswold
2011-03-17 13:39 ` Erik Iverson
2011-03-17 13:48 ` Tassilo Horn
2011-03-17 14:45   ` Julien Danjou
2011-03-17 15:34     ` Tassilo Horn
2011-03-17 16:46       ` Julien Danjou [this message]
2011-03-17 20:28       ` Sébastien Vauban
2011-03-17 22:06         ` Nick Dokos
2011-03-17 23:43           ` Sébastien Vauban
2011-03-18  0:20             ` Nick Dokos
2011-03-18 10:07     ` Bastien
2011-03-17 14:48   ` Dan Griswold
  -- strict thread matches above, loose matches on Subject: below --
2010-12-13 17:29 [PATCH] org: rework property set Julien Danjou
2010-12-13 21:21 ` Bernt Hansen
2010-12-14  9:01   ` Julien Danjou
2010-12-14 10:15     ` Giovanni Ridolfi
2010-12-14 10:30       ` Julien Danjou
2010-12-14 12:28         ` Bernt Hansen
2010-12-16 13:34         ` Carsten Dominik
2010-12-16 13:45           ` Julien Danjou
2010-12-16 13:55             ` Carsten Dominik
2010-12-16 17:12               ` Julien Danjou
2010-12-17 17:39                 ` Carsten Dominik
     [not found]         ` <julien@danjou.info>
2010-12-14 14:50           ` Nick Dokos
2011-03-17 17:27           ` Re: Problem with agenda and diary Nick Dokos
2011-03-17 18:18             ` Tassilo Horn
2011-03-17 19:06               ` Dan Griswold
2011-03-17 19:45                 ` Nick Dokos
2011-03-17 20:37                   ` Dan Griswold
2011-03-17 22:01                     ` Nick Dokos
2011-03-17 22:11                     ` Nick Dokos
2011-03-18 10:36                 ` Julien Danjou
2011-03-18 10:36             ` Julien Danjou
2011-03-18 14:04           ` Nick Dokos
2011-03-18 14:14             ` Nick Dokos
2011-03-18 14:56               ` Bernt Hansen
2011-03-18 15:20               ` Bastien
2011-03-18 15:33                 ` Nick Dokos
2011-03-18 16:27                 ` Julien Danjou
2011-03-19 10:20                   ` Bastien
2011-03-19 10:20                   ` Bastien
2011-03-18 14:22             ` Julien Danjou
2011-03-18 14:51               ` Julien Danjou, Nick Dokos
2011-03-18 15:05                 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sa3y64d66fm.fsf@cigue.easter-eggs.fr \
    --to=julien@danjou.info \
    --cc=emacs-orgmode@gnu.org \
    --cc=tassilo@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.