emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Benjamin Andresen <benny@in-ulm.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Refiling goes to the wrong place
Date: Thu, 27 Aug 2009 14:33:41 -0400	[thread overview]
Message-ID: <871vmxf6nu.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <87ljl5npts.fsf@in-ulm.de> (Benjamin Andresen's message of "Thu\, 27 Aug 2009 19\:12\:31 +0200")

Benjamin Andresen <benny@in-ulm.de> writes:

> I have the same behavior from time to time. But whenever I try to find a
> reproducible scenario it disappears.
>
> It also never happens twice in a row, same as with Bernt.

I think I have something that is reproducible.

,----[ /tmp/x.org ]
| 
| * Refile Targets
| ** TODO One
| ** TODO Two
| ** TODO Three
| ** TODO Four
| ** TODO Five
| ** TODO Six
| *** TODO Six.one
| *** TODO Six.two
| **** TODO Clock me
| ** TODO Seven
| ** TODO Eight
| ** TODO Nine
| ** TODO Ten
| * Refile Tasks
| *** TODO Refile Me
`----

,----[ /tmp/minimal.emacs ]
| (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
| (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
| (require 'org-install)
| 
| (global-set-key "\C-cl" 'org-store-link)
| (global-set-key "\C-ca" 'org-agenda)
| (global-set-key "\C-cb" 'org-iswitchb)
| 
| (setq org-log-done (quote time))
| (setq org-log-into-drawer t)
| (setq org-agenda-files '("/tmp/x.org"))
| (setq user-init-file "/tmp/custom.el")
| 
| (setq org-refile-allow-creating-parent-nodes nil)
| (setq org-refile-targets (quote ((nil :maxlevel . 2) (org-agenda-files :maxlevel . 2))))
| (setq org-refile-use-outline-path nil)
| (setq org-todo-keywords (quote ((sequence "TODO(t!)" "STARTED(s!)" "|" "DONE(d!/!)") (sequence "WAITING(w@/!)" "SOMEDAY(S!)" "OPEN(O@)" "|" "CANCELLED(c@/!)") (sequence "QUOTE(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)" "EXPIRED(E@)" "REJECTED(R@)"))))
`----

Steps to reproduce:
 
  1. Save the files /tmp/x.org and /tmp/minimal.emacs
  2. emacs -q -l /tmp/minimal.emacs /tmp/x.org
  3. Go to CONTENTS view with S-TAB twice
  4. Put point on **** TODO Clock Me
  5. Clock in the task with C-c C-x C-i

     This adds a logbook drawer with the clock

  6. Fold to OVERVIEW view with S-TAB

     So it looks like this

     ,----[ x.org folder ]
     | 
     | * Refile Targets...
     | * Refile Tasks...
     `----

  7. M-x org-clock-goto

     This reveals the buffer like so:

     ,----
     | 
     | * Refile Targets...
     | **** TODO Clock me
     |      :LOGBOOK:...
     | ...
     | * Refile Tasks...
     `----

     I think this is the critical step.

  8. Put point on Refile Tasks
  9. Show task to refile with TAB
  10. Put point on ** TODO Refile Me
  11. Refile to Ten with C-c C-w Ten RET
  12. Put point on Refile Me
  13. Reveal with C-c C-r

      Shows that we are under TODO Ten.  So far so good

      ,----
      | 
      | * Refile Targets...
      | **** TODO Clock me
      |      :LOGBOOK:...
      | ...
      | ** TODO Ten
      | *** TODO Refile Me
      | * Refile Tasks
      `----

  14. Now repeat steps 10-13 but refile to 'Two' instead of 'Ten'

      This goes to the wrong place.  This files under Nine for me

      ,----
      | 
      | * Refile Targets...
      | **** TODO Clock me
      |      :LOGBOOK:...
      | ...
      | ** TODO Nine
      | *** TODO Refile Me
      | ** TODO Ten
      | * Refile Tasks
      `----

  15. Repeat steps 10-13 with refiling to 'Two' each time

      This moves Refile Me up one task at a time until it gets to Two
      ie. it refiles to Eight, then Seven, then Six, then Five, then
      Four then Three, then Two.      

If you show contents view with S-TAB and then refile it goes to the
right place immediately.  So this definitely has something to do with
the folded view of the org file.

I'll be _really_ happy when Carsten squashes this bug :)

-Bernt

  reply	other threads:[~2009-08-27 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27 16:28 Refiling goes to the wrong place Bernt Hansen
2009-08-27 17:12 ` Benjamin Andresen
2009-08-27 18:33   ` Bernt Hansen [this message]
2009-08-27 18:41     ` Bernt Hansen
2009-08-27 19:42     ` Nick Dokos
2009-08-28  6:55     ` Carsten Dominik
2009-08-28 12:09       ` Bernt Hansen
2009-08-28 12:13         ` Carsten Dominik
2009-08-28 12:15           ` 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=871vmxf6nu.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=benny@in-ulm.de \
    --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).