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 ms0.migadu.com with LMTPS id sNWCGpoi0GGdDQEAgWs5BA (envelope-from ) for ; Sat, 01 Jan 2022 10:44:58 +0100 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 mI7fF5oi0GEzzQAA9RJhRA (envelope-from ) for ; Sat, 01 Jan 2022 10:44:58 +0100 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 BCE062EBAC for ; Sat, 1 Jan 2022 10:44:57 +0100 (CET) Received: from localhost ([::1]:46514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3awa-0002qp-Si for larch@yhetil.org; Sat, 01 Jan 2022 04:44:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3awE-0002qT-I4 for emacs-orgmode@gnu.org; Sat, 01 Jan 2022 04:44:34 -0500 Received: from [2607:f8b0:4864:20::931] (port=34667 helo=mail-ua1-x931.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3awC-0001vM-ON for emacs-orgmode@gnu.org; Sat, 01 Jan 2022 04:44:34 -0500 Received: by mail-ua1-x931.google.com with SMTP id t18so42564045uaj.1 for ; Sat, 01 Jan 2022 01:44:32 -0800 (PST) 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; bh=fM++Xy8sUdjosBuVulggsD9QJl67KC42YtsqD6wOTZQ=; b=u9gV5d3mzligIpaAlBAwektQ45oYlqbaX8U0vaq7aD0X5B2olPEQSYHe4V6jVrWUDE 9T1RRGQGJVaSMNrpear/GUiXxtcHfkxUpCK8JseoKZaWnuc6oB661AKYv3TFLWesxNcd rgE8PDX+rWIG0IyVRItJknv2S+zSPCK9evwEWad1h3HzlZ6tY/IA9NTZzpc5oBmuJHyG 6JOflvE1Yv0jLKDpjiRwfvr9qco5z3QHzUQM2orc3swSVjYT3jXx1sFM2IAkju2JCF2n /GVFFBlLEFJnR2VlbYUdH4zTixz36+bAM6wXlwxdYvKQPZ5EES3OBHutw54Gby3Lbvy/ R/TA== 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; bh=fM++Xy8sUdjosBuVulggsD9QJl67KC42YtsqD6wOTZQ=; b=Vuai49Ih63INjLBQmtOb2P/c9bHduYYg1nG8XwH6Ist7NrOTLIYbobOsXlTexdWLgc SNPZ6LUACMvyTMG+aG/9lVJ3wn9QItPShVDApBja5w5fHkMXe7aMpMly8WNi1DGaashU G0CHmUbvTMcfSvPfsvbrsUtTiczoGPpKr2YknaVeCHzRv1A7PgXT7W1X4tT7lpDEFG7d 9kQri5h7duxbLVGiw11UByWv7krxK9/WSoZoEZMEcDz/2Cj2uNuMgAaD4kniLo/0dnZb N5pE/JIdVQC1KT5EmKpy11J2GI1mSWiKWc63fEUjLtaBPH9BXCE3YpiUDZFM0lJvv6qr Uf3w== X-Gm-Message-State: AOAM532TAbeH/gG4gQd/yY3Aj6LFjqR+U5GAQTSV0IRVlLYxU6g/56hB fY7u8STntEwtK3HGyacFcKX7+znueq7x21Clmt9R8oLQiOvMkQ== X-Google-Smtp-Source: ABdhPJy2VKh/UDPLqGNub8ry+tF2x8DJadCt2/LL6ChaOIlMf0NrgmavzRaL5vf2zVgrJ3ZDUTwSLkRsE0cCgcz3F3Q= X-Received: by 2002:a05:6102:3ecc:: with SMTP id n12mr1375957vsv.78.1641030271466; Sat, 01 Jan 2022 01:44:31 -0800 (PST) MIME-Version: 1.0 References: <80o84vol8s.fsf@felesatra.moe> In-Reply-To: <80o84vol8s.fsf@felesatra.moe> From: Allen Li Date: Sat, 1 Jan 2022 09:44:20 +0000 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: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="00000000000065b0f505d48222d1" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::931 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::931; envelope-from=darkfeline@felesatra.moe; helo=mail-ua1-x931.google.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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.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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641030298; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=UTSavGRKbzyRuWVGYiX+sIZZdCMz69OQXcseKV88+S0=; b=QGezQCiAXu8o5NewYuk9zIVdv4gp4fAR4u5ilA9XzXf7BJ60MPbGozJDySgdxj/nYMzxts YaJB1DfVaKwTm/BkgEIc4H3K5Fe7b4cvTA/VFG7BiuxX4PwaDdZ92w9Ck40H+4aKZkv4Ao OJYXw3FTX060t0WPjLYDxNgIfuvdnMHGniwPOPOcWKXGKjQ4AHn2F1JFgfVRYzaix+hfrD xg//AoFwAN4vTLemWW+cqGZ2zA8BiujzmDkeS3Dxd/xBkOmLEusv7uA9sTQidwO4fsxWBS CzbwhsDP0YJF4lu+P14FmKgJkoJx+19YKqxj5odsrnQJqYK1iFaiOCJ0PULb9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641030298; a=rsa-sha256; cv=none; b=h0QKs+t1TzSZRP4QdArVLW7oQeI9fDuzcuNHTO1NaNhnfh+q36JSmtGES9LftYyAfzat1T +ZfbiShLskmmEF/0gX6uiFr+ko65Kfp2wIQfBmwM9wgLPzc1gDTcSFsX8N7hZK5tEe0e2M qCocVcK/K+h2W/M8+spVfDr5Iq2Ied+EUES1Zxo/rMT4KDKV/BiDSgl7mi5/elUCz0anAT luNTQObvgqNoo0hwAaIZ6TfsnZlqZjqLU2kavcAktb4yk2Zko4n/ozUMq0VHYZombnrmzs Sfy79edEK/NqKAD5fc+/2jST0buqmNzTJ83PNxOo+u5rQziLe81Ac8rhObn3lA== 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=u9gV5d3m; 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: -1.28 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=felesatra-moe.20210112.gappssmtp.com header.s=20210112 header.b=u9gV5d3m; 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: BCE062EBAC X-Spam-Score: -1.28 X-Migadu-Scanner: scn0.migadu.com X-TUID: soK1TgTO5qXV --00000000000065b0f505d48222d1 Content-Type: multipart/alternative; boundary="00000000000065b0f305d48222cf" --00000000000065b0f305d48222cf Content-Type: text/plain; charset="UTF-8" On Sat, Jan 1, 2022 at 9:31 AM Allen Li wrote: > It seems like the right fix here is to make - behave the same as -1, and > raise a user error for any other negative numeric prefix, since it is > likely not doing whatever the user wanted. > Attached a small patch fixing this, which I tested manually. Feel free to remove the negative arg error if it's not desired (although I don't think there is a use case for, e.g., typing M-- M-2 instead of M-1). --00000000000065b0f305d48222cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jan 1, 2022 at 9:31 AM Allen Li &= lt;darkfeline@felesatra.moe> wrote:
=
It seems like the right fix here is to make - behave the same as -1, and raise a user error for any other negative numeric prefix, since it is
likely not doing whatever the user wanted.

<= div dir=3D"ltr">Attached a small patch fixing this, which I tested manually= .

Feel free to remove the negative arg= error if it's not desired (although I don't think there is a use c= ase for, e.g., typing M-- M-2 instead of M-1).
--00000000000065b0f305d48222cf-- --00000000000065b0f505d48222d1 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-org-Improve-org-todo-handling-of-negative-prefix-arg.patch" Content-Disposition: attachment; filename="0001-org-Improve-org-todo-handling-of-negative-prefix-arg.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kxvmxy730 RnJvbSAxNmZmODljMzA5YjhiZDlhYTExMTgzY2M5NjIwYzU2ZWQ5NmUzZmY3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGxlbiBMaS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