emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jacob Riko <rjacob@inf.ethz.ch>
To: Hannes Schulz <schulz@ais.uni-bonn.de>
Cc: Jacob Riko <rjacob@inf.ethz.ch>, emacs-orgmode@gnu.org
Subject: Re: Bug report: agenda column mode failure
Date: Fri, 31 Aug 2012 04:33:50 +0200	[thread overview]
Message-ID: <71AB2E9E-9943-4AB7-9778-351190EA98B0@inf.ethz.ch> (raw)
In-Reply-To: <9D783C91-6ED2-4DF0-BEDB-7DCF8E99EE9F@inf.ethz.ch>

Hi Hannes,

On 31.08.2012, at 03:52, Jacob Riko wrote:
> I was about to report the same behavior on a Mac:

Sorry for the noise, I actually do see the same behavior.
It is just that entering column-view in the file works fine, only a column view on the agenda (C-c C-x C-c) throws the error.

Below are a short and a detailed backtrace.

Riko


Short:

 debug(error (error "Marker does not point anywhere"))
 org-columns-compute("Effort")
 org-agenda-colview-compute((("ITEM" "Task" 40 nil nil nil + nil) ("Effort" "Estimated Effort" 17 ":" add_times nil + nil) ("CLOCKSUM" "Clock" nil ":" add_times nil + nil)))
 org-agenda-columns()
 call-interactively(org-agenda-columns nil nil)

Complete (after C-u M-x org-reload)

