From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CJrDHBUdpmFWqgAAgWs5BA (envelope-from ) for ; Tue, 30 Nov 2021 13:46:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oG0HGBUdpmHVegAAbx9fmQ (envelope-from ) for ; Tue, 30 Nov 2021 12:46:13 +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 08EED22739 for ; Tue, 30 Nov 2021 13:46:13 +0100 (CET) Received: from localhost ([::1]:37788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ms2WR-0001Ad-8q for larch@yhetil.org; Tue, 30 Nov 2021 07:46:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrrSM-0003vc-NM for emacs-orgmode@gnu.org; Mon, 29 Nov 2021 19:57:14 -0500 Received: from mailgw401.it.ntnu.no ([129.241.56.182]:57798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrrSJ-0007H0-QK for emacs-orgmode@gnu.org; Mon, 29 Nov 2021 19:57:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntnu.no; i=@ntnu.no; q=dns/txt; s=s1-1909-ntnu; t=1638233828; h=from : to : subject : date : message-id : mime-version : content-type : from; bh=7jfS+PMBg7bzMPZAbQOvzO0j/BLW2WX2VXYrmMc9bOI=; b=e6t0jWF9c4A0Kxz1CQPbUVc9yiADP4VidEA8C3NEpA8udn0udfPY/ZgpSm4GXgyAttgPD cUMEo0V80HZDdZ2lcdHaG1AnDCIbNhueh58q8EoPbA/0qau/YFO6NgG92Q2/InLXyB3ADrA QufZPjT8FhPfAv0cTcl1/n+BS/He3Hwtg4BfAnaQW9mJ96ZBTL345sxqYPv+cMUCYz1S2N3 BIJCmWwJ6MN3s51W+HCulpX9otBdD1dcP7quWjwpCFHMYcB07qDviqPx1OEIgte4dPH2nm3 WbBTf8io1DCpXiuIacDPP/6e19ygJ4uZcHVxepWUTjoJjHawF/3B9m703W5Q== Received: from localhost (localhost [127.0.0.1]) by mailgw401.it.ntnu.no (Postfix) with ESMTP id D454C6425A0 for ; Tue, 30 Nov 2021 01:57:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mailgw401.it.ntnu.no Received: from mailgw401.it.ntnu.no ([127.0.0.1]) by localhost (mailgw401.it.ntnu.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P1brUfwXACsH for ; Tue, 30 Nov 2021 01:57:08 +0100 (CET) Received: from localhost (unknown [91.219.215.154]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: takringe@ntnu.no) by mailgw401.it.ntnu.no (Postfix) with ESMTPSA id 5C1F86418A1 for ; Tue, 30 Nov 2021 01:57:08 +0100 (CET) From: Tor Kringeland To: emacs-orgmode@gnu.org Subject: Question about using `org-add-note' programmatically Date: Tue, 30 Nov 2021 01:57:06 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=129.241.56.182; envelope-from=tor.a.s.kringeland@ntnu.no; helo=mailgw401.it.ntnu.no 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-Mailman-Approved-At: Tue, 30 Nov 2021 07:42:59 -0500 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=1638276373; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3LE/JeZ1rUOqEMeewJp8eyUxrY9nzuSt/ydIyIPyWZs=; b=GtzbdEw66WN253ftPlnXCHrE2V2r/37bNajE9o5u9IzOphlV5X69P2ZVjsdDcVQs5/h2pw GeFAceXBeLt/D3ufPmTVUlMui9q3gyhXoSOv2c0/IBmI3rgEnoRswBveQr2AcrWnp+ISVU /KZAZmL65DTxGm14DiWQHZYOn6wzCuAPufXLBsB0cmriLUEarw7et8m074vYeNm6uAU9L1 W/pyj+2DV1Ds426IPp8aJjLQ8//022loOjWGFuaRT28Bjc25YpNq+L8pUGclr2ClLPOnnc Pe9Wn4Wmo2G28nfOpVMqWc3OZIxJg3hCURHaiDs9RD2FnyyYC7rTzNtiLYevXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638276373; a=rsa-sha256; cv=none; b=hc2UCF1MN2eY6xYq4/H7MZ/HnyhXVC4c+OQTJSyN3rNKmiVVpv5wO2M7Eq0gVScDDK+ObK wX9FetCxPq5Ikxf06Yn0jYx0CzbIwaMq7/c5w5ZMCK7ta7NBygw4aJB9AcO8MzELZC1Bka G2fZslhqFh3vjMs0lW98/nGdqiiQZhL1u7wSveQvuikCXTVveyfK0l/3AR2YwMMqmvVubo gOP03JIfs3oWpcudcqeaSMojcg+YVuf25nL0HnZQaNUBa+PXnm14ToA+RPXfREG8gpqMH+ QWSrVj3RHpx0G364OvK17CaZMqZIaxQ0BrHDvqWVhdu/pDe9NYh2EMNZeL8XjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=ntnu.no header.s=s1-1909-ntnu header.b=e6t0jWF9; 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.31 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ntnu.no header.s=s1-1909-ntnu header.b=e6t0jWF9; 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: 08EED22739 X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: sofM6+PVNsSC I'm trying to write a function that adds a note to the current `org-mode' heading. Naively I write it as (defun my/add-note () (interactive) (org-add-note) (insert "some text") (org-ctrl-c-ctrl-c)) but this does not work. Calling the function (on a recent build of Emacs 29) inserts the string "some text" into the current buffer and then opens up the note from `org-add-note'. (IIRC this used to work earlier this year (in September) but I don't know why (nor is it relevant).) Currently my solution has been to define the function as a keyboard macro (using `fset'), which works perfectly, but I do hanker for a cleaner solution. Maybe what I want isn't the intended behavior of these `org' functions, but does someone know how I can achieve what I want in a cleaner way, than using keyboard macros?