From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qB59L/Iro2RGFwEASxT56A (envelope-from ) for ; Mon, 03 Jul 2023 22:13:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0OagL/Iro2ScpwAA9RJhRA (envelope-from ) for ; Mon, 03 Jul 2023 22:13:38 +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 2C11E28976 for ; Mon, 3 Jul 2023 22:13:38 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lipklim.org header.s=key1 header.b=eMKi73dX; dmarc=pass (policy=quarantine) header.from=lipklim.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688415218; 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=MdCAhyZ4uvnNvoPj6+4JkJAT7YB/znlKYIBzzjcmYLo=; b=gBV0BcnFlYqJtazVeZEVrnlYj1z12B9a8J2z/rC4T8oGtBICAFrWStmnEZgZmK62qbQ2hY mi31eTcVgEjAqmELmDXIpuUGWRNP7VqjvH3ImU9W4FKAbRNt0pFxckOQRnJRKDL9h2jPqv MyA8UeDlq6R+DVl1EW7qehV8qyMt3PdTDk+62xx+7LAdGUW5yoxq/nZeurLjAl2qwvyVak 9gC4X4qTMpi5CidGrqKiP+z4QzINbrfJlfjAzOO9Uz6LWuQYwnFigzzb9xIqJuiw9I7TPq K++u2fl3Gg1Jv6PgtRz5Ut+c2K/CWsavC6kAhbGtbfFBEznDw7trAJlf+I0Jvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lipklim.org header.s=key1 header.b=eMKi73dX; dmarc=pass (policy=quarantine) header.from=lipklim.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688415218; a=rsa-sha256; cv=none; b=reWtVC5nt3wB7rklHo155jT7Npf+kqHr0GDKKXxcskC0mUy1WgJsg1Qe2jO0l0nHVtqaVc 7Y/YGYtqlGHJcVks6wVKnhstLOJtvyWInbpiw1Ocg9OiGm0O5GR8y1F+DYO/VgupgXo/jB 2jxEAIBUVc6vEj/PXpADxvbD/38JsPTF3jJ7omsmCZoxbNrtm/Xa+qpdJA0aV0RsoD221j 7pUCSsOnxnvDieIWRHDa3/jPuaEEzx5hGTIvs188ZXdT6z0lW6EYpe/5nxIEKy8ocBveeE 6xIV10e48Hb5z+WHHhwVr/cOkj6aFKKl2V9iuiWu0Wsh42GsBFAFKdOtJ+in9g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGPur-0006qs-PQ; Mon, 03 Jul 2023 16:12:57 -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 1qGPuq-0006qg-Hc for emacs-orgmode@gnu.org; Mon, 03 Jul 2023 16:12:56 -0400 Received: from out-56.mta0.migadu.com ([2001:41d0:1004:224b::38]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGPun-0005SB-Ni for emacs-orgmode@gnu.org; Mon, 03 Jul 2023 16:12:56 -0400 References: <873527q5iw.fsf@localhost> <20230701131902.1679-1-eugene.dev@lipklim.org> <87ilb1go5p.fsf@localhost> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lipklim.org; s=key1; t=1688415170; h=from:from: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; bh=MdCAhyZ4uvnNvoPj6+4JkJAT7YB/znlKYIBzzjcmYLo=; b=eMKi73dXlBLxzd4vD92ttOBl2Cj1dkY/mlt0BmC8ramdkRywuIJiUuMI2HYAr5OTXCVFLO QiuCpbZxJgIVoMHrX+ZF3sFmJELGNb0/pUPQaYgqEaLbeFBa24z3OtnzBLuNztp/C6ad8l J/FFlbq9ZfF4n/wSQyn+/nwqU4/pgWM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Evgenii Klimov To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v2] lisp/org.el: Add final hooks to S-/M-/S-M-cursor commands Date: Mon, 03 Jul 2023 20:40:50 +0100 In-reply-to: <87ilb1go5p.fsf@localhost> Message-ID: <877crgwy82.fsf@lipklim.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:41d0:1004:224b::38; envelope-from=eugene.dev@lipklim.org; helo=out-56.mta0.migadu.com 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, 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.26 X-Spam-Score: -8.26 X-Migadu-Queue-Id: 2C11E28976 X-TUID: p/064/6ztBpY Ihor Radchenko writes: [...] >> +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. Maybe I got it wrong, but I tried to follow the docstring for `org-metaleft'. And I don't see here the use of the return value either: #+begin_example (defun org-metaleft (&optional _arg) "... This function runs the hook `org-metaleft-hook' as a first step, and returns at first non-nil value." ...) #+end_example Should I keep it like this? This function runs the hook `org-shiftmetaleft-hook' as a first step, and `org-shiftmetaleft-final-hook' as the penultimate step.