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 ms0.migadu.com with LMTPS id gNy7FOfVGWLmfwEAgWs5BA (envelope-from ) for ; Sat, 26 Feb 2022 08:25:27 +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 aCNJDefVGWI1aQAAG6o9tA (envelope-from ) for ; Sat, 26 Feb 2022 08:25:27 +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 DDD4A2150C for ; Sat, 26 Feb 2022 08:25:26 +0100 (CET) Received: from localhost ([::1]:39204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNrSH-0006EP-Ck for larch@yhetil.org; Sat, 26 Feb 2022 02:25:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNrRO-0006E3-Bg for emacs-orgmode@gnu.org; Sat, 26 Feb 2022 02:24:30 -0500 Received: from [2607:f8b0:4864:20::430] (port=42956 helo=mail-pf1-x430.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNrRL-00007J-Kj for emacs-orgmode@gnu.org; Sat, 26 Feb 2022 02:24:28 -0500 Received: by mail-pf1-x430.google.com with SMTP id a5so5783026pfv.9 for ; Fri, 25 Feb 2022 23:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=LqdnVUL7Re1SLoUcFj0R4xbloXb/tglaT+ZCt3Na2Q0=; b=K2l/fpUhm49KZvTuhYl60jqMTC3CklgoqKPKX2ILngLDWKNXiRnFWnfKDfGJkG8z7o 16vj/LxLwo2J36cCgvhxHWf+mIpyWIqME2Uxe1q+QD8/OqVnUZ3xV6S01yme3pW0l3h/ TvZ0q+CFZ1i9c0stnCv90JZEfeQc/Aj2MMD69QN2qjXFvLgRCa22Vjg4dov+5Yc7vn3D MuxSmSpn/ax6WHJLGQsXHkygKDJvfp34C2DexxJTwM6sDqHU2TJ3qr5JvEeRKISyTr+G 0eo5wNblDL2fueUaljMNWzIiG7Dyi96ZeEyHMkmj5FfO4AI25wvP2FR8re9/XAdXXCD6 ojOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=LqdnVUL7Re1SLoUcFj0R4xbloXb/tglaT+ZCt3Na2Q0=; b=PnaDuYktuFnHaC7t38fbdvVpFzCl92km+UTlWVRIeVWy3OYTFbE4fD3xwAHV8ZXQh3 dTUTbE0FuxVV9h2GUL6M3GenQW+jnv8YJqLcJS7SmH5kDJvsnGxi+dKw3liPA8nUmiqU vuXbzvoV+c3fFOC1SpsqrPfQ+VkNCWHCfC+zY3Tzywx+7hN3wrGVlCMYkiXUeGcXwrKE 1mKHCE5NwrYwmp1PJP3jIxOb5z/2hBCHR59AumDs0pIorsNb2H1raUXRfhLeaFwLcKSG c+guTpS/UmEx3tjy5dwrX/nEDXb/G3o46a2GH/9rJqgW6W3kWOBMIbmL2M/gmBVbQCd2 gPtw== X-Gm-Message-State: AOAM530V71r4LytNmP/ocbpELRS3g6lMhHoqQsirHUwD5xz1tWiWJ2CE 7sKoF4xzY7LxI+a+l39aYLllDcm1R94= X-Google-Smtp-Source: ABdhPJzBVWWVbWUFzYVo6LtxiMkRU2LviPX8xE9C9oDYTjsTf1iHwIDzTIZUaz0BRyDbDozUDxfWZw== X-Received: by 2002:a63:802:0:b0:374:2e45:c6fa with SMTP id 2-20020a630802000000b003742e45c6famr9353417pgi.246.1645860265010; Fri, 25 Feb 2022 23:24:25 -0800 (PST) Received: from localhost ([45.128.72.3]) by smtp.gmail.com with ESMTPSA id ep5-20020a17090ae64500b001bc56af507dsm11155113pjb.47.2022.02.25.23.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 23:24:24 -0800 (PST) From: Ihor Radchenko To: Alejandro =?utf-8?Q?P=C3=A9rez?= Carballo Subject: Re: [BUG] Prompted to submit (unsure what happened) [9.5.2 (9.5.2-g072523 @ /Users/apc/.emacs.d/straight/build/org/)] In-Reply-To: References: <4CD31E9A-7E0C-4638-B15A-EED9097C6B79@gmail.com> <875yp6p3xm.fsf@localhost> <87o82wo02a.fsf@localhost> Date: Sat, 26 Feb 2022 15:23:55 +0800 Message-ID: <87o82u2ir8.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::430 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=yantar92@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: emacs-orgmode@gnu.org 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=1645860326; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=LqdnVUL7Re1SLoUcFj0R4xbloXb/tglaT+ZCt3Na2Q0=; b=OrDPsK2M/9atI0nEBXTDwjqJwhqd0KtK2Rnjo7xiZMhvjxi9M490GzPuy+6rVodAhBKM/8 RpfGe8Xv3dKCZ4wJS+WbIHNwV42lYfxvAfZtWcYBXFN4wr8JhHOIedrBrSKHYRaJWkFlOt ccKh/8rLAdBx9J8Gc7+NDb3Bii4MvKqqxMLXLMbz+/w4ELrFa79duf+8SMi16YN58DZ8fa LlYSjm/ED90JQShbqKG0wmjl+iTesO8HgeNKSek4k3UltHGZhKb4nOEc4rwKX1RG4hBwhn KCVw6UB+OZE5QOZq6fQN1Y7H/q1dcosKq6G/8LDMTa+UzOCyEDhO7RenCZsodg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645860326; a=rsa-sha256; cv=none; b=LDb0iMwPjuoczqDYvfM1f0dJXcX4zmcqfMoN/EOkPndO8rXEJONEBhTM/xUPGWH8YcgS2R 9Csqiy4CvVWZeK8iwz8Mw42/tqCqUHKbHQlGqMDSEqM0bXvIVOZE67qweyL+o9abPANUXI rUKSWBJhNwFz1p3SA7/QclDCL7nepaLu9EXC9Nr/qmEM73UM68KJk48C2k6aNg2HceR8v/ qTvbCSL1ikao3L90TiPwNwlBBLidFqUC/TEzddRQfzo0DvlC42fitNiqnTtKsK9LtsQcJr zkZ03SAhRJDtk3e2VvJDL5RxATbikKNCgtNZf5hGJFXrvxnt3Il6DFTwYyjDSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="K2l/fpUh"; dmarc=pass (policy=none) header.from=gmail.com; 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.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="K2l/fpUh"; dmarc=pass (policy=none) header.from=gmail.com; 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: DDD4A2150C X-Spam-Score: -5.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: po0a6X1skgS7 Alejandro P=C3=A9rez Carballo writes: > One more question: wouldn't replacing `org-in-src-block-p' with a functio= n that calls `org-in-src-block-p' only when in org-mode and returns `nil' e= lsewhere suffice to make something that's like `org-in-src-block-p' but tha= t will work outside org-mode? E.g.:=20 > > (defun my/org-in-src-block-p (&optional arg) > (if (derived-mode-p 'org-mode) > (org-in-src-block-p) > nil)) >From the docstring of electric-quote-inhibit-functions, a function returning nil will have no effect. So, you should be safe to use your function. A slightly more concise version would be using when instead of if. Also, unused function arguments are defined as "_" by convention. Adding a docstring to all your function is a good habit to cultivate. (defun my/org-in-src-block-p (&optional _) "Call `org-in-src-block-p' when in `org-mode' and return nil otherwise." (when (derived-mode-p 'org-mode) (org-in-src-block-p))) Best, Ihor