From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IHErJbPZr2apMQAAe85BDQ:P1 (envelope-from ) for ; Sun, 04 Aug 2024 19:42:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id IHErJbPZr2apMQAAe85BDQ (envelope-from ) for ; Sun, 04 Aug 2024 21:42:43 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="Vh3hq5w/"; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722800563; 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=EyGV7BB4ltDF6anlv6PJ5mth/u0pUQ5wrrzTQmjV0W4=; b=NytAlI1rvZaHrnw5qbOjK/tfvq9LO0VKke3JMzCGmD7bwAjYoub3+Y5zzevbckenC0zkV4 fW/6EENHJbH0FduSsrDTGJITtkHnpaaumPDiRgsh3rAqJHv1wrZB4EJIkG9/mtUJ3ASZM/ JBg9FPFG4aKl7i2c9TIscRCjeW/eXQ9c+cBwJ0lrd2AAoLAUQNrgy76B5sfn9JRkJ1te8r ZF6CDSkoyqujoBH5zl0B0qd1vJPG+/zDoq4SZLj0Q1zt+i0TnoiMcKTbSK8bHHuzyOqRAM Y0hFCsVKrsWggTaUZQNGP2KjGW/XxSqpj5dlejue1SoGvIuRwBaaQqPH7HMkFQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722800563; a=rsa-sha256; cv=none; b=VuAz39DvSOyTu/SA3wp457/JUEcx9UQ2dTveM+Inx6g+AEQB4dsf8X6HgMjoRl62bIuPja 5kgm34+uRebk2aOe39oAGrDZW4lwxy3HfJSDMqGiG9liDXUvXMBoROeLx9p23ZUqwWQLI8 ydR2uqXjuO5azahYHhIQakcLeDILHRxYr38su5q/yKa/v++1PWFOurwQzzzp3wl/D0bkis B2uckUsYrlpxu/0yf7jTTutBcsq+n4XuAxvSbwpqDli17s/O0S7hV5KPBu3OaV54UTxMWi 2FjkjE0+7RvPX2z8+qNg2ywEREGx20rLZ9TsJlzsRjfrEaoLf6Wi1QoByj6f0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="Vh3hq5w/"; dmarc=pass (policy=none) header.from=gmail.com; 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" 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 0E55D797D1 for ; Sun, 04 Aug 2024 21:42:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sah70-0003lo-RA; Sun, 04 Aug 2024 15:41:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sah6y-0003le-Oq for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 15:41:48 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sah6x-0000Dp-1w for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 15:41:48 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-52fc14d6689so9707060e87.1 for ; Sun, 04 Aug 2024 12:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722800504; x=1723405304; darn=gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=EyGV7BB4ltDF6anlv6PJ5mth/u0pUQ5wrrzTQmjV0W4=; b=Vh3hq5w/yrOoRbdgMN6eddR9TvNwh55+8YNxB+hbd8/Sl2TyzhTAO2Xnhms0j25aQ5 pkgqA4iIwhQ2Hr+FO4gZ48O1J8qL1ivLl56Xc+KCGgml8GmsqDudPQQnxZ3RIWE/nGwA rbv1cEFkXuHldKFKS6AucsHoOrQ2OSln/92a6Mf04CEWayxim5Cobl5qCzthKBegnDwW XTRmDB7wdhfft5FXaX2nQ5+/7nCa3LJA1aFyv/FGQeICnM0u5bkTT3S9osFgQvqNq8j4 ffbdagbfqis7Pkm6DpKLgwvvPDUOl/1ZJvHM4R38c9BMjpAvpYPjihSDCYhnJSnh/W9/ OxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722800504; x=1723405304; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EyGV7BB4ltDF6anlv6PJ5mth/u0pUQ5wrrzTQmjV0W4=; b=Uwe50uHPyfpJqUroghoq31Z18rubqEZLCbJ6Ot5CtU+9+rAX9DygHMlhT9gau6aHT+ IS0v6hZX7xWHX2f4noMjCscWTBdPduaVfrjJEHLhpb43yfCWpU+YiMjoTZYseUopebPU QkpaKS7NZNHK22y4okTE707h3fsKYVa4pw8Ph4czOHlXc2e3Cs5cU419BXWcLm8Y54Qt /I7NoKGTLpSxHwYkjui2Bzwy2Jich5QYM2601E4l9AVOGzMJ8FEXb+GHqj+kmIZp+GyT Uen9cTszOVUwyuYlrZxdm7nOoPAXfQutyovvYynkgEQA8tdEPDbVkcHazpk6vL0tfthj TrdQ== X-Gm-Message-State: AOJu0YynP4qDRJxgHyanNiFDcgtWokvR2j87artWbkvU+Jb+0B3nA3KJ Jd4VH37RzchkDP892uK0m/lGurEocM3SpRqT/1IMLyP2jwKn7Rc7ObyQScJPpR2XqEmUQ5Jh22p 0rKVUCk5QRnHKjsb+ljVtbhlB19U= X-Google-Smtp-Source: AGHT+IFlnE33feiypzy1UGcbtkDirJPmcpIM84NxdZl6tmvvwo5ViiSbZVZERfGuJRMNYC7gF/zIyrfdM5rSgauar4s= X-Received: by 2002:a05:6512:2250:b0:52e:fa14:cc96 with SMTP id 2adb3069b0e04-530bb37f8e4mr6217774e87.34.1722800503363; Sun, 04 Aug 2024 12:41:43 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 4 Aug 2024 19:41:42 +0000 From: Peter Solodov In-Reply-To: <87r0b4duzo.fsf@localhost> References: <87r0b4duzo.fsf@localhost> MIME-Version: 1.0 Date: Sun, 4 Aug 2024 19:41:42 +0000 Message-ID: Subject: Re: [BUG] org-cancel-repeater fails depending on position of repeater [9.6.15 (release_9.6.15 @ /opt/homebrew/Cellar/emacs-plus@29/29.4/share/emacs/29.4/lisp/org/)] To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=solodov@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.77 X-Spam-Score: -6.77 X-Migadu-Queue-Id: 0E55D797D1 X-Migadu-Scanner: mx11.migadu.com X-TUID: QTsFLEimhwh8 Changing `org-cancel-repeater' to work on all active timestamps makes the most sense to me. The reason this came up at all is because org changes order of timestamps, first timestamp is always the timestamp that was changed last. If entry is a state where current code can handle it correctly and then timestamp with repeater is shifted through a normal user action (updating deadline or scheduled), then canceling with repeater override is unexpectedly broken. Ihor Radchenko writes: > solodov@gmail.com writes: > >> Minimal test file: >> >> * test >> DEADLINE: <2024-08-02 Fri> SCHEDULED: <2024-07-29 Mon +1d> >> >> After M-x org-cancel-repeater, repeater is still there: >> >> * test >> DEADLINE: <2024-08-02 Fri> SCHEDULED: <2024-07-29 Mon +1d> > > Confirmed. > > That's true, but I am not sure if it is a bug or just an inaccuracy in > the documentation. The accurate documentation of what > `org-cancel-repeater' does is: > > Cancel a repeater in the first active timestamp in the heading by setting > its numeric value to zero. > If there is no repeater in the first timestamp, do nothing. > > So, it just removes a repeater in the first timestamp. > > On the other hand, looking into git history, I see that the reason why > this function was originally introduced (in 1eb03c8c87) is to prevent > `org-todo' from switching an item marked DONE back to TODO when there > are _any_ (`org-get-repeat') repeaters inside heading. So, it will > follow the original intention to change the function to nullify _all_ > the repeaters, not just the one in the first timestamp. > > What I am leaning to is to change `org-cancel-repeater' to work on all > the _active_ timestamps inside the heading and introduce an optional > prefix argument to only change first timestamp with non-zero repeater. > WDYT? > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at