From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UEPjOLeSiWVdEwEAkFu2QA (envelope-from ) for ; Mon, 25 Dec 2023 15:33:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 4C+zMreSiWWzaQEAqHPOHw (envelope-from ) for ; Mon, 25 Dec 2023 15:33:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fmHoYpKn; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703514807; 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=Dn0/40TAyDjY8/2eSkyD2oMXybwJPPlZc3gDwRk/9BQ=; b=c6OtVp3C4bVmxf8M0Gpyuhb1KyKFTzCuhUhg3Y7E7hgEv7KKw7uTQF06aNVvm2goInLlM9 pANDpiqNG8dRWpXjOrDSeiOn3VcNxQ2Qb5K0MNEWsnl4ql1/6muyhf/ERC35iJBP1feoX3 Bguv74tGw6h+11bKk2qVhamB1K4lG4v+ACGMn3mO+79BRPueOQbp4RfSNcN2rRfxB2EFcw Q8auih33R781z7yTuArROGEsoVemllXHvGIhGkql1jHQ7bXmdpIch6E6wczb9lhh410vXx 1mw2NtwmZNZhTrZg8Syi88xQeFZDLgKkoPsAxrqhIcjgWmXFJ9kayba7nQ1S+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fmHoYpKn; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703514807; a=rsa-sha256; cv=none; b=YHyFKVpFPcI7q6/UGXc4JdkoNORk/SDUlX6CJu+acndyR8STy9yrF8NPYYIBRxBM858npF 4eiVCIf5NtcJ03uhBxccFJVCmh/KDpZ8CpIKTFUGfmk6nL8nCORg6KbObMPr0PLI8oGvhY kFEu+CrAD/Q8pz2L+EuC1DpJ3fK5GA/8ONDeJkgG/aVkiI90maBpFDcyxoUfIBp+oQT3P9 s0SpI+/4wkkeP19cW/HzWkHy/GunIIssbbHaguVvk1mCwDGk6T1jzCwep4E7CGAwlQC8YP WVl8OTQUI3oiHLaYJi9tbqRBDJdrGiGpO0yLUsfPvkZJzKYQFCg3+izgO6RnNg== 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 952E634A8F for ; Mon, 25 Dec 2023 15:33:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHm0K-0001Pr-7a; Mon, 25 Dec 2023 09:32:28 -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 1rHm0H-0001Pe-M0 for emacs-orgmode@gnu.org; Mon, 25 Dec 2023 09:32:25 -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 1rHm0F-0006Qf-Av for emacs-orgmode@gnu.org; Mon, 25 Dec 2023 09:32:25 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 535BD24002A for ; Mon, 25 Dec 2023 15:32:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1703514740; bh=8RKqNnknlt+ADF/C84tJCIJ27NKOeJKrvtFo5D1yHG4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=fmHoYpKnSdPFRWjvLSSHaGzmPzOs9+0SZhFjaO22ewZwxpF9QELbtdrutDs/F2qQp 4lflenLPtNHPBdcfdvpnuRwLwByEc7sxoK5jVsulHor8U7ojOoJOiH3XoHjH7K4QwK kP0UPGojF4HPpXqoICi8/wiXXxhRvdPjrmO2y0nGaSOTEwPfNseTGcFS46060wxiZQ WliA0TI/znwZEFHFgiSUY39vSQoj/jB6+2TJtXPp+X2ALUkZwmY0m1bDjT7+d76dZs UZ/9MxX6QZ1EzK63vIEXkXoIyBhMatwiLaFFe0Bdiu5NntEJGqzJAro4aWA0xPzcUw GBUGLceG3CE9Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SzL2q5ZVcz9rxB; Mon, 25 Dec 2023 15:32:19 +0100 (CET) From: Ihor Radchenko To: equal.moon0346@fastmail.com Cc: emacs-orgmode@gnu.org Subject: Re: How can I use org-add-note with emacsclient? In-Reply-To: <7153af42-cfbe-45d6-bc77-7e6441484a08@app.fastmail.com> References: <7153af42-cfbe-45d6-bc77-7e6441484a08@app.fastmail.com> Date: Mon, 25 Dec 2023 14:35:32 +0000 Message-ID: <875y0mnydn.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: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.99 X-Spam-Score: -7.99 X-Migadu-Queue-Id: 952E634A8F X-Migadu-Scanner: mx10.migadu.com X-TUID: B8x7OD5nRD8/ equal.moon0346@fastmail.com writes: > I'm trying to figure out how to start a note (C-c C-z) on the currently clocked task from emacsclient. Here's what I have so far: > ... > emacsclient -s test -nw --eval '(progn (org-clock-goto) (org-add-note))' > > This seems to have no effect. Oddly, if I paste this into M-:, it works fine. I've tried a number of things with e.g. plain capture templates that run the above code :after-finalize, using call-interactively, etc. After a cursory reading through the info manual on interactivity I find I'm still a bit lost. Can anyone explain what I'm doing wrong and hopefully point me to the right manual page to read on this? `org-add-note' is implemented a bit awkwardly using post-command-hook, which makes it work only interactively. The hook does not trigger when you use --eval. That's why you are not seeing the note buffer after running the above shell command. What you can do is manually call the function used to raise the note buffer: emacsclient -nw --eval '(progn (org-clock-goto) (org-add-note) (org-add-log-note))' -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at