emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question about cycle mode and sorting/refiling
@ 2009-06-04 18:20 Keith Swartz
  2009-06-09 10:10 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Swartz @ 2009-06-04 18:20 UTC (permalink / raw)
  To: [orgmode]


[-- Attachment #1.1: Type: text/html, Size: 2263 bytes --]

[-- Attachment #1.2: oracle_sig_logo.gif --]
[-- Type: image/gif, Size: 658 bytes --]

[-- Attachment #2: 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about cycle mode and sorting/refiling
  2009-06-04 18:20 Question about cycle mode and sorting/refiling Keith Swartz
@ 2009-06-09 10:10 ` Carsten Dominik
  2009-06-10  6:59   ` Keith Swartz
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-06-09 10:10 UTC (permalink / raw)
  To: Keith Swartz; +Cc: [orgmode]


On Jun 4, 2009, at 8:20 PM, Keith Swartz wrote:

> A few weeks back, I asked about hooks when refiling and/or sorting,  
> and am happy to report that these are working great for me ... /if/  
> I refile one item at a time. I'm unable to figure out why if I try  
> to refile multiple items in a /region/, it doesn't have the same  
> behavior.
>
> Here are my hook definitions:
>
> (setq org-after-refile-insert-hook
>     '(lambda() (org-up-heading-safe) (org-sort-entries-or-items nil ? 
> p))
> (setq org-after-sorting-entries-or-items-hook
>     '(lambda() (org-cycle) (org-cycle))

There seem to be parenthesis missing from these definitions, but I
am assuming that you do have them in your real setup.

>
> If I position the cursor on an item and refile it, it: a) resorts  
> the destination tree by priority, and b) restores the visibility to  
> folded, the way I like it.
>
> HOWEVER, if I select multiple items in a folded subtree (with  
> transient-mark-mode on; I'm using emacs 22.3), and reflie those, it  
> does not always work. I can't figure out the rules for when it does,  
> and when it doesn't, but when it does work, that appears to be an  
> abnormality.
>
> What happens in this scenario is that it will refile the items, but  
> it will neither resort the destination folder (even though the hook  
> is being called),

I believe this problem is now solved, I needed to deactive the region
before calling this hook.  Please upgrade to the latest git release
and try again.

>  the visibility of the refiled nodes is not reset. Plus, the  
> visibility of all items below the current point in the /originating/  
> folder is also changed to children.

I am not sure if I understand correctly.  Do you mean the outline node
where the refiled items *originate* changes visibility?  I cannot
reproduce this.  Maybe you can try with the latest version and then,
if the problem persists, come up with a test case.

HTH

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about cycle mode and sorting/refiling
  2009-06-09 10:10 ` Carsten Dominik
@ 2009-06-10  6:59   ` Keith Swartz
  0 siblings, 0 replies; 3+ messages in thread
From: Keith Swartz @ 2009-06-10  6:59 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: [orgmode]

Hi Carsten,

The changes in the latest git version appear to have fixed these 
problems. Thanks.

However, I've discovered a new problem, which is probably not related. 
If you refile one or more items to the same subtree, it wreaks havoc. In 
some cases, the item or entire subtree is apparently lost. It's late, 
but I'll try to submit a small test case soon.

Thanks,
Keith

Carsten Dominik wrote:
>
> On Jun 4, 2009, at 8:20 PM, Keith Swartz wrote:
>
>> A few weeks back, I asked about hooks when refiling and/or sorting, 
>> and am happy to report that these are working great for me ... /if/ I 
>> refile one item at a time. I'm unable to figure out why if I try to 
>> refile multiple items in a /region/, it doesn't have the same behavior.
>>
>> Here are my hook definitions:
>>
>> (setq org-after-refile-insert-hook
>>     '(lambda() (org-up-heading-safe) (org-sort-entries-or-items nil ?p))
>> (setq org-after-sorting-entries-or-items-hook
>>     '(lambda() (org-cycle) (org-cycle))
>
> There seem to be parenthesis missing from these definitions, but I
> am assuming that you do have them in your real setup.
>
>>
>> If I position the cursor on an item and refile it, it: a) resorts the 
>> destination tree by priority, and b) restores the visibility to 
>> folded, the way I like it.
>>
>> HOWEVER, if I select multiple items in a folded subtree (with 
>> transient-mark-mode on; I'm using emacs 22.3), and reflie those, it 
>> does not always work. I can't figure out the rules for when it does, 
>> and when it doesn't, but when it does work, that appears to be an 
>> abnormality.
>>
>> What happens in this scenario is that it will refile the items, but 
>> it will neither resort the destination folder (even though the hook 
>> is being called),
>
> I believe this problem is now solved, I needed to deactive the region
> before calling this hook.  Please upgrade to the latest git release
> and try again.
>
>>  the visibility of the refiled nodes is not reset. Plus, the 
>> visibility of all items below the current point in the /originating/ 
>> folder is also changed to children.
>
> I am not sure if I understand correctly.  Do you mean the outline node
> where the refiled items *originate* changes visibility?  I cannot
> reproduce this.  Maybe you can try with the latest version and then,
> if the problem persists, come up with a test case.
>
> HTH
>
> - Carsten
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-10  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 18:20 Question about cycle mode and sorting/refiling Keith Swartz
2009-06-09 10:10 ` Carsten Dominik
2009-06-10  6:59   ` Keith Swartz

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).