From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: [agenda] Lisp error: (args-out-of-range 0 0) Date: Thu, 07 Feb 2013 23:18:40 +0100 Message-ID: <86wquj7oov.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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 ex= tra-space) effort))) (format "%7s" (if (equal effort "") "" (concat effort "" (get-text-proper= ty 0 (quote extra-space) effort)))) (format " %s%s %s%s%s " (format "%-11s" (if (equal extra "") "" (concat e= xtra "" (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) categor= y)))) (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 "") "" (con= cat extra "" (get-text-property 0 (quote extra-space) extra)))) (format "%s= " (if (equal category-icon "") "" (concat category-icon "" (get-text-proper= ty 0 (quote extra-space) category-icon)))) (format "%-12s" (if (equal categ= ory "") "" (concat category ":" (get-text-property 0 (quote extra-space) ca= tegory)))) (if (equal "" time) "" (format "%-12s" (if (equal "" time) "" (c= oncat 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 (an= d 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-i= con (propertize " " (quote display) category-icon) "")) (tag (if tags (nth = (1- (length tags)) tags) "")) time effort neffort (ts (if dotime (concat (i= f (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 s= 2 rtn srp l duration thecategory) (and (derived-mode-p (quote org-mode)) bu= ffer-file-name (add-to-list (quote org-agenda-contributing-files) buffer-fi= le-name)) (if (and dotime time-of-day) (progn (if (or (setq stamp (string-m= atch 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 pl= ain 8 ...) ts)) (if (and org-prefix-has-time org-agenda-remove-times-when-i= n-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 (quot= e string) t))) (let (org-time-clocksum-use-effort-durations) (if (and s1 (n= ot s2) org-agenda-default-appointment-duration) (progn (setq s2 (org-minute= s-to-clocksum-string ...))))) (if s2 (progn (setq duration (- (org-hh:mm-st= ring-to-minutes s2) (org-hh:mm-string-to-minutes s1))))))) (if (string-matc= h "\\([ ]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ ]*$" txt) (progn (if (or (eq org-= agenda-remove-tags t) (and org-agenda-remove-tags org-prefix-has-tag)) (set= q txt (replace-match "" t t txt)) (setq txt (replace-match (concat (make-st= ring ... 32) (match-string 2 txt)) t t txt))))) (if (derived-mode-p (quote = org-mode)) (progn (setq effort (condition-case nil (progn (get-text-propert= y 0 (quote org-effort) txt)) (error nil))) (if effort (setq neffort (org-du= ration-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 (leng= th txt) (quote (org-heading t)) txt) (setq time (cond (s2 (concat (org-agen= da-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 c= ategory) (symbol-name category) category) thecategory (copy-sequence catego= ry) 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-leng= th 0)) (progn (setq category (copy-sequence category)) (org-add-props categ= ory nil (quote extra-space) (make-string (- org-prefix-category-length l 1)= 32))))) (if (and org-prefix-category-max-length (>=3D (length category) or= g-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 durat= ion) duration (quote effort) effort (quote effort-minutes) neffort (quote t= xt) txt (quote level) level (quote time) time (quote extra) extra (quote fo= rmat) 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 (p= ropertize " " (quote display) category-icon) "")) (tag (if tags (nth (1- (l= ength tags)) tags) "")) time effort neffort (ts (if dotime (concat (if (str= ingp dotime) dotime "") (and org-agenda-search-headline-for-time txt)))) (t= ime-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-f= ile-name (add-to-list (quote org-agenda-contributing-files) buffer-file-nam= e)) (if (and dotime time-of-day) (progn (if (or (setq stamp (string-match o= rg-stamp-time-of-day-regexp ts)) (setq plain (string-match org-plain-time-o= f-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 (set= q s2 (org-get-time-of-day s2 (quote string) t))) (let (org-time-clocksum-us= e-effort-durations) (if (and s1 (not s2) org-agenda-default-appointment-dur= ation) (progn (setq s2 ...)))) (if s2 (progn (setq duration (- ... ...)))))= ) (if (string-match "\\([ ]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ ]*$" txt) (prog= n (if (or (eq org-agenda-remove-tags t) (and org-agenda-remove-tags org-pre= fix-has-tag)) (setq txt (replace-match "" t t txt)) (setq txt (replace-matc= h (concat ... ...) t t txt))))) (if (derived-mode-p (quote org-mode)) (prog= n (setq effort (condition-case nil (progn (get-text-property 0 ... txt)) (e= rror nil))) (if effort (setq neffort (org-duration-string-to-minutes effort= ) effort (setq effort (concat "[" effort "]"))) (setq effort "")))) (if rem= ove-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 (no= t habitp) extra) "") category (if (symbolp category) (symbol-name category)= category) thecategory (copy-sequence category) level (or level "")) (if (s= tring-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 (c= opy-sequence category)) (org-add-props category nil (quote extra-space) (ma= ke-string ... 32))))) (if (and org-prefix-category-max-length (>=3D (length= category) org-prefix-category-max-length)) (setq category (substring categ= ory 0 (1- org-prefix-category-max-length))))) (setq rtn (concat (eval forma= tter) txt)) (remove-text-properties 0 (length rtn) (quote (line-prefix t wr= ap-prefix t)) rtn) (org-add-props rtn nil (quote org-category) (if thecateg= ory (downcase thecategory) category) (quote tags) (mapcar (quote org-downca= se-keep-props) tags) (quote org-highest-priority) org-highest-priority (quo= te org-lowest-priority) org-lowest-priority (quote time-of-day) time-of-day= (quote duration) duration (quote effort) effort (quote effort-minutes) nef= fort (quote txt) txt (quote level) level (quote time) time (quote extra) ex= tra (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 reproduc= ing 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/Repositor= ies/org-mode/lisp/) Best regards, Seb --=20 Sebastien Vauban