From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ILMyIuLComQuNgEASxT56A (envelope-from ) for ; Mon, 03 Jul 2023 14:45:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ENNBIeLComR3NgAAG6o9tA (envelope-from ) for ; Mon, 03 Jul 2023 14:45:22 +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 627B03E06 for ; Mon, 3 Jul 2023 14:45:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGIv5-00052e-Ky; Mon, 03 Jul 2023 08:44:43 -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 1qGIv4-000526-37 for emacs-orgmode@gnu.org; Mon, 03 Jul 2023 08:44:42 -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 1qGIv1-0006z4-1c for emacs-orgmode@gnu.org; Mon, 03 Jul 2023 08:44:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0A5FD240027 for ; Mon, 3 Jul 2023 14:44:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688388277; bh=cBkeqgyTpOlcryQhNiuuUajunXshWv9evYLWx1VwfXE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=FXnHOKoh/tMgOPKdEzCmAMJaE74YsOBjxAlwxR59DeKWx/7jt+eGldP8ZR7MqB9n0 tuYR+1rFHXRIxsijyKF9MP4cn4WfkaK+AUMshLSuEif/S5CnmWEnDLcRPtq+Kd6cLq +O2TcrK63SqEvA34eEjmrnMaWc4DFn485MfkAyPY4EH4OJlE9rIpowXzj+mYPZO4BR OlUxaDLPuUcIKXhf3GB0GaTUsmuOw6/y0OQIpjcn+TVRaEUtws/oFPXoHfana2q0Hm n7/0AzwqgfsfJnNYKHD6VMpFIYng7Tyo1+n2I1fa/eTbql30g5nLN+0pWUwXz4JVgH ubfLKv20fAxMg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QvlxJ2J4Sz9rxP; Mon, 3 Jul 2023 14:44:36 +0200 (CEST) From: Ihor Radchenko To: Evgenii Klimov Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v2] lisp/org.el: Add final hooks to S-/M-/S-M-cursor commands In-Reply-To: <20230701131902.1679-1-eugene.dev@lipklim.org> References: <873527q5iw.fsf@localhost> <20230701131902.1679-1-eugene.dev@lipklim.org> Date: Mon, 03 Jul 2023 12:44:34 +0000 Message-ID: <87ilb1go5p.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 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: 627B03E06 X-TUID: BZl3yN9KExZT Evgenii Klimov writes: > ... Thanks for the update. Few comments. First, please add Changelog entry for etc/ORG-NEWS. > +(defvar org-metaleft-final-hook nil > + "Hook for functions attaching themselves to `M-left'. > +See `org-ctrl-c-ctrl-c-hook' for more information.") Note that unlike the docstring your added, `org-shiftup-final-hook' specifies when the hook is executed: (defvar org-shiftup-final-hook nil "Hook for functions attaching themselves to `S-up'. This one runs after all other options except shift-select have been excluded. See `org-ctrl-c-ctrl-c-hook' for more information.") It is better to follow the pattern and clarify the purpose of the hook better instead of leaving docstrings for both the -final and other hook same. > +individual commands for more information. > + > +This function runs the hook `org-shiftmetaleft-hook' as a first > +step, `org-shiftmetaleft-final-hook' as the penultimate step, and > +returns at first non-nil value." Upon looking closer, I realized that you also defined return value of the function here. Is there any particular reason for this? The return value is currently not defined and supposed to be discarded. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at