From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +BFTIA/yt2JRlAAAbAwnHQ (envelope-from ) for ; Sun, 26 Jun 2022 07:43:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KBZRIA/yt2JjXAAA9RJhRA (envelope-from ) for ; Sun, 26 Jun 2022 07:43:43 +0200 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 9C7943D744 for ; Sun, 26 Jun 2022 07:43:42 +0200 (CEST) Received: from localhost ([::1]:58892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5L3d-0004zC-B4 for larch@yhetil.org; Sun, 26 Jun 2022 01:43:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5L1M-0004x6-Oo for emacs-orgmode@gnu.org; Sun, 26 Jun 2022 01:41:21 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:33469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5L1K-0006wq-FK for emacs-orgmode@gnu.org; Sun, 26 Jun 2022 01:41:20 -0400 Received: by mail-ej1-x631.google.com with SMTP id mf9so12717483ejb.0 for ; Sat, 25 Jun 2022 22:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SQ+H4mqKZaRaoQiMmstkCTWn1N3ZHxws4rF/0N6AfFk=; b=yMZ5z0mrEm3mPvB3Z1UZnnLmJluHsNPKMiecj3UOo2FB9E4lk+Tx+nTELop4N51zT8 L0oBldEsDMnnfY8BmSv3+kSYRplaSNoVCVgIgZ8M1Sx//5WfnuDGtcWsEFGCm1qwYciJ yPLRt+nRYUYB9tmUApTnTlgMrL82FpAeB4rwrq3uN48f6gYAULZB3YwzOEqQunbHV31r LWXvFmCcUL/Xbujy8PcwqidDdBuHuc4B5t8nSq5M3wLgBF7bTtqFiOIP1XXyq4+NnTjy pcCQ0Yu6TCe0M+V/akye83kfkpSE7EeJ60+AL1UCeVA50QX93N4i6aPUbSunykLAmouG xbYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SQ+H4mqKZaRaoQiMmstkCTWn1N3ZHxws4rF/0N6AfFk=; b=FxEH76d7kuXlbVJz2r0BYEz445QFovO3u5rq1/jt89uueGNtxCWcQtPN3IlKSg+Xw0 QRhfU/Ov0KgQlVlR43c1WU1+uujIvaIYageKBFmwXw7+91z92P7B67aGULUxSDG7yiar 9tRLECJL/HZ5rqp/vlO5TFwoKZ3beraPKfoV5DPys7KnRz96MS6M+RE5H+DZ1KnFyBID 27tfqc/TGwy4aEGNtKafPnafzp1vVs9EMtmzt4W9I6GoYKzOtbb4gNT2hkDcSfcvJkGT ER7d0q9B/AjVR2ZmX6cN6Zo0S8fd6bScSWW6nlooN62rQvaNzFvFlkK0OmVCQ3N/5n9c /0sg== X-Gm-Message-State: AJIora9p6YsnLfyudaG0sHhw6bzmd9NrI7rkl8MtEDULzOiVFFkzLtlb 6bdo3ySAuP+/E1KebAi04nMoZDWwLucFnrCG3c7M/w== X-Google-Smtp-Source: AGRyM1s/YdSwP7ZsMNrIvdAoiz5SLFHIiDte2S7Ug0xfqKuHUlglm5UMJKfJOr7A4J3mXEhjFQbLg8OFRJRoIl6+Hw4= X-Received: by 2002:a17:906:216:b0:711:f623:8bb0 with SMTP id 22-20020a170906021600b00711f6238bb0mr7086790ejd.174.1656222076655; Sat, 25 Jun 2022 22:41:16 -0700 (PDT) MIME-Version: 1.0 References: <80o84vol8s.fsf@felesatra.moe> <87h79a3gxp.fsf@localhost> <87zgiav6wn.fsf@localhost> <87zgi02fml.fsf@localhost> In-Reply-To: <87zgi02fml.fsf@localhost> From: Allen Li Date: Sat, 25 Jun 2022 22:41:05 -0700 Message-ID: Subject: Re: [BUG] org-todo (C-c C-t) bad negative prefix behavior [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)] To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="0000000000008c8a3005e253400a" Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=darkfeline@felesatra.moe; helo=mail-ej1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656222223; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2RXL8e8RoOxj7lJybqY88Wfm2w5dUAanIUHJMsEu00M=; b=PbHo3PSWMlQGLlvusQh4xLu9XS1XVAWxIpNN+KMFuW2g9+3oU+3fP7Bud1MV/u/bMd6ueN RvPtGsNW+YrGn3+zXko0vFugV9Fvlu/4vAr1lOMJUqVHPGa7d7VDAInWQEtISk+4Ckh+AQ f0LVIJl2Xhbar5sUgB3BtimOp0EW0bdesDq2O6eAefCGaaeQXdTDVCKTRpHrgucWhuIZ5k bf86L+LzSX7aQ4Qq3/0NWkaLLZU253RpHNY4rKwI8vAO4Ccg01/mnNoglEZwX0tBBjQWi6 vROHvNw5EfGvd5qLLlJNCpZo3eBHX/mYtYsDmvOAVo8BANOImn3gTUJq5pAo/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656222223; a=rsa-sha256; cv=none; b=IhBh4SMm3ehyKtLtkMpIWBl5Fsp5A4xlWz169lmR0QQAFk1n6aUpdcrCVjZcDqay+OoRXr 57TwkYDe8fjJjp1jQ6Ao7jZhQuygiEv/2yFar33fCo80OaIV+WmnPIXEuTKwUVnMaTW95t nziOTK/9WB5G0JJc9MUPCRbCn/x/1ZN8BS6FtNgc5SCS8cU+DH+tYrhLXVoy41WQRRg+Oh SmVpVdxe64Uzjmkc9s60775AKutCQALvwAjiDVtR4sh4HKvOnRicy40viqbe6Hv2ne27CG GrheoKJkPO75fZVYQxc6sg1dvwGsiNjAJJ9r4DLYSbwMsGPmJIkjGCkzUzdiBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=felesatra-moe.20210112.gappssmtp.com header.s=20210112 header.b=yMZ5z0mr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.94 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=felesatra-moe.20210112.gappssmtp.com header.s=20210112 header.b=yMZ5z0mr; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9C7943D744 X-Spam-Score: 3.94 X-Migadu-Scanner: scn1.migadu.com X-TUID: I66oW56a9lWj --0000000000008c8a3005e253400a Content-Type: multipart/alternative; boundary="0000000000008c8a2c05e2534008" --0000000000008c8a2c05e2534008 Content-Type: text/plain; charset="UTF-8" Attached On Sat, Jun 25, 2022 at 9:48 PM Ihor Radchenko wrote: > Allen Li writes: > > >> Would you also be interested to write a test checking org-todo ARGS? > >> > > > > Attached > > Thanks! However, it is unclear what this test is checking for. > > > +(ert-deftest test-org/org-todo-prefix () > > + "Test `org-todo' prefix arg behavior." > > + ;; -1 prefix arg should cancel repeater and mark DONE. > > + (should-not > > + (string-prefix-p > > + "* TODO H" > > + (let ((org-todo-keywords '((sequence "TODO" "DONE")))) > > + (org-test-with-temp-text "* TODO H\n<2012-03-29 Thu +2y>" > > + (org-todo -1) > > + (buffer-string))))) > > This test does not check if the task is actually marked DONE and also > does not check if the repeater is canceled. > > Best, > Ihor > > --0000000000008c8a2c05e2534008 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Attached

On Sat, Jun 25, 2022 at 9:48 PM Ihor Radchenko <= ;yantar92@gmail.com> wrote:
Allen Li <darkf= eline@felesatra.moe> writes:

>> Would you also be interested to write a test checking org-todo ARG= S?
>>
>
> Attached

Thanks! However, it is unclear what this test is checking for.

> +(ert-deftest test-org/org-todo-prefix ()
> +=C2=A0 "Test `org-todo' prefix arg behavior."
> +=C2=A0 ;; -1 prefix arg should cancel repeater and mark DONE.
> +=C2=A0 (should-not
> +=C2=A0 =C2=A0(string-prefix-p
> +=C2=A0 =C2=A0 "* TODO H"
> +=C2=A0 =C2=A0 (let ((org-todo-keywords '((sequence "TODO&quo= t; "DONE"))))
> +=C2=A0 =C2=A0 =C2=A0 (org-test-with-temp-text "* TODO H\n<201= 2-03-29 Thu +2y>"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-todo -1)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 (buffer-string)))))

This test does not check if the task is actually marked DONE and also
does not check if the repeater is canceled.

Best,
Ihor

--0000000000008c8a2c05e2534008-- --0000000000008c8a3005e253400a Content-Type: text/x-patch; charset="US-ASCII"; name="0001-test-org-Add-test-for-org-todo-prefix-behavior.patch" Content-Disposition: attachment; filename="0001-test-org-Add-test-for-org-todo-prefix-behavior.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l4uvunz10 RnJvbSA0MjE1NmJhMWU4YjNjNTg5Mzk0MjEyZWY0MjNmOTllMTIyNTQ0YzVmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGxlbiBMaSA8ZGFya2ZlbGluZUBmZWxlc2F0cmEubW9lPgpE YXRlOiBTYXQsIDI1IEp1biAyMDIyIDIxOjI3OjIwIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gdGVz dC1vcmc6IEFkZCB0ZXN0IGZvciBvcmctdG9kbyBwcmVmaXggYmVoYXZpb3IKCiogdGVzdGluZy9s aXNwL3Rlc3Qtb3JnLmVsICh0ZXN0LW9yZy9vcmctdG9kby1wcmVmaXgpOiBBZGQgdGVzdC4KLS0t CiB0ZXN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XAKKyAgICAiRE9ORSBIXFwoLipcblxcKSo8MjAxMi0wMy0yOSBUaHUg XFwrMHk+IgorICAgIChsZXQgKChvcmctdG9kby1rZXl3b3JkcyAnKChzZXF1ZW5jZSAiVE9ETyIg IkRPTkUiKSkpKQorICAgICAgKG9yZy10ZXN0LXdpdGgtdGVtcC10ZXh0ICIqIFRPRE8gSFxuPDIw MTItMDMtMjkgVGh1ICsyeT4iCisJKG9yZy10b2RvICctKQorCShidWZmZXItc3RyaW5nKSkpKSkp CisKIAwKIDs7OyBUaW1lc3RhbXBzIEFQSQogCi0tIAoyLjM2LjEKCg== --0000000000008c8a3005e253400a--