emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Update breaks custom agenda commands
@ 2009-08-16 18:31 Matt Lundin
  2009-08-18  2:34 ` Samuel Wales
  2009-08-18  5:32 ` Carsten Dominik
  0 siblings, 2 replies; 3+ messages in thread
From: Matt Lundin @ 2009-08-16 18:31 UTC (permalink / raw)
  To: emacs org-mode mailing list

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

Hi Carsten,

The following commit causes an error when I call org-agenda:

,----
| commit 8c177dc832980bd8cf23fc2ae72b18e0b472b59e
| Author: Carsten Dominik <carsten.dominik@gmail.com>
| Date:   Fri Aug 14 17:18:14 2009 +0200
| 
|     Avoid text properties on elements in custom variables
`----

The problem does not occur when I set org-agenda-custom-commands to nil.

Here are my custom command settings:

--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands
      '(("p" "Printed agenda"
	 ((agenda ""
		  ((org-agenda-ndays 7)
		   (org-agenda-start-on-weekday nil)
		   (org-agenda-time-grid nil)
		   (org-agenda-repeating-timestamp-show-all t)
		   (org-agenda-prefix-format "  -->  %t %s")
		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 'scheduled))))
	  (agenda "" 
		  ((org-agenda-ndays 1)
		   (org-agenda-sorting-strategy '(time-up tag-up))
		   (org-agenda-todo-keyword-format "[ ]")
		   (org-agenda-scheduled-leaders '("" ""))
		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))
		   (org-agenda-prefix-format "%t %T %s")
		   ))
	  (agenda "" 
		  ((org-agenda-ndays 1)
		   (org-deadline-warning-days 7)
		   (org-agenda-time-grid nil)
		   (org-agenda-include-diary nil)
		   (org-agenda-todo-keyword-format "[ ]")
		   (org-agenda-scheduled-leaders '("" ""))
		   (org-agenda-overriding-header "Deadlines:")
		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
		   (org-agenda-prefix-format "%t %s")))
	  (todo "TODO|STARTED|NOW"
		((org-agenda-sorting-strategy '(tag-up priority-down))
		 (org-agenda-todo-ignore-with-date t)))
	  (todo "WAITING"))
	 ((org-agenda-with-colors nil)
	  (org-agenda-prefix-format "%T [ ]")
	  (org-agenda-todo-keyword-format "")
	  (org-agenda-include-all-todo nil)
	  (org-agenda-block-separator "---------------\n")
	  (org-agenda-remove-tags t)
	  (ps-number-of-columns 2)
	  (ps-print-header nil)
	  (ps-landscape-mode t))
	 ("~/storage/agenda/agenda.pdf"))
	("q" . "Searches")
	("qa" "Archive files" search ""
	 ((org-agenda-files (file-expand-wildcards "~/mystuff/org/.*.archive"))))
	("qn" "Notes files" search ""
	 ((org-agenda-files (file-expand-wildcards "~/mystuff/org/*.notes"))))
	("qw" "Website search" search ""
	 ((org-agenda-files (file-expand-wildcards "~/mystuff/website/*.org"))))
	("n" "Now" 
	 ((todo "NOW|STARTED")
	  ((org-agenda-todo-ignore-with-date nil))))
	("h" "Habits" 
	 ((agenda ""))
	 ((org-agenda-show-log t)
	  (org-agenda-include-diary nil)
	  (org-agenda-include-all-todo nil)
	  (org-agenda-ndays 1)
	  (org-agenda-start-on-weekday nil) 
	  (org-agenda-log-mode-items '(state))
	  (org-agenda-time-grid nil)
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp ":DAILY:"))))
;; Today - daily tasks view
	("d" "Today" 
	 ((agenda "" ((org-agenda-ndays 1)
		      (org-agenda-include-all-todo nil)
		      ))
	  (alltodo "" ((org-agenda-sorting-strategy '(todo-state-up))
		       (org-agenda-todo-ignore-with-date t)))))
	("y" "Projects" 
	 ((agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "* PROJECT")))
		  ((org-agenda-include-diary nil)
		   (org-agenda-include-all-todo nil)
		   (org-agenda-time-grid nil)))
	  (todo "PROJECT" ((org-agenda-todo-ignore-deadlines-t)
			   (org-agenda-sorting-strategy '(priority-down))))))
	("R" "Review"
         ((stuck "")
	  (agenda ""
		  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))))
	  (agenda ""
		((org-agenda-ndays 1)
		 (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))))
	  (todo "PROJECT" ((org-agenda-sorting-strategy '(todo-state-down priority-down))))
	  (todo "NOW|STARTED|TODO" ((org-agenda-sorting-strategy '(todo-state-down priority-down))))
	  (todo "WAITING")
	  (todo "MAYBE"))
	 ((org-agenda-todo-ignore-with-date t)
	  (org-agenda-todo-ignore-deadlines t)
	  (org-agenda-time-grid nil)
	  (org-agenda-include-all-todo nil)
	  (org-deadline-warning-days 360)))
	("c" "Schedule" agenda ""
	 ((org-agenda-ndays 7)
	  (org-agenda-start-on-weekday 1)
	  (org-agenda-time-grid nil)
	  (org-agenda-prefix-format " %12:t ")
	  (org-agenda-include-all-todo nil)
	  (org-agenda-repeating-timestamp-show-all t)
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline 'scheduled))))
	("u" "Upcoming deadlines (6 months)" agenda ""
	 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
	  (org-agenda-ndays 1)
	  (org-agenda-include-all-todo nil)
	  (org-deadline-warning-days 180)
	  (org-agenda-time-grid nil)))
))
--8<---------------cut here---------------end--------------->8---

And attached is the backtrace.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/plain, Size: 9728 bytes --]

Debugger entered--Lisp error: (wrong-type-argument buffer-or-string-p ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo nil) (org-agenda-block-separator "---------------
") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t)))
  set-text-properties(0 9 nil ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo nil) (org-agenda-block-separator "---------------\n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t)))
  (if (fboundp (quote set-text-properties)) (set-text-properties 0 (length s) nil s) (remove-text-properties 0 (length s) org-rm-props s))
  org-no-properties(((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo nil) (org-agenda-block-separator "---------------\n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t)))
  (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match (org-no-properties (copy-sequence ...)))
  (while (setq entry (pop custom1)) (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match (org-no-properties ...)) (if (> ... 1) (add-to-list ... ...) (insert ...)))
  (while t (setq custom1 custom) (when (eq rmheader t) (goto-line 1) (re-search-forward ":" nil t) (delete-region ... ...) (forward-char 1) (looking-at "-+") (delete-region ... ...) (move-marker header-end ...)) (goto-char header-end) (delete-region (point) (point-max)) (while (setq entry ...) (setq key ... desc ... type ... match ...) (if ... ... ...)) (when prefixes (mapc ... prefixes)) (goto-char (point-min)) (if second-time (if ... ...) (setq second-time t) (org-fit-window-to-buffer)) (message "Press key for agenda command%s:" (if ... ... "")) (setq c (read-char-exclusive)) (message "") (cond (... ... ...) (... ...) (... ... ... ...) (... ... ...) (... ... ...) (... ... ...) (... ... ...) (... ...) (... ... ...) (... ...) (t ...)))
  (save-window-excursion (delete-other-windows) (org-switch-to-buffer-other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when-compile ...)) (setq header-end (move-marker ... ...)) (while t (setq custom1 custom) (when ... ... ... ... ... ... ... ...) (goto-char header-end) (delete-region ... ...) (while ... ... ...) (when prefixes ...) (goto-char ...) (if second-time ... ... ...) (message "Press key for agenda command%s:" ...) (setq c ...) (message "") (cond ... ... ... ... ... ... ... ... ... ... ...)))
  (let* ((bfn ...) (restrict-ok ...) (region-p ...) (custom org-agenda-custom-commands) (selstring "") restriction second-time c entry key type match prefixes rmheader header-end custom1 desc) (save-window-excursion (delete-other-windows) (org-switch-to-buffer-other-window " *Agenda Commands*") (erase-buffer) (insert ...) (setq header-end ...) (while t ... ... ... ... ... ... ... ... ... ... ... ...)))
  (catch (quote exit) (let* (... ... ... ... ... restriction second-time c entry key type match prefixes rmheader header-end custom1 desc) (save-window-excursion ... ... ... ... ... ...)))
  org-agenda-get-restriction-and-command((("q" . "Searches")))
  (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans))
  (if keys nil (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans)))
  (unless keys (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans)))
  (let* ((prefix-descriptions nil) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands ...) (buf ...) (bfn ...) entry key type match lprops ans) (unless org-agenda-overriding-restriction (put ... ... nil) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command) (quote org-lprops) nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless keys (setq ans ... keys ... restriction ...)) (when (and ... restriction) (put ... ... ...) (cond ... ...)) (require (quote calendar)) (cond (... ...) (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...) (t ...)))
  (catch (quote exit) (let* (... ... ... ... ... entry key type match lprops ans) (unless org-agenda-overriding-restriction ... ... ... ...) (put ... ... nil) (setq org-agenda-last-dispatch-buffer ...) (unless keys ...) (when ... ... ...) (require ...) (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
  org-agenda(nil)
  call-interactively(org-agenda nil nil)
  recursive-edit()
  byte-code("Æ\x10	@Ç=ƒ!  debug(error (wrong-type-argument buffer-or-string-p ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo nil) (org-agenda-block-separator "---------------\n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t))))
  set-text-properties(0 9 nil ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo nil) (org-agenda-block-separator "---------------\n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t)))
  (if (fboundp (quote set-text-properties)) (set-text-properties 0 (length s) nil s) (remove-text-properties 0 (length s) org-rm-props s))
  org-no-properties(((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo nil) (org-agenda-block-separator "---------------\n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) (ps-landscape-mode t)))
  (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match (org-no-properties (copy-sequence ...)))
  (while (setq entry (pop custom1)) (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match (org-no-properties ...)) (if (> ... 1) (add-to-list ... ...) (insert ...)))
  (while t (setq custom1 custom) (when (eq rmheader t) (goto-line 1) (re-search-forward ":" nil t) (delete-region ... ...) (forward-char 1) (looking-at "-+") (delete-region ... ...) (move-marker header-end ...)) (goto-char header-end) (delete-region (point) (point-max)) (while (setq entry ...) (setq key ... desc ... type ... match ...) (if ... ... ...)) (when prefixes (mapc ... prefixes)) (goto-char (point-min)) (if second-time (if ... ...) (setq second-time t) (org-fit-window-to-buffer)) (message "Press key for agenda command%s:" (if ... ... "")) (setq c (read-char-exclusive)) (message "") (cond (... ... ...) (... ...) (... ... ... ...) (... ... ...) (... ... ...) (... ... ...) (... ... ...) (... ...) (... ... ...) (... ...) (t ...)))
  (save-window-excursion (delete-other-windows) (org-switch-to-buffer-other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when-compile ...)) (setq header-end (move-marker ... ...)) (while t (setq custom1 custom) (when ... ... ... ... ... ... ... ...) (goto-char header-end) (delete-region ... ...) (while ... ... ...) (when prefixes ...) (goto-char ...) (if second-time ... ... ...) (message "Press key for agenda command%s:" ...) (setq c ...) (message "") (cond ... ... ... ... ... ... ... ... ... ... ...)))
  (let* ((bfn ...) (restrict-ok ...) (region-p ...) (custom org-agenda-custom-commands) (selstring "") restriction second-time c entry key type match prefixes rmheader header-end custom1 desc) (save-window-excursion (delete-other-windows) (org-switch-to-buffer-other-window " *Agenda Commands*") (erase-buffer) (insert ...) (setq header-end ...) (while t ... ... ... ... ... ... ... ... ... ... ... ...)))
  (catch (quote exit) (let* (... ... ... ... ... restriction second-time c entry key type match prefixes rmheader header-end custom1 desc) (save-window-excursion ... ... ... ... ... ...)))
  org-agenda-get-restriction-and-command((("q" . "Searches")))
  (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans))
  (if keys nil (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans)))
  (unless keys (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans)))
  (let* ((prefix-descriptions nil) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands ...) (buf ...) (bfn ...) entry key type match lprops ans) (unless org-agenda-overriding-restriction (put ... ... nil) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command) (quote org-lprops) nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless keys (setq ans ... keys ... restriction ...)) (when (and ... restriction) (put ... ... ...) (cond ... ...)) (require (quote calendar)) (cond (... ...) (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...) (t ...)))
  (catch (quote exit) (let* (... ... ... ... ... entry key type match lprops ans) (unless org-agenda-overriding-restriction ... ... ... ...) (put ... ... nil) (setq org-agenda-last-dispatch-buffer ...) (unless keys ...) (when ... ... ...) (require ...) (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
  org-agenda(nil)
  call-interactively(org-agenda nil nil)

[-- Attachment #3: Type: text/plain, Size: 19 bytes --]


Thanks!
Matt






[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Update breaks custom agenda commands
  2009-08-16 18:31 Update breaks custom agenda commands Matt Lundin
@ 2009-08-18  2:34 ` Samuel Wales
  2009-08-18  5:32 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2009-08-18  2:34 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs org-mode mailing list

