emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] bulk rescheduling change?


From: Nick Dokos
Subject: Re: [O] bulk rescheduling change?
Date: Wed, 12 Sep 2012 11:47:39 -0400

Nick Dokos <address@hidden> wrote:

> Bastien <address@hidden> wrote:
> 
> > Hi Greg,
> > 
> > Greg Troxel <address@hidden> writes:
> > 
> > > I often hope to get more done than I do, so I'm often faced with pushing
> > > scheduled items forward.  I typically do this from the agenda view, with
> > > 'C-c C-s' for individual items, and markings and 'B s' for groups of
> > > items (typically, saturday-type items to a week later).  I find that
> > > with individual rescheduling, I get a prompt that has no prefilled text,
> > > and can easily type '+1<cr>', or 'sat<cr>'.  'B s' used to behave this
> > > way, but now the prompt is prefilled with '<2012-09-12 Wed>', and I have
> > > to delete that.  This seems like a misfeature, because at least for me
> > > bulk-reschedulign to today is not the dominant case, and if it were . is
> > > easy to type anwyay.  The info file doesn't explain this.
> > 
> > This has been fixed earlier today -- please update.
> > 
> 
> OK I just updated and I'm running into trouble:
> 
> org-exp-blocks.el seems to have been deleted but org-exp.el still requires it.
> What's going on?
> 

... and after going back to before Nicolas's last four commits, I get
the attached backtrace in org-agenda-list:

