From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qPVvGt4NWmMN5gAAbAwnHQ (envelope-from ) for ; Thu, 27 Oct 2022 06:49:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iFY+Gt4NWmPHSgEAauVa8A (envelope-from ) for ; Thu, 27 Oct 2022 06:49:34 +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 0CA1221446 for ; Thu, 27 Oct 2022 06:49:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onul3-0007Qj-MR; Thu, 27 Oct 2022 00:44:46 -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 1onuky-0007K0-OT for emacs-orgmode@gnu.org; Thu, 27 Oct 2022 00:44:41 -0400 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 1onuko-0001Ce-Ts for emacs-orgmode@gnu.org; Thu, 27 Oct 2022 00:44:40 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F29C4240026 for ; Thu, 27 Oct 2022 06:44:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666845864; bh=yh0osMDo0q8aTVJ7VjmfLEt8f2l8GF3L7Pe+mmX3NpU=; h=From:To:Cc:Subject:Date:From; b=ZSNlQYjN89p1jyk0ENzytTX3xIHpMfShoUcJxk6bUOch+A+SXfEnsyygLS9UaGqFR IZ75wXp6X5hhzEYEDgHTMglnOqzJnCV1KUIwUE2h09D5/1Y9AmzNns5ZcEmzvqRYfu jdnRut+5IKV6CYwIXTLL8/XOHThLWsQvbL31FwyP+iT5gAfUXYOZWMTXJErhXZW0Yk Vesv4bV17jC/t8SuPTlhdvkRMLu7HIHH3904/SpXCqMVHxafhNdlxKS5S0G1tKnE6L /+hZT8C5kGYrzhROYfU12hk/Qm2Z4pRTQdIfESkhBna1T8PmGJBxIFgr8spsvvwa9M x0LRHu/ejNPkA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MyY453qq6z6tmR; Thu, 27 Oct 2022 06:44:20 +0200 (CEST) From: Ihor Radchenko To: 875yg6elmh.fsf@flintfam.org Cc: Org-Mode Subject: Re: [PATCH v2 1/2] lisp/org-clock.el: Make switching states on clock-in/-out easier In-Reply-To: <87eduud4ap.fsf@flintfam.org> References: <87eduud4ap.fsf@flintfam.org> Date: Thu, 27 Oct 2022 04:45:03 +0000 Message-ID: <87lep1ooxc.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: , Sender: "Emacs-orgmode" Errors-To: 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=1666846174; 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=wRFY4KdbYTIGBwhnh8CqVFiQl5pT1qiA8OOVmPog3fU=; b=qifHxzaB/lNgRHpf18Y9TnpUclowNvHKTS67XJ/SA9XiLWWtgd/se59/JFLCABxhCxJ2jM LV36veLrV9h8rGXuzKqlvYMoKJEvX8/uhxj4ea8RdpkKIRdZb7BZFbXZ8cAySNAQbRrLN6 vB+sxe3r7oBfG2kK3izcgZ+qR0g7y8fepobZQWbBQsAeS3AY9fMi9z+d71waY9Rj5k5zPI p//hCFM4FVvgRPQHW7XgM0J9fi2VIqLcroRlDVb3SzSZHwrDrlnGhsdnS9BzcfS7i00Cr6 DB8EbzV+RWn2vtx3c/uaQCFncvUDfht+tsJRe6N7SNCjp/NnU6lM1O5fz1LbFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666846174; a=rsa-sha256; cv=none; b=XCjwXcpHype5w/KdLCvmCkSccR0t0dLmwmhLGfdjA+O9ai4pIvl5flmGoRaTitNZV1H00o BboFAIFTcaEu1FjCksRnua7QDmqZZ6w8h0AkcWJj+Pep5wQWdGq9uClj+WmZQkuBbHeNRS YlmLS5wI0LZdJTq/5E5HupTAzmFWjID6B60g6NHsDlV9Mw5pbbbwgAksmDTWXdhrHnUQ3N ExqVp3KFsl2fqRfTd2Sm+8YkfvdmoGUtK7bW3nORDul6roa0Wzjk5NqtqUjLgyVeiNfqAJ N9HMxj7hivXKsNEToDVcLks+thhkTWQp1VpZzI3uKvrQ4Xr54K+bmcXJH9c9/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ZSNlQYjN; 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: -1.92 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ZSNlQYjN; 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: 0CA1221446 X-Spam-Score: -1.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: Er0qR8vJiKLT "Samuel W. Flint" writes: > * lisp/org-clock.el (org-clock-in-switch-to-state, > org-clock-out-switch-to-state): Allow > `org-clock-{in,out}-switch-to-state` to be an alist of > current/next-state pairs. > > (org-clock-in, org-clock-out): Add logic to handle > `org-clock-{in,out}-switch-to-state` as alists. Thanks! Before we continue, could you please confirm if you have FSF copyright assignment? My records show that you have made two commits to Org mode previously, and they total LOC is 15, which is maximum allowed contribution that does not require copyright assignment. See https://orgmode.org/worg/org-contribute.html#copyright > "Set task to a special todo state while clocking it. > The value should be the state to which the entry should be > -switched. If the value is a function, it must take one > -parameter (the current TODO state of the item) and return the > -state to switch it to." > +switched. It may also be an alist of `(CURRENT . NEXT)' pairs. Maybe "`(CURRENT . NEXT)' TODO state pairs"? It will be slightly more clear. > (defcustom org-clock-out-switch-to-state nil > "Set task to a special todo state after clocking out. > The value should be the state to which the entry should be > -switched. If the value is a function, it must take one > -parameter (the current TODO state of the item) and return the > -state to switch it to." Same here. The rest looks good. If you can, please also add tests. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at