emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: subtree archiving when Archive is not final headline yields


From: Allen Li
Subject: Re: [O] Bug: subtree archiving when Archive is not final headline yields bad visibility [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.2+gg1+12/lisp/org/)]
Date: Mon, 11 Dec 2017 11:39:06 -0800

On Mon, Dec 11, 2017 at 6:10 AM, Nicolas Goaziou <address@hidden> wrote:
> Hello,
>
> Allen Li <address@hidden> writes:
>
>> On Wed, Dec 6, 2017 at 12:19 PM, Allen Li <address@hidden> wrote:
>>> (Can reproduce with Org 9.1.3, submitting with emacs -Q)
>>>
>>> Using a file tmp.org:
>>>
>>>   * Foo
>>>   ** Archive     :ARCHIVE:
>>>   *** Test
>>>       :PROPERTIES:
>>>       :ARCHIVE_TIME: 2017-12-06 Wed 12:13
>>>       :END:
>>>   ** Bar
>>>
>>> This appears like so with default visibility:
>>>
>>>   * Foo
>>>   ** Archive     :ARCHIVE:...
>>>   ** Bar
>>>
>>> Archiving Bar with C-c C-x A yields:
>>>
>>>   * Foo
>>>   ** Archive     :ARCHIVE:...
>>>   *** Bar...
>>>
>>> Expected visibility:
>>>
>>>   * Foo
>>>   ** Archive     :ARCHIVE:...
>
> AFAICT, the action leaves point on the just archived sub-heading. As
> a consequence, it has to visible.
>
> Your expected visibility means the function should move point. Why would
> that be better than letting it on the headline you just operated on?

Archiving DOES move point, it's just a question of where it moves
point to.  It should not be moving point to the archived heading.
Examples (^ is point):

  * Foo
  ** A
  ** ^B
  ** C
  ** Archive :ARCHIVE:...

Archiving to a separate file yields:

  * Foo
  ** A
  ^** C
  ** Archive :ARCHIVE:...

Archiving to a subtree yields:

  * Foo
  ** A
  ^** C
  ** Archive :ARCHIVE:...

BUT if the Archive heading isn’t last:

  * Foo
  ** Archive :ARCHIVE:...
  ** A
  ** ^B
  ** C

Archiving to a separate file yields:

  * Foo
  ** Archive :ARCHIVE:...
  ** A
  ^** C

Archiving to a subtree yields:

  * Foo
  ** Archive :ARCHIVE:
  *** B^...
  ** A
  ** C

The implementation is painfully inconsistent.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]