Debugger entered--Lisp error: (error "Marker does not point anywhere")
 goto-char(#<marker in no buffer>)
 (save-excursion (goto-char beg) (setq end (condition-case nil (org-end-of-subtree t) (error (point-max)))) (goto-char end) (while (re-search-backward re beg t) (setq sumpos (match-beginning 0) last-level (if (not (or (zerop level) (eq level inminlevel))) level last-level) level (org-outline-level) val (org-entry-get nil property) valflag (and val (string-match "\\S-" val))) (cond ((< level last-level) (setq sum (+ (if (and ... ...) (apply fun ...) 0) (if (aref lvals inminlevel) (apply fun ...) 0)) flag (or (aref lflag last-level) (aref lflag inminlevel)) str (org-columns-number-to-string sum format printf) str1 (org-add-props (copy-sequence str) nil (quote org-computed) t (quote face) (quote bold)) useval (if flag str1 (if valflag val "")) sum-alist (get-text-property sumpos (quote org-summaries))) (if (assoc property sum-alist) (setcdr (assoc property sum-alist) useval) (push (cons property useval) sum-alist) (org-unmodified (add-text-properties sumpos (1+ sumpos) (list ... sum-alist)))) (when (and val (not (equal val ...))) (org-entry-put nil property (if flag str val))) (when (or flag valflag) (push (if flag sum (funcall calc ...)) (aref lvals level)) (aset lflag level t)) (loop for l from (1+ level) to (1- lmax) do (aset lvals l nil) (aset lflag l nil))) ((>= level last-level) (when valflag (push (funcall calc (org-columns-string-to-number val format)) (aref lvals level)) (aset lflag level t))) (t (error "This should not happen")))))
 (let* ((re org-outline-regexp-bol) (lmax 30) (lvals (make-vector lmax nil)) (lflag (make-vector lmax nil)) (level 0) (ass (assoc property org-columns-current-fmt-compiled)) (format (nth 4 ass)) (printf (nth 5 ass)) (fun (nth 6 ass)) (calc (or (nth 7 ass) (quote identity))) (beg org-columns-top-level-marker) (inminlevel org-inlinetask-min-level) (last-level org-inlinetask-min-level) val valflag flag end sumpos sum-alist sum str str1 useval) (save-excursion (goto-char beg) (setq end (condition-case nil (org-end-of-subtree t) (error (point-max)))) (goto-char end) (while (re-search-backward re beg t) (setq sumpos (match-beginning 0) last-level (if (not (or (zerop level) (eq level inminlevel))) level last-level) level (org-outline-level) val (org-entry-get nil property) valflag (and val (string-match "\\S-" val))) (cond ((< level last-level) (setq sum (+ (if ... ... 0) (if ... ... 0)) flag (or (aref lflag last-level) (aref lflag inminlevel)) str (org-columns-number-to-string sum format printf) str1 (org-add-props (copy-sequence str) nil (quote org-computed) t (quote face) (quote bold)) useval (if flag str1 (if valflag val "")) sum-alist (get-text-property sumpos (quote org-summaries))) (if (assoc property sum-alist) (setcdr (assoc property sum-alist) useval) (push (cons property useval) sum-alist) (org-unmodified (add-text-properties sumpos ... ...))) (when (and val (not ...)) (org-entry-put nil property (if flag str val))) (when (or flag valflag) (push (if flag sum ...) (aref lvals level)) (aset lflag level t)) (loop for l from (1+ level) to (1- lmax) do (aset lvals l nil) (aset lflag l nil))) ((>= level last-level) (when valflag (push (funcall calc ...) (aref lvals level)) (aset lflag level t))) (t (error "This should not happen"))))))
 org-columns-compute("Effort")
 (cond ((equal (car fm) "CLOCKSUM") (org-clock-sum)) ((equal (car fm) "CLOCKSUM_T") (org-clock-sum-today)) ((and (nth 4 fm) (setq a (assoc (car fm) org-columns-current-fmt-compiled)) (equal (nth 4 a) (nth 4 fm))) (org-columns-compute (car fm))))
 (while (setq fm (pop fmt)) (cond ((equal (car fm) "CLOCKSUM") (org-clock-sum)) ((equal (car fm) "CLOCKSUM_T") (org-clock-sum-today)) ((and (nth 4 fm) (setq a (assoc (car fm) org-columns-current-fmt-compiled)) (equal (nth 4 a) (nth 4 fm))) (org-columns-compute (car fm)))))
 (save-restriction (widen) (org-unmodified (remove-text-properties (point-min) (point-max) (quote (org-summaries t)))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) (cond ((equal (car fm) "CLOCKSUM") (org-clock-sum)) ((equal (car fm) "CLOCKSUM_T") (org-clock-sum-today)) ((and (nth 4 fm) (setq a (assoc (car fm) org-columns-current-fmt-compiled)) (equal (nth 4 a) (nth 4 fm))) (org-columns-compute (car fm))))))
 (save-excursion (save-restriction (widen) (org-unmodified (remove-text-properties (point-min) (point-max) (quote (org-summaries t)))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) (cond ((equal (car fm) "CLOCKSUM") (org-clock-sum)) ((equal (car fm) "CLOCKSUM_T") (org-clock-sum-today)) ((and (nth 4 fm) (setq a (assoc ... org-columns-current-fmt-compiled)) (equal (nth 4 a) (nth 4 fm))) (org-columns-compute (car fm)))))))
 (save-current-buffer (set-buffer (or (buffer-base-buffer b) b)) (save-excursion (save-restriction (widen) (org-unmodified (remove-text-properties (point-min) (point-max) (quote (org-summaries t)))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) (cond ((equal (car fm) "CLOCKSUM") (org-clock-sum)) ((equal (car fm) "CLOCKSUM_T") (org-clock-sum-today)) ((and (nth 4 fm) (setq a ...) (equal ... ...)) (org-columns-compute (car fm))))))))
 (with-current-buffer (or (buffer-base-buffer b) b) (save-excursion (save-restriction (widen) (org-unmodified (remove-text-properties (point-min) (point-max) (quote (org-summaries t)))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) (cond ((equal (car fm) "CLOCKSUM") (org-clock-sum)) ((equal (car fm) "CLOCKSUM_T") (org-clock-sum-today)) ((and (nth 4 fm) (setq a ...) (equal ... ...)) (org-columns-compute (car fm))))))))
 (while (setq f (pop files)) (setq b (find-buffer-visiting f)) (with-current-buffer (or (buffer-base-buffer b) b) (save-excursion (save-restriction (widen) (org-unmodified (remove-text-properties (point-min) (point-max) (quote (org-summaries t)))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) (cond ((equal ... "CLOCKSUM") (org-clock-sum)) ((equal ... "CLOCKSUM_T") (org-clock-sum-today)) ((and ... ... ...) (org-columns-compute ...))))))))
 (let ((files org-agenda-contributing-files) (org-columns-begin-marker (make-marker)) (org-columns-top-level-marker (make-marker)) f fm a b) (while (setq f (pop files)) (setq b (find-buffer-visiting f)) (with-current-buffer (or (buffer-base-buffer b) b) (save-excursion (save-restriction (widen) (org-unmodified (remove-text-properties (point-min) (point-max) (quote ...))) (goto-char (point-min)) (org-columns-get-format-and-top-level) (while (setq fm (pop fmt)) (cond (... ...) (... ...) (... ...))))))))
 org-agenda-colview-compute((("ITEM" "Task" 40 nil nil nil + nil) ("Effort" "Estimated Effort" 17 ":" add_times nil + nil) ("CLOCKSUM" "Clock" nil ":" add_times nil + nil)))
 (progn (org-agenda-colview-compute org-columns-current-fmt-compiled))
 (if org-agenda-columns-compute-summary-properties (progn (org-agenda-colview-compute org-columns-current-fmt-compiled)))
 (when org-agenda-columns-compute-summary-properties (org-agenda-colview-compute org-columns-current-fmt-compiled))
 (let ((org-columns-time (time-to-number-of-days (current-time))) cache maxwidths m p a d fmt) (cond ((and (boundp (quote org-agenda-overriding-columns-format)) org-agenda-overriding-columns-format) (setq fmt org-agenda-overriding-columns-format) (org-set-local (quote org-agenda-overriding-columns-format) fmt)) ((setq m (org-get-at-bol (quote org-hd-marker))) (setq fmt (or (org-entry-get m "COLUMNS" t) (with-current-buffer (marker-buffer m) org-columns-default-format)))) ((and (boundp (quote org-columns-current-fmt)) (local-variable-p (quote org-columns-current-fmt)) org-columns-current-fmt) (setq fmt org-columns-current-fmt)) ((setq m (next-single-property-change (point-min) (quote org-hd-marker))) (setq m (get-text-property m (quote org-hd-marker))) (setq fmt (or (org-entry-get m "COLUMNS" t) (with-current-buffer (marker-buffer m) org-columns-default-format))))) (setq fmt (or fmt org-columns-default-format)) (org-set-local (quote org-columns-current-fmt) fmt) (org-columns-compile-format fmt) (when org-agenda-columns-compute-summary-properties (org-agenda-colview-compute org-columns-current-fmt-compiled)) (save-excursion (goto-char (point-min)) (while (not (eobp)) (when (setq m (or (org-get-at-bol (quote org-hd-marker)) (org-get-at-bol (quote org-marker)))) (setq p (org-entry-properties m)) (when (or (not (setq a ...)) (not (string-match "\\S-" ...))) (when (and org-agenda-columns-add-appointments-to-effort-sum (setq d ...)) (setq d (org-minutes-to-hh:mm-string d)) (put-text-property 0 (length d) (quote face) (quote org-warning) d) (push (cons org-effort-property d) p))) (push (cons (org-current-line) p) cache)) (beginning-of-line 2)) (when cache (setq maxwidths (org-columns-get-autowidth-alist fmt cache)) (org-set-local (quote org-columns-current-maxwidths) maxwidths) (org-columns-display-here-title) (when (org-set-local (quote org-columns-flyspell-was-active) (org-bound-and-true-p flyspell-mode)) (flyspell-mode 0)) (mapc (lambda (x) (org-goto-line (car x)) (org-columns-display-here (cdr x))) cache) (when org-agenda-columns-show-summaries (org-agenda-colview-summarize cache)))))
 org-agenda-columns()
 call-interactively(org-agenda-columns nil nil)
 recursive-edit()

  reply	other threads:[~2012-08-31  2:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 11:47 Bug report: agenda column mode failure Hannes Schulz
2012-08-31  1:52 ` Jacob Riko
2012-08-31  2:33   ` Jacob Riko [this message]
2012-08-31  6:05 ` Bastien
2012-08-31  6:58   ` Jacob Riko
2012-08-31  8:19     ` Hannes Schulz
2012-08-31  9:24       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71AB2E9E-9943-4AB7-9778-351190EA98B0@inf.ethz.ch \
    --to=rjacob@inf.ethz.ch \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulz@ais.uni-bonn.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).