emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org
Subject: agenda bulk refile error
Date: Tue, 04 Aug 2009 14:00:06 -0400	[thread overview]
Message-ID: <878whztq6x.fsf@gollum.intra.norang.ca> (raw)

Every so often I run into a situation where bulk refiling doesn't work
anymore.

I currently have 15 items in my refile.org file that I want to refile to
other locations.  I marked a few of them and bulk refiled them just
fine.  Then I marked a few more and B r fails with "Cannot find entry
for marker #<marker at 297156 in norang.org>"

I think this happens when I mark multiple tasks in the same subtree
(i.e. the parent and a sibling) and refile both to the same location.
After that it gets confused.

If I have a task like this in refile.org

#+FILETAGS: REFILE
* Test
** Test 2

and run a tags match on REFILE I see both tasks.  Mark both with m in
the agenda and B r to some other location.  It refiles the first (and
this moves the sibling too) and then it's broken after that.

I get the following backtrace

Debugger entered--Lisp error: (error "Cannot find entry for marker #<marker at 297156 in norang.org>")
  signal(error ("Cannot find entry for marker #<marker at 297156 in norang.org>"))
  error("Cannot find entry for marker %s" #<marker at 297156 in norang.org>)
  (or (text-property-any (point-min) (point-max) (quote org-hd-marker) e) (error "Cannot find entry for marker %s" e))
  (goto-char (or (text-property-any ... ... ... e) (error "Cannot find entry for marker %s" e)))
  (while (setq e (pop entries)) (goto-char (or ... ...)) (eval cmd) (setq org-agenda-bulk-marked-entries (delete e org-agenda-bulk-marked-entries)) (setq cnt (1+ cnt)))
  (let* ((action ...) (entries ...) cmd rfloc state e tag (cnt 0)) (cond (... ...) (... ...) (... ... ... ...) (... ... ...) (... ... ...) (... ...) (t ...)) (while (setq e ...) (goto-char ...) (eval cmd) (setq org-agenda-bulk-marked-entries ...) (setq cnt ...)) (setq org-agenda-bulk-marked-entries nil) (org-agenda-bulk-remove-all-marks) (message "Acted on %d entries" cnt))
  org-agenda-bulk-action()
  call-interactively(org-agenda-bulk-action)

I've since changed my refile custom view to only show level 1 tasks to
avoid this problem.

-Bernt

             reply	other threads:[~2009-08-04 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-04 18:00 Bernt Hansen [this message]
2009-08-04 19:12 ` agenda bulk refile error Carsten Dominik
2009-08-04 19:25   ` Bernt Hansen
2009-08-04 20:46     ` Carsten Dominik
2009-08-04 20:54       ` Bernt Hansen

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=878whztq6x.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /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).