[O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Hello, sometime in the past few weeks, something has changed that has led to problems inserting items in my diary from the agenda view, using i d (org-agenda-diary-entry). The traceback is --8---cut here---start-8--- Debugger entered--Lisp error: (wrong-type-argument sequencep t) mapcar((lambda (tg) (if (or (and hide-re (string-match hide-re tg)) (and (not add-inherited) (get-text-property 0 (quote inherited) tg))) nil tg)) t) (delq nil (mapcar (function (lambda (tg) (if (or (and hide-re (string-match hide-re tg)) (and (not add-inherited) (get-text-property 0 ... tg))) nil tg))) tags)) (setq tags (delq nil (mapcar (function (lambda (tg) (if (or (and hide-re ...) (and ... ...)) nil tg))) tags))) (progn (if (string-match \\([]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ ]*$ txt) (setq txt (substring txt 0 (match-beginning 0 (setq tags (delq nil (mapcar (function (lambda (tg) (if (or ... ...) nil tg))) tags))) (if tags (progn (let ((have-i (get-text-property 0 (quote inherited) (car tags))) i) (setq txt (concat txt : (mapconcat (function ...) tags :) (if have-i :: :))) (if (or add-inherited hide-re) (progn (if (string-match \\([ ]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ ]*$ txt) (setq txt (substring txt 0 (match-beginning 0 (setq tags (delq nil (mapcar (function (lambda (tg) (if ... nil tg))) tags))) (if tags (progn (let ((have-i (get-text-property 0 ... ...)) i) (setq txt (concat txt : (mapconcat ... tags :) (if have-i :: : org-agenda-fix-displayed-tags(#(test 3 0 6 (org-heading t)) t t nil) (setq txt (org-agenda-fix-displayed-tags txt tags org-agenda-show-inherited-tags org-agenda-hide-tags-regexp)) ... org-agenda-format-item(nil #(test 3 0 6 (org-heading t)) nil nil t) org-agenda-add-entry-to-org-agenda-diary-file(day #(test 3 0 6 (org-heading t)) (9 30 2012)) ... org-agenda-diary-entry-in-org-file() ... org-agenda-diary-entry() call-interactively(org-agenda-diary-entry nil nil) --8---cut here---end---8--- I've cut out some of the lines. I cannot reproduce this with a minimal emacs so there is something in my configuration that is causing the problem, I guess. I should note that I have set org-agenda-diary-file to point to an org file instead of the default Emacs diary file and that file is based on a date-tree layout. The actual entry does get inserted in the diary; it is the redisplay of the agenda that fails. Inserting into this diary has worked for yonks. From vc-annotate, I can see that some lines near where the error occurs were changed in the past month with commit 8365b738. However, these don't appear to be anything relevant; not that I can really say this with any certainty, mind you :(. Further searching doesn't highlight anything obvious either. Any advice or help would be welcome! Thanks, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.2.50.1 and Org release_7.9.1-452-g7d8a0c
Re: [O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Hi Eric, Eric Fraga e.fr...@ucl.ac.uk writes: I should note that I have set org-agenda-diary-file to point to an org file instead of the default Emacs diary file and that file is based on a date-tree layout. Can you get this error with a limited set of (tagged) items? The actual entry does get inserted in the diary; it is the redisplay of the agenda that fails. There is something wrong with `org-agenda-fix-displayed-tags' when redisplaying your entries. We will find out with some examples. Thanks, -- Bastien
Re: [O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Bastien b...@altern.org writes: Hi Eric, Eric Fraga e.fr...@ucl.ac.uk writes: I should note that I have set org-agenda-diary-file to point to an org file instead of the default Emacs diary file and that file is based on a date-tree layout. Can you get this error with a limited set of (tagged) items? Hello Bastien, I am not entirely sure what you mean but I have tested this now with an empty diary.org file (i.e. no tags at all in that file at least) and I get: --8---cut here---start-8--- Debugger entered--Lisp error: (wrong-type-argument sequencep t) mapcar((lambda (tg) (if (or (and hide-re (string-match hide-re tg)) (and (not add-inherited) (get-text-property 0 (quote inherited) tg))) nil tg)) t) (delq nil (mapcar (function (lambda (tg) (if (or (and hide-re (string-match hide-re tg)) (and (not add-inherited) (get-text-property 0 ... tg))) nil tg))) tags)) (setq tags (delq nil (mapcar (function (lambda (tg) (if (or (and hide-re ...) (and ... ...)) nil tg))) tags))) (progn (if (string-match \\([]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ ]*$ txt) (setq txt (substring txt 0 (match-beginning 0 (setq tags (delq nil (mapcar (function (lambda (tg) (if (or ... ...) nil tg))) tags))) (if tags (progn (let ((have-i (get-text-property 0 (quote inherited) (car tags))) i) (setq txt (concat txt : (mapconcat (function ...) tags :) (if have-i :: :))) (if (or add-inherited hide-re) (progn (if (string-match \\([ ]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ ]*$ txt) (setq txt (substring txt 0 (match-beginning 0 (setq tags (delq nil (mapcar (function (lambda (tg) (if ... nil tg))) tags))) (if tags (progn (let ((have-i (get-text-property 0 ... ...)) i) (setq txt (concat txt : (mapconcat ... tags :) (if have-i :: : org-agenda-fix-displayed-tags(#(test 5 0 6 (org-heading t)) t t nil) (setq txt (org-agenda-fix-displayed-tags txt tags org-agenda-show-inherited-tags org-agenda-hide-tags-regexp)) (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))) (if (and s1 (not s2) org-agenda-default-appointment-duration) (progn (setq s2 (org-minutes-to-hh:mm-string ... (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 (org-get-effort (or ... ...)) (error nil))) (if effort (progn (setq neffort (org-duration-string-to-minutes effort) effort (setq effort ...)) (or 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
Re: [O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Hi Eric, Eric Fraga e.fr...@ucl.ac.uk writes: I am not entirely sure what you mean but I have tested this now with an empty diary.org file (i.e. no tags at all in that file at least) and I get: I've pushed a fix, please let me know if it solves your problem. Thanks, -- Bastien
Re: [O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Bastien b...@altern.org writes: Hi Eric, Eric Fraga e.fr...@ucl.ac.uk writes: I am not entirely sure what you mean but I have tested this now with an empty diary.org file (i.e. no tags at all in that file at least) and I get: I've pushed a fix, please let me know if it solves your problem. Hi Bastien, Thanks for this. Unfortunately, it does not fix the problem. I have updated to latest org version and get the same error, as near as I can tell. However, I have bitten the bullet and gone through my customisations to remove all diary related entries. After some bisecting, I have found that one of my /advices/ was affecting org's diary entry process. I have disabled the advice (specifically, one used to propagate new diary entries to my Outlook and Google calendars automatically) and the problem has disappeared. I must not be preserving the state as well as I expected in the advice function. blush Why it worked before and not now, I have no idea. Yet. Apologies for the noise. Thanks, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.2.50.1 and Org release_7.9.2-350-g934208
Re: [O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Hi Bastien, I tracked the problem down! There was a change, in commit b508ff69 two or so weeks ago, to the argument sequence of org-agenda-format-item which I was using to extract the time information from the diary entry so that I could sent that to my Outlook calendar! This meant that I was passing t for the TAGS argument whereas I had intended t for DOTIME. Arg. There's probably an easier way to do what I want but what I have works; obviously fragile but anything to do with Outlook (and MS in general) is fraught with danger... :( Again, my apologies for the noise. Thanks again, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.2.50.1 and Org release_7.9.2-350-g934208
Re: [O] [bug] org-agenda-diary-entry fails on redisplay of the agenda
Hi Eric, Eric Fraga e.fr...@ucl.ac.uk writes: Again, my apologies for the noise. no problem, thanks for tracking this down and reporting it to the list. I had no idea people could use org-agenda-format-item, which operates in the very internals for the agenda display. Anyway, good you've got beyond that problem, -- Bastien