From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +BmYN6lNql/LFwAA0tVLHw (envelope-from ) for ; Tue, 10 Nov 2020 08:22:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cK2pM6lNql+MbQAA1q6Kng (envelope-from ) for ; Tue, 10 Nov 2020 08:22:01 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 505719402B4 for ; Tue, 10 Nov 2020 08:22:01 +0000 (UTC) Received: from localhost ([::1]:34614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcOuc-0006AA-Sh for larch@yhetil.org; Tue, 10 Nov 2020 03:21:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcOu6-00069H-WA for emacs-orgmode@gnu.org; Tue, 10 Nov 2020 03:21:27 -0500 Received: from mail-io1-f47.google.com ([209.85.166.47]:36788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcOu5-0003wr-3a; Tue, 10 Nov 2020 03:21:26 -0500 Received: by mail-io1-f47.google.com with SMTP id u19so12950848ion.3; Tue, 10 Nov 2020 00:21:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vi4USOQ9DTxYMt8xMRfAtysVX1/VOyvtlQykOhrRY0Q=; b=J6vUsYbOSRAddR7gQ7Y9ZF5iB50b3AHC1pyoVtjcfdf8LawbEzLQf4cWtVy6FF6kEO r084KoRG5dkLO+5naqvzXGMv7XcPPJGRzIA2VttyfF7tkozbPzT74sdNr9b0qTPZDUC6 A/jH6p38BBPsxfYDxSpPa1Bj+NCcopbAOPFO1mnHzu9ZIh/GMytJ3i3CkdWpdvLV79dN VJbrnrXntGC8p3NYRRofhs0U0FGS17s6D4TMQ/TECF7NtN3XETqz7aCfEy0VUKDWnUk6 NgLShJ35rU9j2UF2Ipm0zROI9u+tYgpzAhpz846jX//gPu+TV0G5Ncxm/Pk5KgMmK+/5 bYjw== X-Gm-Message-State: AOAM530WImwk1yZEfy2HEQ3ycPr+mfYeNIvI2LKfMlHpMEIIAOck6N9D c1b1SwRVwWav6X2h/TOs+tAETbuFfkBS21nrZ6rPvJyO8kgKlw== X-Google-Smtp-Source: ABdhPJxFdZKwe9gTYs7YJMoS7mjjjXGDZnIGvIBlWZh+JzzWHjndBrOWqtDpqDloHx3oUhkckmLc3d28oHfSrwQGLXg= X-Received: by 2002:a5d:9d48:: with SMTP id k8mr13179502iok.62.1604996480165; Tue, 10 Nov 2020 00:21:20 -0800 (PST) MIME-Version: 1.0 References: <877dt3z3mp.fsf@gnu.org> In-Reply-To: <877dt3z3mp.fsf@gnu.org> From: Charles Tam Date: Tue, 10 Nov 2020 03:20:44 -0500 Message-ID: Subject: Re: Bug: Off-by-one when archiving to top level date [9.3.6 (9.3.6-17-g389288-elpa @ /home/charlestam/.emacs.d/elpa/org-20200224/)] To: Bastien Content-Type: multipart/alternative; boundary="00000000000010eca505b3bc5de7" Received-SPF: pass client-ip=209.85.166.47; envelope-from=tank.bard@gmail.com; helo=mail-io1-f47.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/10 03:21:20 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: pxjcCKhDCh+m --00000000000010eca505b3bc5de7 Content-Type: text/plain; charset="UTF-8" Wow it's been a while. Sorry I dropped this! To reproduce the bug, open the following content in `emacs -q` and run org-archive-subtree on the TEST ITEM: #+COMMENT: Local Variables: #+COMMENT: mode: org #+COMMENT: org-archive-location: "::datetree/" #+COMMENT: org-odd-levels-only: t #+COMMENT: End: * TEST ITEM You can check that the indentation of the TEST ITEM is more correct if you set org-odd-levels-only to nil. More weirdness also happens if you set org-archive-location to "::datetree/* Archive Header" (while org-odd-levels-only is t). Charles On Wed, Sep 9, 2020 at 5:44 AM Bastien wrote: > Hi Charles, > > sorry for the late feedback. > > Charles Tam writes: > > > I am archiving subtrees of my main Orgmode document to a top-level > > datetree in a secondary file. When I do so, I expect something like > > the following: > > > > * 2020 > > *** 2020-02 February (org-odd-levels-only t) > > ***** 2020-02-27 Thursday > > ******* Archived Item > > > > But instead I get > > > > * 2020 > > *** 2020-02 February > > ***** 2020-02-27 Thursday > > ***** Archived Item > > > > The archived item ends up as a sibling of the targeted date, instead > > of a child. This seems incorrect. > > What command or keybinding do you use when archiving? > > Can you provide a minimal step-by-step recipe to reproduce this bug > with emacs -q ? > > Thanks, > > -- > Bastien > --00000000000010eca505b3bc5de7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Wow it's been a while. Sorry I dropped this!

<= /div>
To reproduce the bug, open the following content in `emacs -q` an= d run org-archive-subtree on the TEST ITEM:

#+COMMENT: Local Variables:
#+COMMENT: mode: org
#= +COMMENT: org-archive-location: "::datetree/"
#+COMMENT: org-o= dd-levels-only: t
#+COMMENT: End:

* TEST ITEM


You can check that the indentation of the TEST ITEM is more correct = if you set org-odd-levels-only to nil. More weirdness also happens if you set org-archive-location to "::datetree/* Archiv= e Header"=C2=A0(while=C2=A0org-odd-levels-only=C2=A0is=C2=A0t).

Charles

On Wed, Sep 9, 2020 at 5:44 AM Basti= en <bzg@gnu.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Hi Charles,

sorry for the late feedback.

Charles Tam <me@cha= rlest.net> writes:

> I am archiving subtrees of my main Orgmode document to a top-level
> datetree in a secondary file. When I do so, I expect something like > the following:
>
> * 2020
> *** 2020-02 February =C2=A0(org-odd-levels-only t)
> ***** 2020-02-27 Thursday
> ******* Archived Item
>
> But instead I get
>
> * 2020
> *** 2020-02 February
> ***** 2020-02-27 Thursday
> ***** Archived Item
>
> The archived item ends up as a sibling of the targeted date, instead > of a child. This seems incorrect.

What command or keybinding do you use when archiving?

Can you provide a minimal step-by-step recipe to reproduce this bug
with emacs -q ?

Thanks,

--
=C2=A0Bastien
--00000000000010eca505b3bc5de7--