From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Update breaks custom agenda commands Date: Tue, 18 Aug 2009 06:32:09 +0100 Message-ID: <57315D92-10E7-42B3-AA4F-9A7AB6D801E3@gmail.com> References: <87ws53objd.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdHJG-0005Ex-F4 for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:32:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdHJA-0005Ds-CJ for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:32:37 -0400 Received: from [199.232.76.173] (port=44657 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdHJA-0005Dm-5I for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:32:32 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:42511) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MdHJ9-0005VZ-CH for emacs-orgmode@gnu.org; Tue, 18 Aug 2009 01:32:31 -0400 Received: by bwz18 with SMTP id 18so2569785bwz.31 for ; Mon, 17 Aug 2009 22:32:13 -0700 (PDT) In-Reply-To: <87ws53objd.fsf@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 > | 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 =20= > 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 =20 > '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 =20= > '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/=20 > org/.*.archive")))) > ("qn" "Notes files" search "" > ((org-agenda-files (file-expand-wildcards "~/mystuff/org/=20 > *.notes")))) > ("qw" "Website search" search "" > ((org-agenda-files (file-expand-wildcards "~/mystuff/website/=20= > *.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 =20 > ":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 =20 > '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 =20= > '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 =20 > priority-down)))) > (todo "NOW|STARTED|TODO" ((org-agenda-sorting-strategy '(todo-=20= > 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 = =20 > '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-=20= > p ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T [ ]") =20= > (org-agenda-todo-keyword-format "") (org-agenda-include-all-todo =20 > nil) (org-agenda-block-separator "--------------- > ") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-=20 > header nil) (ps-landscape-mode t))) > set-text-properties(0 9 nil ((org-agenda-with-colors nil) (org-=20 > agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") =20 > (org-agenda-include-all-todo nil) (org-agenda-block-separator =20 > "---------------\n") (org-agenda-remove-tags t) (ps-number-of-=20 > columns 2) (ps-print-header nil) (ps-landscape-mode t))) > (if (fboundp (quote set-text-properties)) (set-text-properties 0 =20 > (length s) nil s) (remove-text-properties 0 (length s) org-rm-props =20= > s)) > org-no-properties(((org-agenda-with-colors nil) (org-agenda-prefix-=20= > format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-=20 > include-all-todo nil) (org-agenda-block-separator "---------------=20 > \n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-=20 > header nil) (ps-landscape-mode t))) > (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match =20 > (org-no-properties (copy-sequence ...))) > (while (setq entry (pop custom1)) (setq key (car entry) desc (nth 1 =20= > entry) type (nth 2 entry) match (org-no-properties ...)) (if (> ... =20= > 1) (add-to-list ... ...) (insert ...))) > (while t (setq custom1 custom) (when (eq rmheader t) (goto-line 1) =20= > (re-search-forward ":" nil t) (delete-region ... ...) (forward-char =20= > 1) (looking-at "-+") (delete-region ... ...) (move-marker header-=20 > end ...)) (goto-char header-end) (delete-region (point) (point-max)) =20= > (while (setq entry ...) (setq key ... desc ... type ... match ...) =20 > (if ... ... ...)) (when prefixes (mapc ... prefixes)) (goto-char =20 > (point-min)) (if second-time (if ... ...) (setq second-time t) (org-=20= > fit-window-to-buffer)) (message "Press key for agenda command=20 > %s:" (if ... ... "")) (setq c (read-char-exclusive)) (message "") =20 > (cond (... ... ...) (... ...) (... ... ... ...) (... ... ...) =20 > (... ... ...) (... ... ...) (... ... ...) (... ...) (... ... ...) =20 > (... ...) (t ...))) > (save-window-excursion (delete-other-windows) (org-switch-to-buffer-=20= > other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when-=20= > compile ...)) (setq header-end (move-marker ... ...)) (while t (setq =20= > custom1 custom) (when ... ... ... ... ... ... ... ...) (goto-char =20 > header-end) (delete-region ... ...) (while ... ... ...) (when =20 > prefixes ...) (goto-char ...) (if second-time ... ... ...) (message =20= > "Press key for agenda command%s:" ...) (setq c ...) (message "") =20 > (cond ... ... ... ... ... ... ... ... ... ... ...))) > (let* ((bfn ...) (restrict-ok ...) (region-p ...) (custom org-=20 > agenda-custom-commands) (selstring "") restriction second-time c =20 > entry key type match prefixes rmheader header-end custom1 desc) =20 > (save-window-excursion (delete-other-windows) (org-switch-to-buffer-=20= > other-window " *Agenda Commands*") (erase-buffer) (insert ...) (setq =20= > header-end ...) (while =20 > t ... ... ... ... ... ... ... ... ... ... ... ...))) > (catch (quote exit) (let* (... ... ... ... ... restriction second-=20 > time c entry key type match prefixes rmheader header-end custom1 =20 > desc) (save-window-excursion ... ... ... ... ... ...))) > org-agenda-get-restriction-and-command((("q" . "Searches"))) > (setq ans (org-agenda-get-restriction-and-command prefix-=20 > descriptions) keys (car ans) restriction (cdr ans)) > (if keys nil (setq ans (org-agenda-get-restriction-and-command =20 > prefix-descriptions) keys (car ans) restriction (cdr ans))) > (unless keys (setq ans (org-agenda-get-restriction-and-command =20 > prefix-descriptions) keys (car ans) restriction (cdr ans))) > (let* ((prefix-descriptions nil) (org-agenda-custom-commands-orig =20 > org-agenda-custom-commands) (org-agenda-custom-commands ...) =20 > (buf ...) (bfn ...) entry key type match lprops ans) (unless org-=20 > agenda-overriding-restriction (put ... ... nil) (setq org-agenda-=20 > restrict nil) (move-marker org-agenda-restrict-begin nil) (move-=20 > marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-=20 > command) (quote org-lprops) nil) (setq org-agenda-last-dispatch-=20 > buffer (current-buffer)) (unless keys (setq ans ... keys ... =20 > restriction ...)) (when (and ... restriction) (put ... ... ...) =20 > (cond ... ...)) (require (quote calendar)) (cond (... ...) =20 > (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...) =20 > (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...) =20 > (t ...))) > (catch (quote exit) (let* (... ... ... ... ... entry key type match =20= > lprops ans) (unless org-agenda-overriding-=20 > restriction ... ... ... ...) (put ... ... nil) (setq org-agenda-last-=20= > dispatch-buffer ...) (unless keys ...) (when ... ... ...) =20 > (require ...) =20 > (cond ... ... ... ... ... ... ... ... ... ... ... ... ... ...))) > org-agenda(nil) > call-interactively(org-agenda nil nil) > recursive-edit() > byte-code("=C6=10 @=C7=3D=83! debug(error (wrong-type-argument = buffer-or-=20 > string-p ((org-agenda-with-colors nil) (org-agenda-prefix-format "%T =20= > [ ]") (org-agenda-todo-keyword-format "") (org-agenda-include-all-=20 > todo nil) (org-agenda-block-separator "---------------\n") (org-=20 > agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-header nil) =20= > (ps-landscape-mode t)))) > set-text-properties(0 9 nil ((org-agenda-with-colors nil) (org-=20 > agenda-prefix-format "%T [ ]") (org-agenda-todo-keyword-format "") =20 > (org-agenda-include-all-todo nil) (org-agenda-block-separator =20 > "---------------\n") (org-agenda-remove-tags t) (ps-number-of-=20 > columns 2) (ps-print-header nil) (ps-landscape-mode t))) > (if (fboundp (quote set-text-properties)) (set-text-properties 0 =20 > (length s) nil s) (remove-text-properties 0 (length s) org-rm-props =20= > s)) > org-no-properties(((org-agenda-with-colors nil) (org-agenda-prefix-=20= > format "%T [ ]") (org-agenda-todo-keyword-format "") (org-agenda-=20 > include-all-todo nil) (org-agenda-block-separator "---------------=20 > \n") (org-agenda-remove-tags t) (ps-number-of-columns 2) (ps-print-=20 > header nil) (ps-landscape-mode t))) > (setq key (car entry) desc (nth 1 entry) type (nth 2 entry) match =20 > (org-no-properties (copy-sequence ...))) > (while (setq entry (pop custom1)) (setq key (car entry) desc (nth 1 =20= > entry) type (nth 2 entry) match (org-no-properties ...)) (if (> ... =20= > 1) (add-to-list ... ...) (insert ...))) > (while t (setq custom1 custom) (when (eq rmheader t) (goto-line 1) =20= > (re-search-forward ":" nil t) (delete-region ... ...) (forward-char =20= > 1) (looking-at "-+") (delete-region ... ...) (move-marker header-=20 > end ...)) (goto-char header-end) (delete-region (point) (point-max)) =20= > (while (setq entry ...) (setq key ... desc ... type ... match ...) =20 > (if ... ... ...)) (when prefixes (mapc ... prefixes)) (goto-char =20 > (point-min)) (if second-time (if ... ...) (setq second-time t) (org-=20= > fit-window-to-buffer)) (message "Press key for agenda command=20 > %s:" (if ... ... "")) (setq c (read-char-exclusive)) (message "") =20 > (cond (... ... ...) (... ...) (... ... ... ...) (... ... ...) =20 > (... ... ...) (... ... ...) (... ... ...) (... ...) (... ... ...) =20 > (... ...) (t ...))) > (save-window-excursion (delete-other-windows) (org-switch-to-buffer-=20= > other-window " *Agenda Commands*") (erase-buffer) (insert (eval-when-=20= > compile ...)) (setq header-end (move-marker ... ...)) (while t (setq =20= > custom1 custom) (when ... ... ... ... ... ... ... ...) (goto-char =20 > header-end) (delete-region ... ...) (while ... ... ...) (when =20 > prefixes ...) (goto-char ...) (if second-time ... ... ...) (message =20= > "Press key for agenda command%s:" ...) (setq c ...) (message "") =20 > (cond ... ... ... ... ... ... ... ... ... ... ...))) > (let* ((bfn ...) (restrict-ok ...) (region-p ...) (custom org-=20 > agenda-custom-commands) (selstring "") restriction second-time c =20 > entry key type match prefixes rmheader header-end custom1 desc) =20 > (save-window-excursion (delete-other-windows) (org-switch-to-buffer-=20= > other-window " *Agenda Commands*") (erase-buffer) (insert ...) (setq =20= > header-end ...) (while =20 > t ... ... ... ... ... ... ... ... ... ... ... ...))) > (catch (quote exit) (let* (... ... ... ... ... restriction second-=20 > time c entry key type match prefixes rmheader header-end custom1 =20 > desc) (save-window-excursion ... ... ... ... ... ...))) > org-agenda-get-restriction-and-command((("q" . "Searches"))) > (setq ans (org-agenda-get-restriction-and-command prefix-=20 > descriptions) keys (car ans) restriction (cdr ans)) > (if keys nil (setq ans (org-agenda-get-restriction-and-command =20 > prefix-descriptions) keys (car ans) restriction (cdr ans))) > (unless keys (setq ans (org-agenda-get-restriction-and-command =20 > prefix-descriptions) keys (car ans) restriction (cdr ans))) > (let* ((prefix-descriptions nil) (org-agenda-custom-commands-orig =20 > org-agenda-custom-commands) (org-agenda-custom-commands ...) =20 > (buf ...) (bfn ...) entry key type match lprops ans) (unless org-=20 > agenda-overriding-restriction (put ... ... nil) (setq org-agenda-=20 > restrict nil) (move-marker org-agenda-restrict-begin nil) (move-=20 > marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-=20 > command) (quote org-lprops) nil) (setq org-agenda-last-dispatch-=20 > buffer (current-buffer)) (unless keys (setq ans ... keys ... =20 > restriction ...)) (when (and ... restriction) (put ... ... ...) =20 > (cond ... ...)) (require (quote calendar)) (cond (... ...) =20 > (... ... ...) (... ...) (... ...) (... ...) (... ...) (... ...) =20 > (... ...) (... ...) (... ... ...) (... ...) (... ...) (... ...) =20 > (t ...))) > (catch (quote exit) (let* (... ... ... ... ... entry key type match =20= > lprops ans) (unless org-agenda-overriding-=20 > restriction ... ... ... ...) (put ... ... nil) (setq org-agenda-last-=20= > dispatch-buffer ...) (unless keys ...) (when ... ... ...) =20 > (require ...) =20 > (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