From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eEcWIETEWWHJwwAAgWs5BA (envelope-from ) for ; Sun, 03 Oct 2021 16:55:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SGetG0TEWWEYOgAAB5/wlQ (envelope-from ) for ; Sun, 03 Oct 2021 14:55:00 +0000 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 062DAFA14 for ; Sun, 3 Oct 2021 16:55:00 +0200 (CEST) Received: from localhost ([::1]:32916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX2tH-00071U-3O for larch@yhetil.org; Sun, 03 Oct 2021 10:54:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX2rS-0005cf-AJ for emacs-orgmode@gnu.org; Sun, 03 Oct 2021 10:53:06 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:37771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX2rQ-0004Zn-Oz for emacs-orgmode@gnu.org; Sun, 03 Oct 2021 10:53:06 -0400 Received: by mail-pj1-x102d.google.com with SMTP id me5-20020a17090b17c500b0019af76b7bb4so2650295pjb.2 for ; Sun, 03 Oct 2021 07:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=6uT/nFAPQznkFq46h6VvWRiZzoYYPnmBIhIs0MaxliA=; b=hGWVjpMIHJkCJ8VQvPbLo5PfbwoL2wn2VE230TZTdi8r7vwKSfVJ6OWhv6X1Jqlwlz DQSlupG6+A0+Eg3T+ZNHqv95jXBVWX1G41mtnCYXRWqs+JNM/WmQoAk9NwN2ILdootO1 ZtUkMOaJ/FtvN67ewObeyn6T3rOVtJ8g43tAo6ceNlVKHPVZkzBnWJxCkGedQlusbEQa jw7XPeGBVIrWEwIOYg+c32mYVE09WoAZJcnJsAqu/hKn+PPsfEhUan6KALqsC01m+nen 345oTWWCuiJYvnHmbq9axHgb7542vQ1mMLFNBzAEXItqX4TC60wN/OmMpi59CsbPVV+8 FobA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=6uT/nFAPQznkFq46h6VvWRiZzoYYPnmBIhIs0MaxliA=; b=68lx/I4eSNF0UdsRUQ/qlMebgAXWSG7Fii8sqQTNVGNl3Xqqc32Ngj6Ly05Xzi/dPS mu4lAFUpBY7BcmC8C34+Pj2SqZSgm9nNwA7w8xlfomN9WCjbq+1i9u3/RfSNMe6E3VAO Ja2bwCkSdRSRdqM5TNn9hkZ6qF5CJpmcON5XNkR5aCkhP5iVi+c+zb9PiHLv2KVaytZY XkG/9EAbkkqbLeftfVnz4fLWQu/ic3IAeyI7ZSlPb0W54VFvkUzJRrgCIJQlJwBG8Zi0 S8+BnDe1IhgYrQtta4BazXLas0Nh7iU6eJtrKIR4mVQlXpHzUoAUcZiUc4GeuLBWerr7 vpPQ== X-Gm-Message-State: AOAM530TagJqIRMTYBPLTL0ZH9os4wH7/S1i16NAnOGMBDBf3z8/0ZbF 9xdLKKNsvSF0os9q2ThQ4CPxHgT9dpH/ofgk X-Google-Smtp-Source: ABdhPJxiyeQlwpo/EBD2W7Re+d1khBjilgS0YQZNMq8ZGoiGpu6wv6Bx5ReZNmb0orBPXTKA628ycg== X-Received: by 2002:a17:90a:1984:: with SMTP id 4mr25399051pji.241.1633272783178; Sun, 03 Oct 2021 07:53:03 -0700 (PDT) Received: from localhost (211-22-147-226.hinet-ip.hinet.net. [211.22.147.226]) by smtp.gmail.com with ESMTPSA id k12sm11668702pfp.25.2021.10.03.07.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 07:53:02 -0700 (PDT) From: Ihor Radchenko To: Trevoke Subject: Re: Manually/programmatically adding a state transition message In-Reply-To: References: <87ee93yeac.fsf@localhost> Date: Sun, 03 Oct 2021 22:54:20 +0800 Message-ID: <87lf3acg6b.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org-Mode mailing list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633272900; 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=6uT/nFAPQznkFq46h6VvWRiZzoYYPnmBIhIs0MaxliA=; b=D7mEBIKoGinO2n9SUjjwfRFkLqMe1DHvKQnjQaUWAcvgZi2oKhW3xTioAAkrZ8rbMmqd7O celhE9BKHDZ/bRKh+pYYip7AJiM7GRrCWqrX5dCiJk0mJFnIoz5JZ3JV4AO1QMaG1wiJsb +DqlZGf4fO80CXaL/q2VbDJQ3ynJgEe9A8kdu/WlRwj5xEM/jAsP7Z+vMx2OQYerLwx/F3 f7sE8kHALRWzwSjI6dkXQHUcAUSvhYyeRi8vsxYjRCgY+u71Dib65jcSOdWOdppSB1Ntnf 7S+TqHbHjpb5oBK9srSq/Zvq7Tg1PNZEgyAW8EYonUTMeIt6UpGKT1FyFiMTBw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633272900; a=rsa-sha256; cv=none; b=C4nv+/5sxet6sAY8X4PV0XV0eff1T5bYyg0ner/8DkMXq6Dey0KFkXUv3K8PGBkDcRABpp VF07PoLTp8CGutYQXxT6Teaiwmu3ly8LEpzJ3MIiIrbXCwU12d58flReeym/E9XX8EVzu1 fQJv9J8r7oXmwujF8IF4v92Ew6lCxOfvf/04o+J4tnxM8DdxGeIL52OzWSAEwV1CdjFW1d Sa4EwILn0Oxgxn5Fh8soLYfQTkJdqR0LZO04sOdBB9RXAoDGThLX0vuRGNBPCaUGgiScaf qvmssfP5oUC+gCX3PPBduF0kxq3pvuo6lZ/t1gp1E3jMKmd+K5R0Pi+XKOhxew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hGWVjpMI; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=hGWVjpMI; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 062DAFA14 X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: 295z+j/2bNaF Trevoke writes: > If I understand correctly, this will prevent the addition of a note; I have > already found a way to do this. Please let me know if I am mistaken. > What I am looking for is a way to programmatically, without user input, > change the state and add an automatic note. No. Setting this variable programatically is an equivalent of "0" prefix arg. Just try it yourself (replacing CANCELLED with whatever todo keyword that normally triggers interactive note for you): (let ((org-inhibit-logging 'note)) (org-todo "CANCELLED")) > If I understand correctly, org-mode implements the addition of the note > through the function `org-add-log-note` and `org-store-log-note`, and I was > really hoping I wouldn't have to sift through these two functions to figure > out and possibly reimplement all the logic of how it finds the place where > to add the note so I can insert the string there myself. Yes. Unfortunately, this note system is not very configurable. Though your specific case is (somewhat awkwardly) covered. In org-add-log-note, there is the following line: (if (memq org-log-note-how '(time state)) The org-log-note-how is set in org-add-log-setup according to its args. org-todo calls org-add-log-setup depending on the value of org-inhibit-logging. Thus, my suggestion. And yes, it is cumbersome. We should re-implement the note system some day in future. Best, Ihor