Occurs here.  It seems related to setting variables in clauses.

What is the best way to revert the commit?

git revert in a local branch?

Thanks.

On 2009-08-16, Matt Lundin <mdl@imapmail.org> wrote:
> Hi Carsten,
>
> The following commit causes an error when I call org-agenda:
>
> ,----
> | commit 8c177dc832980bd8cf23fc2ae72b18e0b472b59e
> | Author: Carsten Dominik <carsten.dominik@gmail.com>
> | Date:   Fri Aug 14 17:18:14 2009 +0200
> |
> |     Avoid text properties on elements in custom variables
> `----
>
> The problem does not occur when I set org-agenda-custom-commands to nil.
>
> Here are my custom command settings:
>
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-custom-commands
>       '(("p" "Printed agenda"
> 	 ((agenda ""
> 		  ((org-agenda-ndays 7)
> 		   (org-agenda-start-on-weekday nil)
> 		   (org-agenda-time-grid nil)
> 		   (org-agenda-repeating-timestamp-show-all t)
> 		   (org-agenda-prefix-format "  -->  %t %s")
> 		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline
> 'scheduled))))
> 	  (agenda ""
> 		  ((org-agenda-ndays 1)
> 		   (org-agenda-sorting-strategy '(time-up tag-up))
> 		   (org-agenda-todo-keyword-format "[ ]")
> 		   (org-agenda-scheduled-leaders '("" ""))
> 		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))
> 		   (org-agenda-prefix-format "%t %T %s")
> 		   ))
> 	  (agenda ""
> 		  ((org-agenda-ndays 1)
> 		   (org-deadline-warning-days 7)
> 		   (org-agenda-time-grid nil)
> 		   (org-agenda-include-diary nil)
> 		   (org-agenda-todo-keyword-format "[ ]")
> 		   (org-agenda-scheduled-leaders '("" ""))
> 		   (org-agenda-overriding-header "Deadlines:")
> 		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
> 		   (org-agenda-prefix-format "%t %s")))
> 	  (todo "TODO|STARTED|NOW"
> 		((org-agenda-sorting-strategy '(tag-up priority-down))
> 		 (org-agenda-todo-ignore-with-date t)))
> 	  (todo "WAITING"))
> 	 ((org-agenda-with-colors nil)
> 	  (org-agenda-prefix-format "%T [ ]")
> 	  (org-agenda-todo-keyword-format "")
> 	  (org-agenda-include-all-todo nil)
> 	  (org-agenda-block-separator "---------------\n")
> 	  (org-agenda-remove-tags t)
> 	  (ps-number-of-columns 2)
> 	  (ps-print-header nil)
> 	  (ps-landscape-mode t))
> 	 ("~/storage/agenda/agenda.pdf"))
> 	("q" . "Searches")
> 	("qa" "Archive files" search ""
> 	 ((org-agenda-files (file-expand-wildcards "~/mystuff/org/.*.archive"))))
> 	("qn" "Notes files" search ""
> 	 ((org-agenda-files (file-expand-wildcards "~/mystuff/org/*.notes"))))
> 	("qw" "Website search" search ""
> 	 ((org-agenda-files (file-expand-wildcards "~/mystuff/website/*.org"))))
> 	("n" "Now"
> 	 ((todo "NOW|STARTED")
> 	  ((org-agenda-todo-ignore-with-date nil))))
> 	("h" "Habits"
> 	 ((agenda ""))
> 	 ((org-agenda-show-log t)
> 	  (org-agenda-include-diary nil)
> 	  (org-agenda-include-all-todo nil)
> 	  (org-agenda-ndays 1)
> 	  (org-agenda-start-on-weekday nil)
> 	  (org-agenda-log-mode-items '(state))
> 	  (org-agenda-time-grid nil)
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp
> ":DAILY:"))))
> ;; Today - daily tasks view
> 	("d" "Today"
> 	 ((agenda "" ((org-agenda-ndays 1)
> 		      (org-agenda-include-all-todo nil)
> 		      ))
> 	  (alltodo "" ((org-agenda-sorting-strategy '(todo-state-up))
> 		       (org-agenda-todo-ignore-with-date t)))))
> 	("y" "Projects"
> 	 ((agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if
> 'notregexp "* PROJECT")))
> 		  ((org-agenda-include-diary nil)
> 		   (org-agenda-include-all-todo nil)
> 		   (org-agenda-time-grid nil)))
> 	  (todo "PROJECT" ((org-agenda-todo-ignore-deadlines-t)
> 			   (org-agenda-sorting-strategy '(priority-down))))))
> 	("R" "Review"
>          ((stuck "")
> 	  (agenda ""
> 		  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))))
> 	  (agenda ""
> 		((org-agenda-ndays 1)
> 		 (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))))
> 	  (todo "PROJECT" ((org-agenda-sorting-strategy '(todo-state-down
> priority-down))))
> 	  (todo "NOW|STARTED|TODO" ((org-agenda-sorting-strategy '(todo-state-down
> priority-down))))
> 	  (todo "WAITING")
> 	  (todo "MAYBE"))
> 	 ((org-agenda-todo-ignore-with-date t)
> 	  (org-agenda-todo-ignore-deadlines t)
> 	  (org-agenda-time-grid nil)
> 	  (org-agenda-include-all-todo nil)
> 	  (org-deadline-warning-days 360)))
> 	("c" "Schedule" agenda ""
> 	 ((org-agenda-ndays 7)
> 	  (org-agenda-start-on-weekday 1)
> 	  (org-agenda-time-grid nil)
> 	  (org-agenda-prefix-format " %12:t ")
> 	  (org-agenda-include-all-todo nil)
> 	  (org-agenda-repeating-timestamp-show-all t)
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline
> 'scheduled))))
> 	("u" "Upcoming deadlines (6 months)" agenda ""
> 	 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
> 	  (org-agenda-ndays 1)
> 	  (org-agenda-include-all-todo nil)
> 	  (org-deadline-warning-days 180)
> 	  (org-agenda-time-grid nil)))
> ))
> --8<---------------cut here---------------end--------------->8---
>
> And attached is the backtrace.
>
>


-- 
Myalgic encephalomyelitis causes death (Jason et al. 2006)
and severe suffering.  Conflicts of interest are destroying
research. What people "know" is wrong. Silence = death.
http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: Update breaks custom agenda commands
  2009-08-16 18:31 Update breaks custom agenda commands Matt Lundin
  2009-08-18  2:34 ` Samuel Wales
