emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [agenda] Lisp error: (args-out-of-range 0 0)
@ 2013-02-07 22:18 Sebastien Vauban
  2013-02-07 22:27 ` Sebastien Vauban
  2013-02-08 15:18 ` Bastien
  0 siblings, 2 replies; 7+ messages in thread
From: Sebastien Vauban @ 2013-02-07 22:18 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

With a recent pull (of today, 15:45), I now have the following error when
generating the agenda views:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (args-out-of-range 0 0)
  get-text-property(0 extra-space nil)
  (concat effort "" (get-text-property 0 (quote extra-space) effort))
  (if (equal effort "") "" (concat effort "" (get-text-property 0 (quote extra-space) effort)))
  (format "%7s" (if (equal effort "") "" (concat effort "" (get-text-property 0 (quote extra-space) effort))))
  (format " %s%s %s%s%s " (format "%-11s" (if (equal extra "") "" (concat extra "" (get-text-property 0 (quote extra-space) extra)))) (format "%s" (if (equal category-icon "") "" (concat category-icon "" (get-text-property 0 (quote extra-space) category-icon)))) (format "%-12s" (if (equal category "") "" (concat category ":" (get-text-property 0 (quote extra-space) category)))) (if (equal "" time) "" (format "%-12s" (if (equal "" time) "" (concat time "")))) (format "%7s" (if (equal effort "") "" (concat effort "" (get-text-property 0 (quote extra-space) effort)))))
  eval((format " %s%s %s%s%s " (format "%-11s" (if (equal extra "") "" (concat extra "" (get-text-property 0 (quote extra-space) extra)))) (format "%s" (if (equal category-icon "") "" (concat category-icon "" (get-text-property 0 (quote extra-space) category-icon)))) (format "%-12s" (if (equal category "") "" (concat category ":" (get-text-property 0 (quote extra-space) category)))) (if (equal "" time) "" (format "%-12s" (if (equal "" time) "" (concat time "")))) (format "%7s" (if (equal effort "") "" (concat effort "" (get-text-property 0 (quote extra-space) effort))))))
  (concat (eval formatter) txt)
  (setq rtn (concat (eval formatter) txt))
  (let* ((category (or category (if (stringp org-category) org-category (and org-category (symbol-name org-category))) (if buffer-file-name (file-name-sans-extension (file-name-nondirectory buffer-file-name)) ""))) (category-icon (org-agenda-get-category-icon category)) (category-icon (if category-icon (propertize " " (quote display) category-icon) "")) (tag (if tags (nth (1- (length tags)) tags) "")) time effort neffort (ts (if dotime (concat (if (stringp dotime) dotime "") (and org-agenda-search-headline-for-time txt)))) (time-of-day (and dotime (org-get-time-of-day ts))) stamp plain s0 s1 s2 rtn srp l duration thecategory) (and (derived-mode-p (quote org-mode)) buffer-file-name (add-to-list (quote org-agenda-contributing-files) buffer-file-name)) (if (and dotime time-of-day) (progn (if (or (setq stamp (string-match org-stamp-time-of-day-regexp ts)) (setq plain (string-match org-plain-time-of-day-regexp ts))) (progn (setq s0 (match-string 0 ts) srp (and stamp (match-end 3)) s1 (match-string (if plain 1 2) ts) s2 (match-string (if plain 8 ...) ts)) (if (and org-prefix-has-time org-agenda-remove-times-when-in-prefix (or stamp plain) (string-match ... txt) (not ...) (if ... ... t)) (setq txt (replace-match "" nil nil txt))))) (if s1 (setq s1 (org-get-time-of-day s1 (quote string) t))) (if s2 (setq s2 (org-get-time-of-day s2 (quote string) t))) (let (org-time-clocksum-use-effort-durations) (if (and s1 (not s2) org-agenda-default-appointment-duration) (progn (setq s2 (org-minutes-to-clocksum-string ...))))) (if s2 (progn (setq duration (- (org-hh:mm-string-to-minutes s2) (org-hh:mm-string-to-minutes s1))))))) (if (string-match "\\([ 	]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ 	]*$" txt) (progn (if (or (eq org-agenda-remove-tags t) (and org-agenda-remove-tags org-prefix-has-tag)) (setq txt (replace-match "" t t txt)) (setq txt (replace-match (concat (make-string ... 32) (match-string 2 txt)) t t txt))))) (if (derived-mode-p (quote org-mode)) (progn (setq effort (condition-case nil (progn (get-text-property 0 (quote org-effort) txt)) (error nil))) (if effort (setq neffort (org-duration-string-to-minutes effort) effort (setq effort (concat "[" effort "]"))) (setq effort "")))) (if remove-re (progn (while (string-match remove-re txt) (setq txt (replace-match "" t t txt))))) (add-text-properties 0 (length txt) (quote (org-heading t)) txt) (setq time (cond (s2 (concat (org-agenda-time-of-day-to-ampm-maybe s1) "-" (org-agenda-time-of-day-to-ampm-maybe s2) (if org-agenda-timegrid-use-ampm " "))) (s1 (concat (org-agenda-time-of-day-to-ampm-maybe s1) (if org-agenda-timegrid-use-ampm "........ " "......"))) (t "")) extra (or (and (not habitp) extra) "") category (if (symbolp category) (symbol-name category) category) thecategory (copy-sequence category) level (or level "")) (if (string-match org-bracket-link-regexp category) (progn (setq l (if (match-end 3) (- (match-end 3) (match-beginning 3)) (- (match-end 1) (match-beginning 1)))) (if (< l (or org-prefix-category-length 0)) (progn (setq category (copy-sequence category)) (org-add-props category nil (quote extra-space) (make-string (- org-prefix-category-length l 1) 32))))) (if (and org-prefix-category-max-length (>= (length category) org-prefix-category-max-length)) (setq category (substring category 0 (1- org-prefix-category-max-length))))) (setq rtn (concat (eval formatter) txt)) (remove-text-properties 0 (length rtn) (quote (line-prefix t wrap-prefix t)) rtn) (org-add-props rtn nil (quote org-category) (if thecategory (downcase thecategory) category) (quote tags) (mapcar (quote org-downcase-keep-props) tags) (quote org-highest-priority) org-highest-priority (quote org-lowest-priority) org-lowest-priority (quote time-of-day) time-of-day (quote duration) duration (quote effort) effort (quote effort-minutes) neffort (quote txt) txt (quote level) level (quote time) time (quote extra) extra (quote format) org-prefix-format-compiled (quote dotime) dotime))
  (progn (setq txt (org-trim txt)) (setq txt (org-agenda-fix-displayed-tags txt tags org-agenda-show-inherited-tags org-agenda-hide-tags-regexp)) (let* ((category (or category (if (stringp org-category) org-category (and org-category (symbol-name org-category))) (if buffer-file-name (file-name-sans-extension (file-name-nondirectory buffer-file-name)) ""))) (category-icon (org-agenda-get-category-icon category)) (category-icon (if category-icon (propertize " " (quote display) category-icon) "")) (tag (if tags (nth (1- (length tags)) tags) "")) time effort neffort (ts (if dotime (concat (if (stringp dotime) dotime "") (and org-agenda-search-headline-for-time txt)))) (time-of-day (and dotime (org-get-time-of-day ts))) stamp plain s0 s1 s2 rtn srp l duration thecategory) (and (derived-mode-p (quote org-mode)) buffer-file-name (add-to-list (quote org-agenda-contributing-files) buffer-file-name)) (if (and dotime time-of-day) (progn (if (or (setq stamp (string-match org-stamp-time-of-day-regexp ts)) (setq plain (string-match org-plain-time-of-day-regexp ts))) (progn (setq s0 (match-string 0 ts) srp (and stamp ...) s1 (match-string ... ts) s2 (match-string ... ts)) (if (and org-prefix-has-time org-agenda-remove-times-when-in-prefix ... ... ... ...) (setq txt ...)))) (if s1 (setq s1 (org-get-time-of-day s1 (quote string) t))) (if s2 (setq s2 (org-get-time-of-day s2 (quote string) t))) (let (org-time-clocksum-use-effort-durations) (if (and s1 (not s2) org-agenda-default-appointment-duration) (progn (setq s2 ...)))) (if s2 (progn (setq duration (- ... ...)))))) (if (string-match "\\([ 	]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ 	]*$" txt) (progn (if (or (eq org-agenda-remove-tags t) (and org-agenda-remove-tags org-prefix-has-tag)) (setq txt (replace-match "" t t txt)) (setq txt (replace-match (concat ... ...) t t txt))))) (if (derived-mode-p (quote org-mode)) (progn (setq effort (condition-case nil (progn (get-text-property 0 ... txt)) (error nil))) (if effort (setq neffort (org-duration-string-to-minutes effort) effort (setq effort (concat "[" effort "]"))) (setq effort "")))) (if remove-re (progn (while (string-match remove-re txt) (setq txt (replace-match "" t t txt))))) (add-text-properties 0 (length txt) (quote (org-heading t)) txt) (setq time (cond (s2 (concat (org-agenda-time-of-day-to-ampm-maybe s1) "-" (org-agenda-time-of-day-to-ampm-maybe s2) (if org-agenda-timegrid-use-ampm " "))) (s1 (concat (org-agenda-time-of-day-to-ampm-maybe s1) (if org-agenda-timegrid-use-ampm "........ " "......"))) (t "")) extra (or (and (not habitp) extra) "") category (if (symbolp category) (symbol-name category) category) thecategory (copy-sequence category) level (or level "")) (if (string-match org-bracket-link-regexp category) (progn (setq l (if (match-end 3) (- (match-end 3) (match-beginning 3)) (- (match-end 1) (match-beginning 1)))) (if (< l (or org-prefix-category-length 0)) (progn (setq category (copy-sequence category)) (org-add-props category nil (quote extra-space) (make-string ... 32))))) (if (and org-prefix-category-max-length (>= (length category) org-prefix-category-max-length)) (setq category (substring category 0 (1- org-prefix-category-max-length))))) (setq rtn (concat (eval formatter) txt)) (remove-text-properties 0 (length rtn) (quote (line-prefix t wrap-prefix t)) rtn) (org-add-props rtn nil (quote org-category) (if thecategory (downcase thecategory) category) (quote tags) (mapcar (quote org-downcase-keep-props) tags) (quote org-highest-priority) org-highest-priority (quote org-lowest-priority) org-lowest-priority (quote time-of-day) time-of-day (quote duration) duration (quote effort) effort (quote effort-minutes) neffort (quote txt) txt (quote level) level (quote time) time (quote extra) extra (quote format) org-prefix-format-compiled (quote dotime) dotime)))
  [...]
  org-agenda(nil)
  call-interactively(org-agenda nil nil)
--8<---------------cut here---------------end--------------->8---

As I see a format "%7s" and the `effort' property, this could help reproducing
the problem:

#+begin_src emacs-lisp
  (setq org-agenda-prefix-format
        '((agenda . " %-11s%i %-12:c%?-12t%7e ")
          (timeline . " % s")
          (todo . " %i %-12:c")
          (search . " %i %-12:c")
          (tags . " %i %-12:c"))))
#+end_src

GNU Emacs 24.2.91.1 (i386-mingw-nt6.2.9200) of 2012-12-15 on MS-W7-DANI
Org-mode version 7.9.3e (7.9.3e-931-g25a481 @ d:/Users/sva/Public/Repositories/org-mode/lisp/)

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2013-02-08 18:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 22:18 [agenda] Lisp error: (args-out-of-range 0 0) Sebastien Vauban
2013-02-07 22:27 ` Sebastien Vauban
2013-02-08 15:15   ` Bastien
2013-02-08 16:51     ` Sebastien Vauban
2013-02-08 18:34       ` Bastien
2013-02-08 15:18 ` Bastien
2013-02-08 16:53   ` Sebastien Vauban

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).