From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li Subject: Re: 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 Message-ID: References: <87po7lxsms.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOTuu-0004mW-Rs for emacs-orgmode@gnu.org; Mon, 11 Dec 2017 14:39:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOTut-0001Vx-UK for emacs-orgmode@gnu.org; Mon, 11 Dec 2017 14:39:08 -0500 Received: from mail-qt0-x232.google.com ([2607:f8b0:400d:c0d::232]:42360) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eOTut-0001Ut-PD for emacs-orgmode@gnu.org; Mon, 11 Dec 2017 14:39:07 -0500 Received: by mail-qt0-x232.google.com with SMTP id g9so41526648qth.9 for ; Mon, 11 Dec 2017 11:39:07 -0800 (PST) In-Reply-To: <87po7lxsms.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org On Mon, Dec 11, 2017 at 6:10 AM, Nicolas Goaziou w= rote: > Hello, > > Allen Li writes: > >> On Wed, Dec 6, 2017 at 12:19 PM, Allen Li wro= te: >>> (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=E2=80=99t 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.