@ 2009-08-18  5:32 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2009-08-18  5:32 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs org-mode mailing list


On Aug 16, 2009, at 7:31 PM, Matt Lundin wrote:

> Hi Carsten,
>
> The following commit causes an error when I call org-agenda:
>
> ,----
> | commit 8c177dc832980bd8cf23fc2ae72b18e0b472b59e
> | Author: Carsten Dominik <carsten.dominik@gmail.com>
> | Date:   Fri Aug 14 17:18:14 2009 +0200
> |
> |     Avoid text properties on elements in custom variables
> `----

Hi Matt, thanks for the report, this is fixed now.

- Carsten

>
> The problem does not occur when I set org-agenda-custom-commands to  
> nil.
>
> Here are my custom command settings:
>
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-custom-commands
>      '(("p" "Printed agenda"
> 	 ((agenda ""
> 		  ((org-agenda-ndays 7)
> 		   (org-agenda-start-on-weekday nil)
> 		   (org-agenda-time-grid nil)
> 		   (org-agenda-repeating-timestamp-show-all t)
> 		   (org-agenda-prefix-format "  -->  %t %s")
> 		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline  
> 'scheduled))))
> 	  (agenda ""
> 		  ((org-agenda-ndays 1)
> 		   (org-agenda-sorting-strategy '(time-up tag-up))
> 		   (org-agenda-todo-keyword-format "[ ]")
> 		   (org-agenda-scheduled-leaders '("" ""))
> 		   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))
> 		   (org-agenda-prefix-format "%t %T %s")
> 		   ))
> 	  (agenda ""
> 		  ((org-agenda-ndays 1)
> 		   (org-deadline-warning-days 7)
> 		   (org-agenda-time-grid nil)
> 		   (org-agenda-include-diary nil)
> 		   (org-agenda-todo-keyword-format "[ ]")
> 		   (org-agenda-scheduled-leaders '("" ""))
> 		   (org-agenda-overriding-header "Deadlines:")
> 		   (org-agenda-skip-function '(org-agenda-skip-entry-if  
> 'notdeadline))
> 		   (org-agenda-prefix-format "%t %s")))
> 	  (todo "TODO|STARTED|NOW"
> 		((org-agenda-sorting-strategy '(tag-up priority-down))
> 		 (org-agenda-todo-ignore-with-date t)))
> 	  (todo "WAITING"))
> 	 ((org-agenda-with-colors nil)
> 	  (org-agenda-prefix-format "%T [ ]")
> 	  (org-agenda-todo-keyword-format "")
> 	  (org-agenda-include-all-todo nil)
> 	  (org-agenda-block-separator "---------------\n")
> 	  (org-agenda-remove-tags t)
> 	  (ps-number-of-columns 2)
> 	  (ps-print-header nil)
> 	  (ps-landscape-mode t))
> 	 ("~/storage/agenda/agenda.pdf"))
> 	("q" . "Searches")
> 	("qa" "Archive files" search ""
> 	 ((org-agenda-files (file-expand-wildcards "~/mystuff/ 
> org/.*.archive"))))
> 	("qn" "Notes files" search ""
> 	 ((org-agenda-files (file-expand-wildcards "~/mystuff/org/ 
> *.notes"))))
> 	("qw" "Website search" search ""
> 	 ((org-agenda-files (file-expand-wildcards "~/mystuff/website/ 
> *.org"))))
> 	("n" "Now"
> 	 ((todo "NOW|STARTED")
> 	  ((org-agenda-todo-ignore-with-date nil))))
> 	("h" "Habits"
> 	 ((agenda ""))
> 	 ((org-agenda-show-log t)
> 	  (org-agenda-include-diary nil)
> 	  (org-agenda-include-all-todo nil)
> 	  (org-agenda-ndays 1)
> 	  (org-agenda-start-on-weekday nil)
> 	  (org-agenda-log-mode-items '(state))
> 	  (org-agenda-time-grid nil)
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp  
> ":DAILY:"))))
> ;; Today - daily tasks view
> 	("d" "Today"
> 	 ((agenda "" ((org-agenda-ndays 1)
> 		      (org-agenda-include-all-todo nil)
> 		      ))
> 	  (alltodo "" ((org-agenda-sorting-strategy '(todo-state-up))
> 		       (org-agenda-todo-ignore-with-date t)))))
> 	("y" "Projects"
> 	 ((agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if  
> 'notregexp "* PROJECT")))
> 		  ((org-agenda-include-diary nil)
> 		   (org-agenda-include-all-todo nil)
> 		   (org-agenda-time-grid nil)))
> 	  (todo "PROJECT" ((org-agenda-todo-ignore-deadlines-t)
> 			   (org-agenda-sorting-strategy '(priority-down))))))
> 	("R" "Review"
>         ((stuck "")
> 	  (agenda ""
> 		  ((org-agenda-skip-function '(org-agenda-skip-entry-if  
> 'notdeadline))))
> 	  (agenda ""
> 		((org-agenda-ndays 1)
> 		 (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline))))
> 	  (todo "PROJECT" ((org-agenda-sorting-strategy '(todo-state-down  
> priority-down))))
> 	  (todo "NOW|STARTED|TODO" ((org-agenda-sorting-strategy '(todo- 
> state-down priority-down))))
> 	  (todo "WAITING")
> 	  (todo "MAYBE"))
> 	 ((org-agenda-todo-ignore-with-date t)
> 	  (org-agenda-todo-ignore-deadlines t)
> 	  (org-agenda-time-grid nil)
> 	  (org-agenda-include-all-todo nil)
> 	  (org-deadline-warning-days 360)))
> 	("c" "Schedule" agenda ""
> 	 ((org-agenda-ndays 7)
> 	  (org-agenda-start-on-weekday 1)
> 	  (org-agenda-time-grid nil)
> 	  (org-agenda-prefix-format " %12:t ")
> 	  (org-agenda-include-all-todo nil)
> 	  (org-agenda-repeating-timestamp-show-all t)
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline  
> 'scheduled))))
> 	("u" "Upcoming deadlines (6 months)" agenda ""
> 	 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))
> 	  (org-agenda-ndays 1)
> 	  (org-agenda-include-all-todo nil)
> 	  (org-deadline-warning-days 180)
> 	  (org-agenda-time-grid nil)))
> ))
> --8<---------------cut here---------------end--------------->8---
>
> And attached is the backtrace.
>
> Debugger entered--Lisp error: (wrong-type-argument buffer-or-string- 
> p ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]")  
> (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo  
> nil) (org-agenda-block-separator "---------------
> ") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print- 
> header nil) (ps-landscape-mode t)))
>  set-text-properties(0 9 nil ((org-agenda-with-colors nil) (org- 
> agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "")  
> (org-agenda-include-all-todo nil) (org-agenda-block-separator  
> "---------------\n") (org-agenda-remove-tags t) (ps-number-of- 
> columns 2) (ps-print-header nil) (ps-landscape-mode t)))
>  (if (fboundp (quote set-text-properties)) (set-text-properties 0  
> (length s) nil s) (remove-text-properties 0 (length s) org-rm-props  
> s))
>  org-no-properties(((org-agenda-with-colors nil) (org-agenda-prefix- 
> format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda- 
> include-all-todo nil) (org-agenda-block-separator "--------------- 
> \n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print- 
> header nil) (ps-landscape-mode t)))
>  (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match  
> (org-no-properties (copy-sequence ...)))
>  (while (setq entry (pop custom1)) (setq key (car entry) desc (nth 1  
> entry) type (nth 2 entry) match (org-no-properties ...)) (if (> ...  
> 1) (add-to-list ... ...) (insert ...)))
>  (while t (setq custom1 custom) (when (eq rmheader t) (goto-line 1)  
> (re-search-forward ":" nil t) (delete-region ... ...) (forward-char  
> 1) (looking-at "-+") (delete-region ... ...) (move-marker header- 
> end ...)) (goto-char header-end) (delete-region (point) (point-max))  
> (while (setq entry ...) (setq key ... desc ... type ... match ...)  
> (if ... ... ...)) (when prefixes (mapc ... prefixes)) (goto-char  
> (point-min)) (if second-time (if ... ...) (setq second-time t) (org- 
> fit-window-to-buffer)) (message "Press key for agenda command 
> %s:" (if ... ... "")) (setq c (read-char-exclusive)) (message "")  
> (cond (... ... ...) (... ...) (... ... ... ...) (... ... ...)  
> (... ... ...) (... ... ...) (... ... ...) (... ...) (... ... ...)  
> (... ...) (t ...)))
>  (save-window-excursion (delete-other-windows) (org-switch-to-buffer- 
> other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when- 
> compile ...)) (setq header-end (move-marker ... ...)) (while t (setq  
> custom1 custom) (when ... ... ... ... ... ... ... ...) (goto-char  
> header-end) (delete-region ... ...) (while ... ... ...) (when  
> prefixes ...) (goto-char ...) (if second-time ... ... ...) (message  
> "Press key for agenda command%s:" ...) (setq c ...) (message "")  
> (cond ... ... ... ... ... ... ... ... ... ... ...)))
>  (let* ((bfn ...) (restrict-ok ...) (region-p ...) (custom org- 
> agenda-custom-commands) (selstring "") restriction second-time c  
> entry key type match prefixes rmheader header-end custom1 desc)  
> (save-window-excursion (delete-other-windows) (org-switch-to-buffer- 
> other-window " *Agenda Commands*") (erase-buffer) (insert ...) (setq  
> header-end ...) (while  
> t ... ... ... ... ... ... ... ... ... ... ... ...)))
>  (catch (quote exit) (let* (... ... ... ... ... restriction second- 
> time c entry key type match prefixes rmheader header-end custom1  
> desc) (save-window-excursion ... ... ... ... ... ...)))
>  org-agenda-get-restriction-and-command((("q" . "Searches")))
>  (setq ans (org-agenda-get-restriction-and-command prefix- 
> descriptions) keys (car ans) restriction (cdr ans))
>  (if keys nil (setq ans (org-agenda-get-restriction-and-command  
> prefix-descriptions) keys (car ans) restriction (cdr ans)))
>  (unless keys (setq ans (org-agenda-get-restriction-and-command  
> prefix-descriptions) keys (car ans) restriction (cdr ans)))
>  (let* ((prefix-descriptions nil) (org-agenda-custom-commands-orig  
> org-agenda-custom-commands) (org-agenda-custom-commands ...)  
> (buf ...) (bfn ...) entry key type match lprops ans) (unless org- 
> agenda-overriding-restriction (put ... ... nil) (setq org-agenda- 
> restrict nil) (move-marker org-agenda-restrict-begin nil) (move- 
> marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo- 
> command) (quote org-lprops) nil) (setq org-agenda-last-dispatch- 
> buffer (current-buffer)) (unless keys (setq ans ... keys ...  
> restriction ...)) (when (and ... restriction) (put ... ... ...)  
> (cond ... ...)) (require (quote calendar)) (cond (... ...)  
> (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...)  
> (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...)  
> (t ...)))
>  (catch (quote exit) (let* (... ... ... ... ... entry key type match  
> lprops ans) (unless org-agenda-overriding- 
> restriction ... ... ... ...) (put ... ... nil) (setq org-agenda-last- 
> dispatch-buffer ...) (unless keys ...) (when ... ... ...)  
> (require ...)  
> (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
>  org-agenda(nil)
>  call-interactively(org-agenda nil nil)
>  recursive-edit()
>  byte-code("Æ\x10	@Ç=ƒ!  debug(error (wrong-type-argument buffer-or- 
> string-p ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T  
> [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all- 
> todo nil) (org-agenda-block-separator "---------------\n") (org- 
> agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil)  
> (ps-landscape-mode t))))
>  set-text-properties(0 9 nil ((org-agenda-with-colors nil) (org- 
> agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "")  
> (org-agenda-include-all-todo nil) (org-agenda-block-separator  
> "---------------\n") (org-agenda-remove-tags t) (ps-number-of- 
> columns 2) (ps-print-header nil) (ps-landscape-mode t)))
>  (if (fboundp (quote set-text-properties)) (set-text-properties 0  
> (length s) nil s) (remove-text-properties 0 (length s) org-rm-props  
> s))
>  org-no-properties(((org-agenda-with-colors nil) (org-agenda-prefix- 
> format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda- 
> include-all-todo nil) (org-agenda-block-separator "--------------- 
> \n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print- 
> header nil) (ps-landscape-mode t)))
>  (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match  
> (org-no-properties (copy-sequence ...)))
>  (while (setq entry (pop custom1)) (setq key (car entry) desc (nth 1  
> entry) type (nth 2 entry) match (org-no-properties ...)) (if (> ...  
> 1) (add-to-list ... ...) (insert ...)))
>  (while t (setq custom1 custom) (when (eq rmheader t) (goto-line 1)  
> (re-search-forward ":" nil t) (delete-region ... ...) (forward-char  
> 1) (looking-at "-+") (delete-region ... ...) (move-marker header- 
> end ...)) (goto-char header-end) (delete-region (point) (point-max))  
> (while (setq entry ...) (setq key ... desc ... type ... match ...)  
> (if ... ... ...)) (when prefixes (mapc ... prefixes)) (goto-char  
> (point-min)) (if second-time (if ... ...) (setq second-time t) (org- 
> fit-window-to-buffer)) (message "Press key for agenda command 
> %s:" (if ... ... "")) (setq c (read-char-exclusive)) (message "")  
> (cond (... ... ...) (... ...) (... ... ... ...) (... ... ...)  
> (... ... ...) (... ... ...) (... ... ...) (... ...) (... ... ...)  
> (... ...) (t ...)))
>  (save-window-excursion (delete-other-windows) (org-switch-to-buffer- 
> other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when- 
> compile ...)) (setq header-end (move-marker ... ...)) (while t (setq  
> custom1 custom) (when ... ... ... ... ... ... ... ...) (goto-char  
> header-end) (delete-region ... ...) (while ... ... ...) (when  
> prefixes ...) (goto-char ...) (if second-time ... ... ...) (message  
> "Press key for agenda command%s:" ...) (setq c ...) (message "")  
> (cond ... ... ... ... ... ... ... ... ... ... ...)))
>  (let* ((bfn ...) (restrict-ok ...) (region-p ...) (custom org- 
> agenda-custom-commands) (selstring "") restriction second-time c  
> entry key type match prefixes rmheader header-end custom1 desc)  
> (save-window-excursion (delete-other-windows) (org-switch-to-buffer- 
> other-window " *Agenda Commands*") (erase-buffer) (insert ...) (setq  
> header-end ...) (while  
> t ... ... ... ... ... ... ... ... ... ... ... ...)))
>  (catch (quote exit) (let* (... ... ... ... ... restriction second- 
> time c entry key type match prefixes rmheader header-end custom1  
> desc) (save-window-excursion ... ... ... ... ... ...)))
>  org-agenda-get-restriction-and-command((("q" . "Searches")))
>  (setq ans (org-agenda-get-restriction-and-command prefix- 
> descriptions) keys (car ans) restriction (cdr ans))
>  (if keys nil (setq ans (org-agenda-get-restriction-and-command  
> prefix-descriptions) keys (car ans) restriction (cdr ans)))
>  (unless keys (setq ans (org-agenda-get-restriction-and-command  
> prefix-descriptions) keys (car ans) restriction (cdr ans)))
>  (let* ((prefix-descriptions nil) (org-agenda-custom-commands-orig  
> org-agenda-custom-commands) (org-agenda-custom-commands ...)  
> (buf ...) (bfn ...) entry key type match lprops ans) (unless org- 
> agenda-overriding-restriction (put ... ... nil) (setq org-agenda- 
> restrict nil) (move-marker org-agenda-restrict-begin nil) (move- 
> marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo- 
> command) (quote org-lprops) nil) (setq org-agenda-last-dispatch- 
> buffer (current-buffer)) (unless keys (setq ans ... keys ...  
> restriction ...)) (when (and ... restriction) (put ... ... ...)  
> (cond ... ...)) (require (quote calendar)) (cond (... ...)  
> (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...)  
> (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...)  
> (t ...)))
>  (catch (quote exit) (let* (... ... ... ... ... entry key type match  
> lprops ans) (unless org-agenda-overriding- 
> restriction ... ... ... ...) (put ... ... nil) (setq org-agenda-last- 
> dispatch-buffer ...) (unless keys ...) (when ... ... ...)  
> (require ...)  
> (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
>  org-agenda(nil)
>  call-interactively(org-agenda nil nil)
>
> Thanks!
> Matt
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-08-18  5:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-16 18:31 Update breaks custom agenda commands Matt Lundin
2009-08-18  2:34 ` Samuel Wales
2009-08-18  5:32 ` Carsten Dominik

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