From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 KKNPEk/AaGOqhQEAbAwnHQ (envelope-from ) for ; Mon, 07 Nov 2022 09:22:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wNoREk/AaGMAHQEAauVa8A (envelope-from ) for ; Mon, 07 Nov 2022 09:22:39 +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 152A73D566 for ; Mon, 7 Nov 2022 09:22:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orxNf-0001n7-0S; Mon, 07 Nov 2022 03:21:19 -0500 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 1orxNI-0001lt-Kp for emacs-orgmode@gnu.org; Mon, 07 Nov 2022 03:20:56 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orxN6-0008SG-Tq for emacs-orgmode@gnu.org; Mon, 07 Nov 2022 03:20:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E3E9A240026 for ; Mon, 7 Nov 2022 09:20:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667809241; bh=xkOjJAbKZEcMMM7NGgOwOX0L5V0dVejbZ8MrTHJp9A8=; h=From:To:Cc:Subject:Date:From; b=q+RqdvYYMqbvcnO6XotYtmCrupDzA2ll8Id4WLyAYXbpv7UJU90QklDZ87NIyZtE6 /S2vp12wfN98tQL3ds7hQP6OMkxONaDb8uCwCeitPnH3tEK/P8y7IDLVT61R8YIj/E aPNzC729u252f3Z2e9n3nKqgcsuYs6+A4CLjA1EE22KKPOE+YUfl/8FBYdZer7dq0+ F5YBl/a7MMZJOeTRDMaI5Ld1sm3/CWl9elpvsXcAOV40ib6RS9LuBiEhuZ0K2P4a9E Epf8NRyiCT5iR2m8JS+mzKJgyViEYmqKy2Wgd4qGlRInIvHfZG+Gza6pQgqo4+NCSS Vp5pUbZSeP1DQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N5PLZ3yJnz6tnP; Mon, 7 Nov 2022 09:20:38 +0100 (CET) From: Ihor Radchenko To: Ankit Raj Pandey Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Prevent blocked tasks from being archived In-Reply-To: <86a6g5jwh6.fsf@smtp.gmail.com> References: <86a6g5jwh6.fsf@smtp.gmail.com> Date: Mon, 07 Nov 2022 08:21:18 +0000 Message-ID: <87k047xji9.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de 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, 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667809359; 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=Tg7znIEd2Q4hC3ch01+5HDBO+02HNt7vPtIXSH2Y/LY=; b=YGUxxg8klvfPhtP3grfvu5ZrS9yKtQ+RPMlfRH2YtbLcEnqF9aHj9/mfNHb2+waN9UJVC+ 1kMqjEIROZHvaYGChflRjHGa7H/eYjZWOojIVhNBJ/ITlnZ5i5lLpHuPszxg9RWwvQjqEY SuNKZSejbYy7IWmTK5VSrwsiJRLuRySbsyudVgyJXRDkFAAWAUnfGYzjAo3N5D4xUKrJLz wqgaCZt2r+sKZ2vsBZv5qHd6t5uKVH2eIAGCs+mBS+kFXjeRgvl1GzcPac74/AdVAy+Q02 R1Kj/CavTpznWuC+tiho9qj3OUH64x1KOsM5G/5OYp2tkM5NcNFIm3yqa07ngA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667809359; a=rsa-sha256; cv=none; b=FzxqXTCbvuGwk88KMXpUHwEdomC7UA1+HM3Vi9r1lc3YZaOCx3CvPVFT3hlXz1IP/z4V1G Mqp4tLsJKnQKVNjducx312nsgmQ5Q5/uZmb/n0hpgXNA7ZN6YBTix6uTgmWSXAJjLK2lQ2 wlvlMhXfA1+kXikeWcEw7nXM7lssKrgXJuzfRuqLqgXvCvteQkeAWRl4W/XrbIGFEh48lU sl5C/aCguHLL/EoQhSmaxV8L8GM+Olf0HdfpKUd6oyD3maF1Hn0fiXYj311dTwNO6NPYF1 nq82T2IE6w37c+FrTE5VEu793dtLj0GZ/XMVay9duzxRtCQGQvYZET0renrVDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=q+RqdvYY; dmarc=pass (policy=none) header.from=posteo.net; 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.50 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=q+RqdvYY; dmarc=pass (policy=none) header.from=posteo.net; 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: 152A73D566 X-Spam-Score: -3.50 X-Migadu-Scanner: scn1.migadu.com X-TUID: nPzFVcKtYimU Ankit Raj Pandey writes: > When org-archive-mark-done is enabled, org silently fails on setting the > TODO state of the archived headline to DONE if the task is blocked. > > This patch changes that behavior so the headline is prevented from being > archived in the first place. Instead, org displays a message about why > the task is blocked (this message comes from org-todo). Thanks for the patch, and sorry for the late reply. I see that you moved changing the todo state code before we switch to the archive buffer. It is not safe. If something goes wrong during archive process after changing the todo state, the todo will not be recovered even though archiving fails. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at