From: Carsten Dominik <carsten.dominik@gmail.com>
To: bala subramaniyam <balamayam@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Possibly Bug in function org-scan-tags
Date: Sat, 31 Dec 2011 09:29:11 +0100 [thread overview]
Message-ID: <28C408EA-96C7-4FD7-B68D-477DA13E3087@gmail.com> (raw)
In-Reply-To: <CAGo50eNw4Vjs=wh=JrQWyRgnsO88d_vokXQ+KhSrUZCMa_TfaA@mail.gmail.com>
I have just fixed this issue, in the spirit of Nicks proposal.
Thanks!
- Carsten
On 15.12.2011, at 02:18, bala subramaniyam wrote:
> Hi,
> The variable "org-map-continue-from" is not reset to nil after the funcall to action in function "org-scan-tags".
>
> Heres the patch which works
>
> diff --git a/lisp/org.el b/lisp/org.el
> index 8a1fbd3..54ab5fb 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -12848,7 +12848,8 @@ only lines with a TODO keyword are included in the output."
> (setq org-map-continue-from nil)
> (save-excursion
> (setq rtn1 (funcall action))
> - (push rtn1 rtn)))
> + (push rtn1 rtn))
> + (setq org-map-continue-from nil))
> (t (error "Invalid action")))
>
> ;; if we are to skip sublevels, jump to end of subtree
>
> To see the error in action assume that we want to archive all the "DONE" states in the file
> /tmp/test.org which contains the following lines.
> * s1
> ** DONE ss1
> ** NEXT ss2
>
>
> (defun my-org-archive-subtree ()
> (setq org-map-continue-from (point-at-bol))
> (org-archive-subtree))
>
> (org-map-entries 'my-org-archive-subtree "/DONE" (list "/tmp/test.org"))
>
> While the org-scan-tags funciton parses the first subheading(**DONE ss1) the match is
> successful and the function "my-org-archive-subtree" is called which sets the variable
> "org-map-continue-from" value to *beginning of line* and this variable is not set back to nil after the function call ends, which leads to infinite loop while parsing the subsequent headlines which does not match the "DONE" state(**NEXT ss2).
>
> Regards,
> Balamayam
prev parent reply other threads:[~2011-12-31 8:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 1:18 Possibly Bug in function org-scan-tags bala subramaniyam
2011-12-15 22:56 ` bala mayam
2011-12-16 6:41 ` Nick Dokos
2011-12-16 7:16 ` Nick Dokos
2011-12-16 23:05 ` Nick Dokos
2011-12-31 8:29 ` Carsten Dominik [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28C408EA-96C7-4FD7-B68D-477DA13E3087@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=balamayam@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.