From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 MJwHHWK+aGOyRQAAbAwnHQ (envelope-from ) for ; Mon, 07 Nov 2022 09:14:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EEEkHGK+aGOpOAEAG6o9tA (envelope-from ) for ; Mon, 07 Nov 2022 09:14:26 +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 295FEBAC4 for ; Mon, 7 Nov 2022 09:14:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orxFm-0008L5-6d; Mon, 07 Nov 2022 03:13:10 -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 1orxFj-0008Kp-Oi for emacs-orgmode@gnu.org; Mon, 07 Nov 2022 03:13:08 -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 1orxFh-0004OS-JR for emacs-orgmode@gnu.org; Mon, 07 Nov 2022 03:13:07 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5F317240028 for ; Mon, 7 Nov 2022 09:13:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667808782; bh=opdYr92zH8UonDieDbTvAJD3Z2Pzr6Crqp2abMZwzKQ=; h=From:To:Cc:Subject:Date:From; b=G95zu3EUaCcANSEslwY2vjp4fEMVHyauubdbURlRJOFYVgEqjnuc3ASWMKfBrs+GH f4ldL+tY8BnMzcCOp0eJvip3+zW+2TJBBtCZa/YqXMtVZoKOkuTMFQz0ngRas+nrAQ 4bcVJnwVawRPXwkuwV+ylqYsxKLFXZaTZ6tc6PfmRcadCUgX7t3hNrzc2FACK+H7fI GgHTNnXFfLNGpMimOapFXfT2pgxdtzip3nQa+nqiUjr2i1Vt6KFAiWJpJCdFHQ9VCR gXAnPTVduxKEaDl7HoB1SzQIGp3XLAf0MwAUDf91vUFD7LvggIVAaUQzSAFNuyNxJq TBr90cVIWq0Zg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N5P9n2LGVz9rxM; Mon, 7 Nov 2022 09:13:01 +0100 (CET) From: Ihor Radchenko To: thecashewtrader Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Document custom org agenda functions In-Reply-To: <20220405120728.12871-1-thecashewtrader@protonmail.com> References: <20220405120728.12871-1-thecashewtrader@protonmail.com> Date: Mon, 07 Nov 2022 08:13:36 +0000 Message-ID: <87mt93xjv3.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, 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.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=1667808866; 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=NG8fYg92ARmCBGb9GGxa6c4F4yX710rM2EYytUUbaLY=; b=fdSi7clWHl1C7I5kpuR9KlIFm75Fr0Bk1C6z++xHxB8Jl4mkklNsxxP/b6rouRzIXz31kT VjNSToOjL6XkDENLkPmfRoLr4SQKhyUgxz3g5utw1ZzPxubUhTb3+l2DqF1/oKxzUYJP3x cI6Bvzh0Dmge6x8C98UEpy3G4eo9Exayz7vmXE1dEcn6Ic/jm2TXRFLsQlYGcJ2DytQBE4 V5STRo1e7AboDuUFhtdFILmCWc6T59kPv8wvI6aoNwuIXasnwUV+AOeekk/knEv0LN8SfY mvjR/H8LxdgwDHoHTrCYswl+8S582ktNv8nWnOmNcVStTCD8h6PkrOFiEtCVPA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667808866; a=rsa-sha256; cv=none; b=W+vdELVkPycHIK6e0yeiEPkDzKkMOWyzyhl4xhjs3TtfrPnciFyJUW8K8KxTZgDYM+DK9V kR+tFMg5VREIRPZeGJb4oktQaVrtpiD4W118z+jSHhQsmZu6yE+aS+8NRJguWm65h2/nPs SaYnOo+4eGL16s0r4EWeIAC/ScAS9wzgtctTHlKNk1HraHDcILguplxSpiNgsjZBL3nnQm ykjcU+34w4xLDG7jBip8ke0a0FmnhVxUlkefhobzPEP30+oxqHn+K2oTWveprti+BNZ/es RD/zMJx6v5BijCrq9OU7tNlyiraEd2uV38wC37EX2Nn3PWN1SvVKhPZPTiXtOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=G95zu3EU; 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: -5.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=G95zu3EU; 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: 295FEBAC4 X-Spam-Score: -5.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: Kz9CeV9O1Jbq thecashewtrader writes: > +* User Defined Functions > +** Function Signature > +User defined functions should: > + > +- Optionally accept one parameter i.e. the =match= variable. The Org agenda dispatch function will call the user-defined function with one parameter representing the =match= component from the agenda definition. In other words, ~(udf/test "Hello")~ in =org-agenda-custom-commands= will result in a function call of ~udf/test~ with an argument of ="Hello"=. > + > +- Prepare a buffer to write the agenda information to using ~org-agenda-prepare~. > + > +- Handle setting a unique buffer name for the cases where =org-agenda-sticky= has a value of =t=. > + > +- Honor the setting of =org-agenda-overriding-header= and insert that text into the agenda buffer. This can be done using the macro ~org-agenda--insert-overriding-header~. > + > +- Insert into the buffer the desired contents, accounting for also setting text properties. > + > +- Call ~org-agenda-finalize~ and ~(setq buffer-read-only t)~ Thanks for the patch, and sorry for the late reply. I am not sure if this explanation is useful. Yes, it kind of works and also inserts text into agenda. However, the inserted text will not allow the usual agenda interaction. One would also need to set various text properties pointing to an Org heading in order to make the inserted lines interactive. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at