emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error in org-agenda-get-deadlines
@ 2014-01-25 12:41 Thorsten Jolitz
  2014-01-25 12:48 ` Thorsten Jolitz
  2014-01-25 13:51 ` Bastien
  0 siblings, 2 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2014-01-25 12:41 UTC (permalink / raw)
  To: emacs-orgmode


Hi List, 

this is probably not a bug but rather a problem with my configuration
(since nobody else complained about it so far).

When calling the agenda with 'C-a a' I get the following error

,----------------------------------------------------------------
| Debugger entered--Lisp error: (wrong-type-argument stringp nil)
|   re-search-forward(nil nil t)...
|   org-agenda-get-deadlines()... 
|   org-agenda-get-day-entries("/home...")
|   org-agenda-list(nil) ...
|   org-agenda(nil)
|   call-interactively(org-agenda nil nil)
`----------------------------------------------------------------

and an empty agenda buffer. Debugging reveals that in the following
function 'regexp' is nil because both 'org-deadline-time-hour-regexp'
and 'org-deadline-time-regexp'are nil, causing the error later on in the
re-search-forward call:

,-----------------------------------------------------------------
| (defun org-agenda-get-deadlines (&optional with-hour)
|   "Return the deadline information for agenda display.
| When WITH-HOUR is non-nil, only return deadlines with an hour
| specification like [h]h:mm."
|   (let* ([...]
|          (regexp (if with-hour
|                      org-deadline-time-hour-regexp
|                    org-deadline-time-regexp)) ; => nil
|                    [...] )
|     (goto-char (point-min))
|     (while (re-search-forward regexp nil t) [...]) ; => error
|     ...))
`-----------------------------------------------------------------

I wonder why these variables, defined in org.el, are nil? I don't seem
to set them anywhere, and they should be defined once org.el is loaded,
shouldn't they?

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in org-agenda-get-deadlines
  2014-01-25 12:41 Error in org-agenda-get-deadlines Thorsten Jolitz
@ 2014-01-25 12:48 ` Thorsten Jolitz
  2014-01-25 13:51 ` Bastien
  1 sibling, 0 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2014-01-25 12:48 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

PS 

I forgot:

#+BEGIN_SRC emacs-lisp
(message "%s\n\nOrg: %s" (emacs-version) (org-version))
#+END_SRC

#+results:
: GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.6)
:  of 2014-01-18 on mnt-storage-buildroots-staging-x86_64-eric
: 
: Org: 8.2.5g


-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in org-agenda-get-deadlines
  2014-01-25 12:41 Error in org-agenda-get-deadlines Thorsten Jolitz
  2014-01-25 12:48 ` Thorsten Jolitz
@ 2014-01-25 13:51 ` Bastien
  2014-01-25 18:30   ` Thorsten Jolitz
  1 sibling, 1 reply; 5+ messages in thread
From: Bastien @ 2014-01-25 13:51 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode

Hi Thorsten,

Thorsten Jolitz <tjolitz@gmail.com> writes:

> I wonder why these variables, defined in org.el, are nil? I don't seem
> to set them anywhere, and they should be defined once org.el is loaded,
> shouldn't they?

Not when Org is loaded, but when a buffer is in Org mode.

I can't reproduce this, maybe you can bissect your config
and see what's wrong there?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in org-agenda-get-deadlines
  2014-01-25 13:51 ` Bastien
@ 2014-01-25 18:30   ` Thorsten Jolitz
  2014-01-25 18:43     ` Thorsten Jolitz
  0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Jolitz @ 2014-01-25 18:30 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi Thorsten,
>
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> I wonder why these variables, defined in org.el, are nil? I don't seem
>> to set them anywhere, and they should be defined once org.el is loaded,
>> shouldn't they?
>
> Not when Org is loaded, but when a buffer is in Org mode.
>
> I can't reproduce this, maybe you can bissect your config
> and see what's wrong there?

Ok, thanks, I did that and as I thought the problem was in my init file:

,--------------------------------------------------------------
| (setq org-todo-keywords
|       (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
|               (sequence ; <= undefined
|                (concat
|                 "WAITING(w@/!)" "HOLD(h@/!)"
|                 "|" "CANCELLED(c@/!)" "PHONE")))))
`--------------------------------------------------------------

I had that in my old init-file, but have no idea where that `sequence'
function was defined - somehow it worked.

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error in org-agenda-get-deadlines
  2014-01-25 18:30   ` Thorsten Jolitz
@ 2014-01-25 18:43     ` Thorsten Jolitz
  0 siblings, 0 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2014-01-25 18:43 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

> Bastien <bzg@gnu.org> writes:

>> I can't reproduce this, maybe you can bissect your config
>> and see what's wrong there?
>
> Ok, thanks, I did that and as I thought the problem was in my init file:
>
> ,--------------------------------------------------------------
> | (setq org-todo-keywords
> |       (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
> |               (sequence ; <= undefined
> |                (concat
> |                 "WAITING(w@/!)" "HOLD(h@/!)"
> |                 "|" "CANCELLED(c@/!)" "PHONE")))))
> `--------------------------------------------------------------
>
> I had that in my old init-file, but have no idea where that `sequence'
> function was defined - somehow it worked.

Now I had a look at 'org-todo-keywords' and found the real culprit:

,------------------------------------------------------------------------
| org-todo-keywords is a variable defined in `org.el'.
| Its value is
| ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
|  (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE"))
| 
| Original value was 
| ((sequence "TODO" "DONE"))
| 
| 
| Documentation:
| List of TODO entry keyword sequences and their interpretation.
| This is a list of sequences.
| 
| Each sequence starts with a symbol, either `sequence' or `type',
`------------------------------------------------------------------------

It was ok or even required to start each sequence of keyword with symbol
'sequence, but using function `concat' in the sequence definition caused
the error.

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-25 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-25 12:41 Error in org-agenda-get-deadlines Thorsten Jolitz
2014-01-25 12:48 ` Thorsten Jolitz
2014-01-25 13:51 ` Bastien
2014-01-25 18:30   ` Thorsten Jolitz
2014-01-25 18:43     ` Thorsten Jolitz

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).