Debugger entered--Lisp error: (wrong-type-argument wholenump -1)
  make-string(-1 32)
  (setq marker (org-agenda-new-marker beg) level (make-string (1- 
(org-outline-level)) 32) category (org-get-category beg) category-pos 
(get-text-property beg (quote org-category-position)) tags (save-excursion 
(org-backward-heading-same-level 0) (org-get-tags-at)) todo-state 
(org-get-todo-state) warntime (org-entry-get (point) "APPT_WARNTIME"))
  (progn (setq marker (org-agenda-new-marker beg) level (make-string (1- 
(org-outline-level)) 32) category (org-get-category beg) category-pos 
(get-text-property beg (quote org-category-position)) tags (save-excursion 
(org-backward-heading-same-level 0) (org-get-tags-at)) todo-state 
(org-get-todo-state) warntime (org-entry-get (point) "APPT_WARNTIME")) (dolist 
(r (if (stringp result) (list result) result)) (when (and 
org-agenda-diary-sexp-prefix (string-match org-agenda-diary-sexp-prefix r)) 
(setq extra (match-string 0 r) r (replace-match "" nil nil r))) (if 
(string-match "\\S-" r) (setq txt r) (setq txt "SEXP entry returned empty 
string")) (setq txt (org-agenda-format-item extra txt level category tags 
(quote time))) (org-add-props txt props (quote org-marker) marker (quote 
org-category) category (quote date) date (quote todo-state) todo-state (quote 
org-category-position) category-pos (quote tags) tags (quote level) level 
(quote type) "sexp" (quote warntime) warntime) (push
  txt ee)))
  (if result (progn (setq marker (org-agenda-new-marker beg) level (make-string 
(1- (org-outline-level)) 32) category (org-get-category beg) category-pos 
(get-text-property beg (quote org-category-position)) tags (save-excursion 
(org-backward-heading-same-level 0) (org-get-tags-at)) todo-state 
(org-get-todo-state) warntime (org-entry-get (point) "APPT_WARNTIME")) (dolist 
(r (if (stringp result) (list result) result)) (when (and 
org-agenda-diary-sexp-prefix (string-match org-agenda-diary-sexp-prefix r)) 
(setq extra (match-string 0 r) r (replace-match "" nil nil r))) (if 
(string-match "\\S-" r) (setq txt r) (setq txt "SEXP entry returned empty 
string")) (setq txt (org-agenda-format-item extra txt level category tags 
(quote time))) (org-add-props txt props (quote org-marker) marker (quote 
org-category) category (quote date) date (quote todo-state) todo-state (quote 
org-category-position) category-pos (quote tags) tags (quote level) level 
(quote type) "sexp" (quote warntime) warn
 time) (push txt ee))))
  (when result (setq marker (org-agenda-new-marker beg) level (make-string (1- 
(org-outline-level)) 32) category (org-get-category beg) category-pos 
(get-text-property beg (quote org-category-position)) tags (save-excursion 
(org-backward-heading-same-level 0) (org-get-tags-at)) todo-state 
(org-get-todo-state) warntime (org-entry-get (point) "APPT_WARNTIME")) (dolist 
(r (if (stringp result) (list result) result)) (when (and 
org-agenda-diary-sexp-prefix (string-match org-agenda-diary-sexp-prefix r)) 
(setq extra (match-string 0 r) r (replace-match "" nil nil r))) (if 
(string-match "\\S-" r) (setq txt r) (setq txt "SEXP entry returned empty 
string")) (setq txt (org-agenda-format-item extra txt level category tags 
(quote time))) (org-add-props txt props (quote org-marker) marker (quote 
org-category) category (quote date) date (quote todo-state) todo-state (quote 
org-category-position) category-pos (quote tags) tags (quote level) level 
(quote type) "sexp" (quote warntime) warntime)
  (push txt ee)))
  (catch :skip (org-agenda-skip) (setq beg (match-beginning 0)) (goto-char (1- 
(match-end 0))) (setq b (point)) (forward-sexp 1) (setq sexp (buffer-substring 
b (point))) (setq sexp-entry (if (looking-at "[   ]*\\(\\S-.*\\)") (org-trim 
(match-string 1)) "")) (setq result (org-diary-sexp-entry sexp sexp-entry 
date)) (when result (setq marker (org-agenda-new-marker beg) level (make-string 
(1- (org-outline-level)) 32) category (org-get-category beg) category-pos 
(get-text-property beg (quote org-category-position)) tags (save-excursion 
(org-backward-heading-same-level 0) (org-get-tags-at)) todo-state 
(org-get-todo-state) warntime (org-entry-get (point) "APPT_WARNTIME")) (dolist 
(r (if (stringp result) (list result) result)) (when (and 
org-agenda-diary-sexp-prefix (string-match org-agenda-diary-sexp-prefix r)) 
(setq extra (match-string 0 r) r (replace-match "" nil nil r))) (if 
(string-match "\\S-" r) (setq txt r) (setq txt "SEXP entry returned empty 
string")) (setq txt (org-agenda-
 format-item extra txt level category tags (quote time))) (org-add-props txt 
props (quote org-marker) marker (quote org-category) category (quote date) date 
(quote todo-state) todo-state (quote org-category-position) category-pos (quote 
tags) tags (quote level) level (quote type) "sexp" (quote warntime) warntime) 
(push txt ee))))
  (while (re-search-forward regexp nil t) (catch :skip (org-agenda-skip) (setq 
beg (match-beginning 0)) (goto-char (1- (match-end 0))) (setq b (point)) 
(forward-sexp 1) (setq sexp (buffer-substring b (point))) (setq sexp-entry (if 
(looking-at "[   ]*\\(\\S-.*\\)") (org-trim (match-string 1)) "")) (setq result 
(org-diary-sexp-entry sexp sexp-entry date)) (when result (setq marker 
(org-agenda-new-marker beg) level (make-string (1- (org-outline-level)) 32) 
category (org-get-category beg) category-pos (get-text-property beg (quote 
org-category-position)) tags (save-excursion (org-backward-heading-same-level 
0) (org-get-tags-at)) todo-state (org-get-todo-state) warntime (org-entry-get 
(point) "APPT_WARNTIME")) (dolist (r (if (stringp result) (list result) 
result)) (when (and org-agenda-diary-sexp-prefix (string-match 
org-agenda-diary-sexp-prefix r)) (setq extra (match-string 0 r) r 
(replace-match "" nil nil r))) (if (string-match "\\S-" r) (setq txt r) (setq 
txt "SEXP entry returne
 d empty string")) (setq txt (org-agenda-format-item extra txt level category 
tags (quote time))) (org-add-props txt props (quote org-marker) marker (quote 
org-category) category (quote date) date (quote todo-state) todo-state (quote 
org-category-position) category-pos (quote tags) tags (quote level) level 
(quote type) "sexp" (quote warntime) warntime) (push txt ee)))))
  (let* ((props (list (quote face) (quote org-agenda-calendar-sexp) (quote 
mouse-face) (quote highlight) (quote help-echo) (format "mouse-2 or RET jump to 
org file %s" (abbreviate-file-name buffer-file-name)))) (regexp "^&?%%(") 
marker category extra category-pos level ee txt tags entry result beg b sexp 
sexp-entry todo-state warntime) (goto-char (point-min)) (while 
(re-search-forward regexp nil t) (catch :skip (org-agenda-skip) (setq beg 
(match-beginning 0)) (goto-char (1- (match-end 0))) (setq b (point)) 
(forward-sexp 1) (setq sexp (buffer-substring b (point))) (setq sexp-entry (if 
(looking-at "[   ]*\\(\\S-.*\\)") (org-trim (match-string 1)) "")) (setq result 
(org-diary-sexp-entry sexp sexp-entry date)) (when result (setq marker 
(org-agenda-new-marker beg) level (make-string (1- (org-outline-level)) 32) 
category (org-get-category beg) category-pos (get-text-property beg (quote 
org-category-position)) tags (save-excursion (org-backward-heading-same-level 
0) (org-get-tags-at)
 ) todo-state (org-get-todo-state) warntime (org-entry-get (point) 
"APPT_WARNTIME")) (dolist (r (if (stringp result) (list result) result)) (when 
(and org-agenda-diary-sexp-prefix (string-match org-agenda-diary-sexp-prefix 
r)) (setq extra (match-string 0 r) r (replace-match "" nil nil r))) (if 
(string-match "\\S-" r) (setq txt r) (setq txt "SEXP entry returned empty 
string")) (setq txt (org-agenda-format-item extra txt level category tags 
(quote time))) (org-add-props txt props (quote org-marker) marker (quote 
org-category) category (quote date) date (quote todo-state) todo-state (quote 
org-category-position) category-pos (quote tags) tags (quote level) level 
(quote type) "sexp" (quote warntime) warntime) (push txt ee))))) (nreverse ee))
  org-agenda-get-sexps()
  (setq rtn (org-agenda-get-sexps))
  (cond ((and (eq arg :todo) (equal date (calendar-gregorian-from-absolute 
(org-today)))) (setq rtn (org-agenda-get-todos)) (setq results (append results 
rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) (setq results 
(append results rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) 
(setq results (append results rtn))) ((eq arg :sexp) (setq rtn 
(org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg 
:scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq 
results (append results rtn))) ((eq arg :closed) (setq rtn 
(org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg 
:deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results 
(copy-sequence rtn)) (setq results (append results rtn))))
  (while (setq arg (pop args)) (cond ((and (eq arg :todo) (equal date 
(calendar-gregorian-from-absolute (org-today)))) (setq rtn 
(org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg 
:timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results 
rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results 
(append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq 
results (append results rtn))) ((eq arg :scheduled) (setq rtn 
(org-agenda-get-scheduled deadline-results)) (setq results (append results 
rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results 
(append results rtn))) ((eq arg :deadline) (setq rtn 
(org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq 
results (append results rtn)))))
  (save-restriction (if org-agenda-restrict (narrow-to-region 
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg 
(pop args)) (cond ((and (eq arg :todo) (equal date 
(calendar-gregorian-from-absolute (org-today)))) (setq rtn 
(org-agenda-get-todos)) (setq results (append results rtn))) ((eq arg 
:timestamp) (setq rtn (org-agenda-get-blocks)) (setq results (append results 
rtn)) (setq rtn (org-agenda-get-timestamps deadline-results)) (setq results 
(append results rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq 
results (append results rtn))) ((eq arg :scheduled) (setq rtn 
(org-agenda-get-scheduled deadline-results)) (setq results (append results 
rtn))) ((eq arg :closed) (setq rtn (org-agenda-get-progress)) (setq results 
(append results rtn))) ((eq arg :deadline) (setq rtn 
(org-agenda-get-deadlines)) (setq deadline-results (copy-sequence rtn)) (setq 
results (append results rtn))))))
  (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region 
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg 
(pop args)) (cond ((and (eq arg :todo) (equal date 
(calendar-gregorian-from-absolute ...))) (setq rtn (org-agenda-get-todos)) 
(setq results (append results rtn))) ((eq arg :timestamp) (setq rtn 
(org-agenda-get-blocks)) (setq results (append results rtn)) (setq rtn 
(org-agenda-get-timestamps deadline-results)) (setq results (append results 
rtn))) ((eq arg :sexp) (setq rtn (org-agenda-get-sexps)) (setq results (append 
results rtn))) ((eq arg :scheduled) (setq rtn (org-agenda-get-scheduled 
deadline-results)) (setq results (append results rtn))) ((eq arg :closed) (setq 
rtn (org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg 
:deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results 
(copy-sequence rtn)) (setq results (append results rtn)))))))
  (let ((case-fold-search nil)) (save-excursion (save-restriction (if 
org-agenda-restrict (narrow-to-region org-agenda-restrict-begin 
org-agenda-restrict-end) (widen)) (while (setq arg (pop args)) (cond ((and (eq 
arg :todo) (equal date ...)) (setq rtn (org-agenda-get-todos)) (setq results 
(append results rtn))) ((eq arg :timestamp) (setq rtn (org-agenda-get-blocks)) 
(setq results (append results rtn)) (setq rtn (org-agenda-get-timestamps 
deadline-results)) (setq results (append results rtn))) ((eq arg :sexp) (setq 
rtn (org-agenda-get-sexps)) (setq results (append results rtn))) ((eq arg 
:scheduled) (setq rtn (org-agenda-get-scheduled deadline-results)) (setq 
results (append results rtn))) ((eq arg :closed) (setq rtn 
(org-agenda-get-progress)) (setq results (append results rtn))) ((eq arg 
:deadline) (setq rtn (org-agenda-get-deadlines)) (setq deadline-results 
(copy-sequence rtn)) (setq results (append results rtn))))))))
  (save-current-buffer (set-buffer buffer) (unless (derived-mode-p (quote 
org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (setq 
org-agenda-buffer (or org-agenda-buffer buffer)) (let ((case-fold-search nil)) 
(save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region 
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg 
(pop args)) (cond ((and ... ...) (setq rtn ...) (setq results ...)) ((eq arg 
:timestamp) (setq rtn ...) (setq results ...) (setq rtn ...) (setq results 
...)) ((eq arg :sexp) (setq rtn ...) (setq results ...)) ((eq arg :scheduled) 
(setq rtn ...) (setq results ...)) ((eq arg :closed) (setq rtn ...) (setq 
results ...)) ((eq arg :deadline) (setq rtn ...) (setq deadline-results ...) 
(setq results ...))))))) results)
  (with-current-buffer buffer (unless (derived-mode-p (quote org-mode)) (error 
"Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or 
org-agenda-buffer buffer)) (let ((case-fold-search nil)) (save-excursion 
(save-restriction (if org-agenda-restrict (narrow-to-region 
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg 
(pop args)) (cond ((and ... ...) (setq rtn ...) (setq results ...)) ((eq arg 
:timestamp) (setq rtn ...) (setq results ...) (setq rtn ...) (setq results 
...)) ((eq arg :sexp) (setq rtn ...) (setq results ...)) ((eq arg :scheduled) 
(setq rtn ...) (setq results ...)) ((eq arg :closed) (setq rtn ...) (setq 
results ...)) ((eq arg :deadline) (setq rtn ...) (setq deadline-results ...) 
(setq results ...))))))) results)
  (if (not buffer) (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) 
(with-current-buffer buffer (unless (derived-mode-p (quote org-mode)) (error 
"Agenda file %s is not in `org-mode'" file)) (setq org-agenda-buffer (or 
org-agenda-buffer buffer)) (let ((case-fold-search nil)) (save-excursion 
(save-restriction (if org-agenda-restrict (narrow-to-region 
org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (while (setq arg 
(pop args)) (cond (... ... ...) (... ... ... ... ...) (... ... ...) (... ... 
...) (... ... ...) (... ... ... ...)))))) results))
  (let* ((org-startup-folded nil) (org-startup-align-all-tables nil) (buffer 
(if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file 
%s" file))) arg results rtn deadline-results) (if (not buffer) (list (format 
"ORG-AGENDA-ERROR: No such org-file %s" file)) (with-current-buffer buffer 
(unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in 
`org-mode'" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (let 
((case-fold-search nil)) (save-excursion (save-restriction (if 
org-agenda-restrict (narrow-to-region org-agenda-restrict-begin 
org-agenda-restrict-end) (widen)) (while (setq arg ...) (cond ... ... ... ... 
... ...))))) results)))
  org-agenda-get-day-entries("/home/nick/lib/org/appts.org" (9 12 2012) 
:deadline :scheduled :timestamp :sexp)
  apply(org-agenda-get-day-entries "/home/nick/lib/org/appts.org" (9 12 2012) 
(:deadline :scheduled :timestamp :sexp))
  (setq rtn (apply (quote org-agenda-get-day-entries) file date 
org-agenda-entry-types))
  (cond ((memq org-agenda-show-log-scoped (quote (only clockcheck))) (setq rtn 
(org-agenda-get-day-entries file date :closed))) (org-agenda-show-log-scoped 
(setq rtn (apply (quote org-agenda-get-day-entries) file date (append (quote 
(:closed)) org-agenda-entry-types)))) (t (setq rtn (apply (quote 
org-agenda-get-day-entries) file date org-agenda-entry-types))))
  (let ((org-agenda-entry-types org-agenda-entry-types)) (unless 
org-agenda-include-deadlines (setq org-agenda-entry-types (delq :deadline 
org-agenda-entry-types))) (cond ((memq org-agenda-show-log-scoped (quote (only 
clockcheck))) (setq rtn (org-agenda-get-day-entries file date :closed))) 
(org-agenda-show-log-scoped (setq rtn (apply (quote org-agenda-get-day-entries) 
file date (append (quote (:closed)) org-agenda-entry-types)))) (t (setq rtn 
(apply (quote org-agenda-get-day-entries) file date org-agenda-entry-types)))))
  (catch (quote nextfile) (org-check-agenda-file file) (let 
((org-agenda-entry-types org-agenda-entry-types)) (unless 
org-agenda-include-deadlines (setq org-agenda-entry-types (delq :deadline 
org-agenda-entry-types))) (cond ((memq org-agenda-show-log-scoped (quote (only 
clockcheck))) (setq rtn (org-agenda-get-day-entries file date :closed))) 
(org-agenda-show-log-scoped (setq rtn (apply (quote org-agenda-get-day-entries) 
file date (append (quote ...) org-agenda-entry-types)))) (t (setq rtn (apply 
(quote org-agenda-get-day-entries) file date org-agenda-entry-types))))) (setq 
rtnall (append rtnall rtn)))
  (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file 
file) (let ((org-agenda-entry-types org-agenda-entry-types)) (unless 
org-agenda-include-deadlines (setq org-agenda-entry-types (delq :deadline 
org-agenda-entry-types))) (cond ((memq org-agenda-show-log-scoped (quote (only 
clockcheck))) (setq rtn (org-agenda-get-day-entries file date :closed))) 
(org-agenda-show-log-scoped (setq rtn (apply (quote org-agenda-get-day-entries) 
file date (append ... org-agenda-entry-types)))) (t (setq rtn (apply (quote 
org-agenda-get-day-entries) file date org-agenda-entry-types))))) (setq rtnall 
(append rtnall rtn))))
  (while (setq d (pop day-numbers)) (setq date 
(calendar-gregorian-from-absolute d) s (point)) (if (or (setq todayp (= d 
today)) (and (not start-pos) (= d sd))) (setq start-pos (point)) (if (and 
start-pos (not end-pos)) (setq end-pos (point)))) (setq files thefiles rtnall 
nil) (while (setq file (pop files)) (catch (quote nextfile) 
(org-check-agenda-file file) (let ((org-agenda-entry-types 
org-agenda-entry-types)) (unless org-agenda-include-deadlines (setq 
org-agenda-entry-types (delq :deadline org-agenda-entry-types))) (cond ((memq 
org-agenda-show-log-scoped (quote ...)) (setq rtn (org-agenda-get-day-entries 
file date :closed))) (org-agenda-show-log-scoped (setq rtn (apply ... file date 
...))) (t (setq rtn (apply ... file date org-agenda-entry-types))))) (setq 
rtnall (append rtnall rtn)))) (if org-agenda-include-diary (let 
((org-agenda-search-headline-for-time t)) (require (quote diary-lib)) (setq rtn 
(org-get-entries-from-diary date)) (setq rtnall (append rtnall rtn)))) (if 
 (or rtnall org-agenda-show-all-dates) (progn (setq day-cnt (1+ day-cnt)) 
(insert (if (stringp org-agenda-format-date) (format-time-string 
org-agenda-format-date (org-time-from-absolute date)) (funcall 
org-agenda-format-date date)) "\n") (put-text-property s (1- (point)) (quote 
face) (org-agenda-get-day-face date)) (put-text-property s (1- (point)) (quote 
org-date-line) t) (put-text-property s (1- (point)) (quote 
org-agenda-date-header) t) (put-text-property s (1- (point)) (quote 
org-day-cnt) day-cnt) (when todayp (put-text-property s (1- (point)) (quote 
org-today) t)) (setq rtnall (org-agenda-add-time-grid-maybe rtnall ndays 
todayp)) (if rtnall (insert (org-agenda-finalize-entries rtnall) "\n")) 
(put-text-property s (1- (point)) (quote day) d) (put-text-property s (1- 
(point)) (quote org-day-cnt) day-cnt))))
  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays 
org-agenda-span))) (today (org-today)) (sd (or start-day today)) (ndays 
(org-agenda-span-to-ndays span sd)) (org-agenda-start-on-weekday (if (eq ndays 
7) org-agenda-start-on-weekday)) (thefiles (org-agenda-files nil (quote 
ifmode))) (files thefiles) (start (if (or (null org-agenda-start-on-weekday) (< 
ndays 7)) sd (let* ((nt (calendar-day-of-week ...)) (n1 
org-agenda-start-on-weekday) (d (- nt n1))) (- sd (+ (if ... 7 0) d))))) 
(day-numbers (list start)) (day-cnt 0) (inhibit-redisplay (not debug-on-error)) 
(org-agenda-show-log-scoped org-agenda-show-log) s e rtn rtnall file date d 
start-pos end-pos todayp clocktable-start clocktable-end filter) (setq 
org-agenda-redo-command (list (quote org-agenda-list) (list (quote quote) arg) 
start-day (list (quote quote) span))) (dotimes (n (1- ndays)) (push (1+ (car 
day-numbers)) day-numbers)) (setq day-numbers (nreverse day-numbers)) (setq 
clocktable-start (car day-number
 s) clocktable-end (1+ (or (org-last day-numbers) 0))) (org-set-local (quote 
org-starting-day) (car day-numbers)) (org-set-local (quote org-arg-loc) arg) 
(org-set-local (quote org-agenda-current-span) (org-agenda-ndays-to-span span)) 
(unless org-agenda-compact-blocks (let* ((d1 (car day-numbers)) (d2 (org-last 
day-numbers)) (w1 (org-days-to-iso-week d1)) (w2 (org-days-to-iso-week d2))) 
(setq s (point)) (if org-agenda-overriding-header (insert (org-add-props 
(copy-sequence org-agenda-overriding-header) nil (quote face) (quote 
org-agenda-structure)) "\n") (insert (org-agenda-span-name span) "-agenda" (if 
(< (- d2 d1) 350) (if (= w1 w2) (format " (W%02d)" w1) (format " (W%02d-W%02d)" 
w1 w2)) "") ":\n"))) (add-text-properties s (1- (point)) (list (quote face) 
(quote org-agenda-structure) (quote org-date-line) t)) 
(org-agenda-mark-header-line s)) (while (setq d (pop day-numbers)) (setq date 
(calendar-gregorian-from-absolute d) s (point)) (if (or (setq todayp (= d 
today)) (and (not
  start-pos) (= d sd))) (setq start-pos (point)) (if (and start-pos (not 
end-pos)) (setq end-pos (point)))) (setq files thefiles rtnall nil) (while 
(setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) 
(let ((org-agenda-entry-types org-agenda-entry-types)) (unless 
org-agenda-include-deadlines (setq org-agenda-entry-types (delq :deadline 
org-agenda-entry-types))) (cond ((memq org-agenda-show-log-scoped ...) (setq 
rtn ...)) (org-agenda-show-log-scoped (setq rtn ...)) (t (setq rtn ...)))) 
(setq rtnall (append rtnall rtn)))) (if org-agenda-include-diary (let 
((org-agenda-search-headline-for-time t)) (require (quote diary-lib)) (setq rtn 
(org-get-entries-from-diary date)) (setq rtnall (append rtnall rtn)))) (if (or 
rtnall org-agenda-show-all-dates) (progn (setq day-cnt (1+ day-cnt)) (insert 
(if (stringp org-agenda-format-date) (format-time-string org-agenda-format-date 
(org-time-from-absolute date)) (funcall org-agenda-format-date date)) "\n") 
(put-text-prop
 erty s (1- (point)) (quote face) (org-agenda-get-day-face date)) 
(put-text-property s (1- (point)) (quote org-date-line) t) (put-text-property s 
(1- (point)) (quote org-agenda-date-header) t) (put-text-property s (1- 
(point)) (quote org-day-cnt) day-cnt) (when todayp (put-text-property s (1- 
(point)) (quote org-today) t)) (setq rtnall (org-agenda-add-time-grid-maybe 
rtnall ndays todayp)) (if rtnall (insert (org-agenda-finalize-entries rtnall) 
"\n")) (put-text-property s (1- (point)) (quote day) d) (put-text-property s 
(1- (point)) (quote org-day-cnt) day-cnt)))) (when (and 
org-agenda-clockreport-mode clocktable-start) (let ((org-agenda-files 
(org-agenda-files nil (quote ifmode))) (p (copy-sequence 
org-agenda-clockreport-parameter-plist)) tbl) (setq p (org-plist-delete p 
:block)) (setq p (plist-put p :tstart clocktable-start)) (setq p (plist-put p 
:tend clocktable-end)) (setq p (plist-put p :scope (quote agenda))) (when (and 
(eq org-agenda-clockreport-mode (quote with-filter)
 ) (setq filter (or org-agenda-tag-filter-while-redo (get ... 
:preset-filter)))) (setq p (plist-put p :tags (mapconcat (lambda ... ...) 
filter "")))) (setq tbl (apply (quote org-get-clocktable) p)) (insert tbl))) 
(goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) 
(unless (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p 
(point-max))) (goto-char (1- (point-max))) (recenter -1) (if (not 
(pos-visible-in-window-p (or start-pos 1))) (progn (goto-char (or start-pos 1)) 
(recenter 1)))) (goto-char (or start-pos 1)) (add-text-properties (point-min) 
(point-max) (\` (org-agenda-type agenda org-last-args ((\, arg) (\, start-day) 
(\, span)) org-redo-cmd (\, org-agenda-redo-command) org-serie-cmd (\, 
org-cmd)))) (if (eq org-agenda-show-log-scoped (quote clockcheck)) 
(org-agenda-show-clocking-issues)) (org-agenda-finalize) (setq buffer-read-only 
t) (message ""))
  (catch (quote exit) (setq org-agenda-buffer-name (or 
org-agenda-buffer-tmp-name (if org-agenda-sticky (cond ((and org-keys (stringp 
org-match)) (format "*Org Agenda(%s:%s)*" org-keys org-match)) (org-keys 
(format "*Org Agenda(%s)*" org-keys)) (t "*Org Agenda(a)*"))) 
org-agenda-buffer-name)) (org-agenda-prepare "Day/Week") (setq start-day (or 
start-day org-agenda-start-day)) (if (stringp start-day) (setq start-day 
(time-to-days (org-read-date nil t start-day)))) (org-compile-prefix-format 
(quote agenda)) (org-set-sorting-strategy (quote agenda)) (let* ((span 
(org-agenda-ndays-to-span (or span org-agenda-ndays org-agenda-span))) (today 
(org-today)) (sd (or start-day today)) (ndays (org-agenda-span-to-ndays span 
sd)) (org-agenda-start-on-weekday (if (eq ndays 7) 
org-agenda-start-on-weekday)) (thefiles (org-agenda-files nil (quote ifmode))) 
(files thefiles) (start (if (or (null org-agenda-start-on-weekday) (< ndays 7)) 
sd (let* ((nt ...) (n1 org-agenda-start-on-weekday) (d ...)
 ) (- sd (+ ... d))))) (day-numbers (list start)) (day-cnt 0) 
(inhibit-redisplay (not debug-on-error)) (org-agenda-show-log-scoped 
org-agenda-show-log) s e rtn rtnall file date d start-pos end-pos todayp 
clocktable-start clocktable-end filter) (setq org-agenda-redo-command (list 
(quote org-agenda-list) (list (quote quote) arg) start-day (list (quote quote) 
span))) (dotimes (n (1- ndays)) (push (1+ (car day-numbers)) day-numbers)) 
(setq day-numbers (nreverse day-numbers)) (setq clocktable-start (car 
day-numbers) clocktable-end (1+ (or (org-last day-numbers) 0))) (org-set-local 
(quote org-starting-day) (car day-numbers)) (org-set-local (quote org-arg-loc) 
arg) (org-set-local (quote org-agenda-current-span) (org-agenda-ndays-to-span 
span)) (unless org-agenda-compact-blocks (let* ((d1 (car day-numbers)) (d2 
(org-last day-numbers)) (w1 (org-days-to-iso-week d1)) (w2 
(org-days-to-iso-week d2))) (setq s (point)) (if org-agenda-overriding-header 
(insert (org-add-props (copy-sequence 
 org-agenda-overriding-header) nil (quote face) (quote org-agenda-structure)) 
"\n") (insert (org-agenda-span-name span) "-agenda" (if (< ... 350) (if ... ... 
...) "") ":\n"))) (add-text-properties s (1- (point)) (list (quote face) (quote 
org-agenda-structure) (quote org-date-line) t)) (org-agenda-mark-header-line 
s)) (while (setq d (pop day-numbers)) (setq date 
(calendar-gregorian-from-absolute d) s (point)) (if (or (setq todayp (= d 
today)) (and (not start-pos) (= d sd))) (setq start-pos (point)) (if (and 
start-pos (not end-pos)) (setq end-pos (point)))) (setq files thefiles rtnall 
nil) (while (setq file (pop files)) (catch (quote nextfile) 
(org-check-agenda-file file) (let ((org-agenda-entry-types 
org-agenda-entry-types)) (unless org-agenda-include-deadlines (setq 
org-agenda-entry-types ...)) (cond (... ...) (org-agenda-show-log-scoped ...) 
(t ...))) (setq rtnall (append rtnall rtn)))) (if org-agenda-include-diary (let 
((org-agenda-search-headline-for-time t)) (require (quo
 te diary-lib)) (setq rtn (org-get-entries-from-diary date)) (setq rtnall 
(append rtnall rtn)))) (if (or rtnall org-agenda-show-all-dates) (progn (setq 
day-cnt (1+ day-cnt)) (insert (if (stringp org-agenda-format-date) 
(format-time-string org-agenda-format-date ...) (funcall org-agenda-format-date 
date)) "\n") (put-text-property s (1- (point)) (quote face) 
(org-agenda-get-day-face date)) (put-text-property s (1- (point)) (quote 
org-date-line) t) (put-text-property s (1- (point)) (quote 
org-agenda-date-header) t) (put-text-property s (1- (point)) (quote 
org-day-cnt) day-cnt) (when todayp (put-text-property s (1- ...) (quote 
org-today) t)) (setq rtnall (org-agenda-add-time-grid-maybe rtnall ndays 
todayp)) (if rtnall (insert (org-agenda-finalize-entries rtnall) "\n")) 
(put-text-property s (1- (point)) (quote day) d) (put-text-property s (1- 
(point)) (quote org-day-cnt) day-cnt)))) (when (and org-agenda-clockreport-mode 
clocktable-start) (let ((org-agenda-files (org-agenda-files 
 nil (quote ifmode))) (p (copy-sequence 
org-agenda-clockreport-parameter-plist)) tbl) (setq p (org-plist-delete p 
:block)) (setq p (plist-put p :tstart clocktable-start)) (setq p (plist-put p 
:tend clocktable-end)) (setq p (plist-put p :scope (quote agenda))) (when (and 
(eq org-agenda-clockreport-mode (quote with-filter)) (setq filter (or 
org-agenda-tag-filter-while-redo ...))) (setq p (plist-put p :tags (mapconcat 
... filter "")))) (setq tbl (apply (quote org-get-clocktable) p)) (insert 
tbl))) (goto-char (point-min)) (or org-agenda-multi 
(org-agenda-fit-window-to-buffer)) (unless (and (pos-visible-in-window-p 
(point-min)) (pos-visible-in-window-p (point-max))) (goto-char (1- 
(point-max))) (recenter -1) (if (not (pos-visible-in-window-p (or start-pos 
1))) (progn (goto-char (or start-pos 1)) (recenter 1)))) (goto-char (or 
start-pos 1)) (add-text-properties (point-min) (point-max) (\` (org-agenda-type 
agenda org-last-args ((\, arg) (\, start-day) (\, span)) org-redo-cmd (\, org
 -agenda-redo-command) org-serie-cmd (\, org-cmd)))) (if (eq 
org-agenda-show-log-scoped (quote clockcheck)) 
(org-agenda-show-clocking-issues)) (org-agenda-finalize) (setq buffer-read-only 
t) (message "")))
  org-agenda-list()
  (let ((org-agenda-window-setup (quote current-window))) (org-agenda-list))
  eval-buffer(#<buffer  *load*> nil "/home/nick/.emacs" nil t)  ; Reading at 
buffer position 13176
  load-with-code-conversion("/home/nick/.emacs" "/home/nick/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\205\262



reply via email to

[Prev in Thread] Current Thread [Next in Thread]