From: "Tom Breton (Tehom)" <tehom@panix.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-choose bugfix - whoops
Date: Wed, 8 Apr 2009 20:05:17 -0400 (EDT) [thread overview]
Message-ID: <1158.66.30.184.144.1239235517.squirrel@mail.panix.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
My previous fix was mistaken. Not sure why it passed tests; I
have two theories. Regardless, it was wrong. Current
`(org-outline-level)' seems the correct "LEVEL=" matcher argument to
make `org-map-entries' find only an item's immediate children. (Operated
on by `org-reduced-level' of course) I don't quite understand why.
Second, I may have solved the mystery of how the bug got by me before.
`org-map-entries' used to place point at the beginning of an item, a
fact which I used to recognize visiting the same item. That seems to
have changed between org versions.
Third, I have fixed the real bug - properly now, I hope! - and
attached a patch.
Tom Breton (Tehom)
[-- Attachment #2: org-choose.el.diff --]
[-- Type: application/octet-stream, Size: 2320 bytes --]
cd /home/tehom/emacs-site-lisp/built/org-6.25d/contrib/lisp/
diff -c /home/tehom/emacs-site-lisp/built/org-6.24c/contrib/lisp/org-choose.el /home/tehom/emacs-site-lisp/built/org-6.25d/contrib/lisp/org-choose.el
*** /home/tehom/emacs-site-lisp/built/org-6.24c/contrib/lisp/org-choose.el 2009-04-06 16:11:42.000000000 -0400
--- /home/tehom/emacs-site-lisp/built/org-6.25d/contrib/lisp/org-choose.el 2009-04-08 20:02:37.000000000 -0400
***************
*** 235,244 ****
(unless
;;Skip the entry that triggered this by skipping any entry with
! ;;the same starting position. Both map and plist use the start
! ;;of the header line as the position, so we can just compare
! ;;them with `='
! (= (point) entry-pos)
(let
((ix
(org-choose-get-entry-index keywords)))
--- 235,248 ----
(unless
;;Skip the entry that triggered this by skipping any entry with
! ;;the same starting position. plist uses the start of the
! ;;header line as the position, but map no longer does, so we
! ;;have to go back to the heading.
! (=
! (save-excursion
! (org-back-to-heading)
! (point))
! entry-pos)
(let
((ix
(org-choose-get-entry-index keywords)))
***************
*** 256,262 ****
(unless
;;Skip the entry that triggered this.
! (= (point) entry-pos)
(let
((ix
(org-choose-get-entry-index keywords)))
--- 260,270 ----
(unless
;;Skip the entry that triggered this.
! (=
! (save-excursion
! (org-back-to-heading)
! (point))
! entry-pos)
(let
((ix
(org-choose-get-entry-index keywords)))
***************
*** 390,396 ****
(unless (org-up-heading-safe)
(error "Choosing is only supported between siblings in a tree, not on top level"))
(let
! ((level (1+ (org-reduced-level (org-outline-level)))))
(save-restriction
(org-map-entries
fn
--- 398,404 ----
(unless (org-up-heading-safe)
(error "Choosing is only supported between siblings in a tree, not on top level"))
(let
! ((level (org-reduced-level (org-outline-level))))
(save-restriction
(org-map-entries
fn
Diff finished at Wed Apr 8 20:02:54
[-- Attachment #3: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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
next reply other threads:[~2009-04-09 0:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 0:05 Tom Breton (Tehom) [this message]
2009-04-09 10:33 ` org-choose bugfix - whoops Carsten Dominik
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=1158.66.30.184.144.1239235517.squirrel@mail.panix.com \
--to=tehom@panix.com \
--cc=carsten.dominik@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 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).