On Mon, Dec 11, 2017 at 6:10 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote: > Hello, > > Allen Li <vianchielfa...@gmail.com> writes: > >> On Wed, Dec 6, 2017 at 12:19 PM, Allen Li <vianchielfa...@gmail.com> 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.