From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SPCyBeVrnmP93AAAbAwnHQ (envelope-from ) for ; Sun, 18 Dec 2022 02:24:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2LuiBeVrnmMKKwAA9RJhRA (envelope-from ) for ; Sun, 18 Dec 2022 02:24:53 +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 73F343163D for ; Sun, 18 Dec 2022 02:24:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6iPA-0006NY-Ej; Sat, 17 Dec 2022 20:23:52 -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 1p6iP9-0006NP-3u for emacs-orgmode@gnu.org; Sat, 17 Dec 2022 20:23:51 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6iP7-0004s6-C5 for emacs-orgmode@gnu.org; Sat, 17 Dec 2022 20:23:50 -0500 Received: by mail-pl1-x630.google.com with SMTP id w23so5802289ply.12 for ; Sat, 17 Dec 2022 17:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:to:from:user-agent :references:from:to:cc:subject:date:message-id:reply-to; bh=91x03aLpY3cgh2dZX3VR5HrvULaoQ5P3dj4CCAAXfIE=; b=PSbOSbdpoKwJYxx6rCSlkHg9+87LAYhTNcdWKIsdcbBl5QIBJq5FIuYXeTcGMnAk7f h/+qnheT9Enrnt8gywwe1pdIcGhnVhbSq2VA4/vpnYMP4EG9JlPZj6apVS8X6tZcqTwC p7fZLJ5PMdh2L3rg+qCKu+kou96rl0jMX/CtDp9tiWjp8rNQleiX1pcNeqKYnd0+xfc/ PUG2pQLtbk9fP8q57SczZU3yMuKVsy7KZpIQBxxGFLlucsFilnn2zehLuBkJNTsqLmby DfEJrAsO/5VG6pD3Q3WRpCwyVMWqfvfQkdmDQVhDv2TPwlVMn86SB/HzI6r0Ys8aEUwT pRMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:to:from:user-agent :references:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=91x03aLpY3cgh2dZX3VR5HrvULaoQ5P3dj4CCAAXfIE=; b=jsjeiY0s2OqRt/qV/beXCswGyBg7DX9KQHevBnpxTocNqzL4wEjaB/0WuA66P2np4v NQPOG/0Xz9bcypn1uxLXOExDtGdcUxcBfGb1squyXSp3QxHnAg61S0TOenK5wfzHI5Xv Yw5N5zlcYj9coLFH207fCWX48K4Aj7D7Ct3OcVqJHrMV8LE8MQI1fpVzXaIYemmoTVg0 a1XCKHmFmTnfSkPnphFIfoBmHgkSruAWq81g7DdegkNts6d7stpAu2lWEB3jWeHsFzwx e1+723TZN5GDDbfJj2DoX2fIEjwAhquedP+/CEx0f0PcTS37nc7kNQB7VR7qnlj87C0W fS4g== X-Gm-Message-State: AFqh2koRvvhwPFdHiKiE6IHkVXrhNrfxZvf+fGLBwDuzyvsHkzPl/MTq qWkgEG2Yx/An22eOd6dkQwILexG22LA= X-Google-Smtp-Source: AMrXdXv1F4ykcUO5DcfonDdsZ6ClK27xnI0vtPbFS42Zxp1qlwTwUutIcYAER7Y4AJrNjz4tdAf/1A== X-Received: by 2002:a05:6a20:b717:b0:9d:efbf:813b with SMTP id fg23-20020a056a20b71700b0009defbf813bmr4351868pzb.4.1671326627471; Sat, 17 Dec 2022 17:23:47 -0800 (PST) Received: from dingbat (203-173-24-107.dyn.iinet.net.au. [203.173.24.107]) by smtp.gmail.com with ESMTPSA id x19-20020aa79413000000b005769eed61e3sm3727067pfo.83.2022.12.17.17.23.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Dec 2022 17:23:47 -0800 (PST) References: <1d09b04459dbf1a1648d65bd6c372ce7.support1@rcdrun.com> <87iliafj23.fsf@localhost> User-agent: mu4e 1.9.7; emacs 29.0.60 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Bug: Function org-heading-components is not resilient [9.4.3 (9.4.3-elpa @ /home/data1/protected/.emacs.d/elpa/org-20201216/)] Date: Sun, 18 Dec 2022 12:05:28 +1100 In-reply-to: Message-ID: <86zgbltsgv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x630.google.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, FREEMAIL_FROM=0.001, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PSbOSbdp; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671326692; a=rsa-sha256; cv=none; b=mbDUmMwJabTiMrCUFM2Inxynf1fYZSdPSNRDFUNrq9GrirnxDXQBsMWTY5fK1W8zT/o1SK VDcUYMcktDIUs9waN0nUsyq/1VBvRth4cgvr3VvFtHZCCyTXgO/W8VcJE+dM4vit0OmiYj dHosEdSeIrLXiuSD0sECW+JEcQaY/gc0v94dpmoJX1pD+5ZiQFA+hLOT6B1J+VmvNrEEYO kLXpQyeRUjSnthmgIscZRByESEJ5NyghBmfB5fS++adXQ15UFKkWiIGWyQ1DhTEzznIlNK 12ApYKITNJp02LZrwBiv78zNseKSyuy93DqRA3aFlyuWud8BDq5/nUPdqo4fxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671326692; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=91x03aLpY3cgh2dZX3VR5HrvULaoQ5P3dj4CCAAXfIE=; b=rR7KCYWKs0qL0NE5AAkfn8KcWEeC2OPijBL+/yfAWTeD0XLEsrtmnDOtv9DUtgvPpw0lb0 PedlBrtS4hnQiATSHSYCl3dUskaNrJXoZ40O3gpQUZqumdlfWfIYTnTs3SoywQJa89A4lZ B+o4xxL207N/W6Xb8NFi005B8WQaMwbuZ0RGAhDPKV+rrmKTCUVUk8GefsZXedTHjOXZPE avigGJYHNGWtLENd8Bc1aFs3c1TW8A2y0xzrC+ZdzvIy+U06xU1GyZ9HD8TarONtKi1N5e AJnnFf7xMgsf87pikTxGi6IbfnhLW069nZdjYE/dK07zjGj2HvGopWizuODFjg== X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PSbOSbdp; 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=gmail.com X-Migadu-Spam-Score: -4.48 X-Spam-Score: -4.48 X-Migadu-Queue-Id: 73F343163D X-TUID: 6L5lORvr9GHU Jean Louis writes: > * Ihor Radchenko [2022-12-17 12:59]: >> The error looks like you attempted to run `org-heading-components' in >> non-Org buffer. `org-heading-components' behaviour in non-Org buffers is >> undefined. > > OK I can change it for my personal use, however, consider that > function `org-heading-components' is useful to parse headings of Org, > as Org markup too often comes in different other modes, for example, > when I write e-mails, in mail-mode on this mailing list we have too > often Org markup. > There are specialised modes available for this sort of thing. See https://orgmode.org/worg/org-tutorials/org-outside-org.html for some ideas. > Also consider that many Org function work outside of the Org mode, I > find it not consistent by design. for example, create > > * Heading > > and run > > M-x org-id-get-create I think this is an unrealistic expectation. We have sufficient challenges ensuring org functions work within org buffers without adding the additional burden of expectation they would work outside these buffers where there is no guarantee of syntax or formatting constraints. If you find some org functions work outside of org buffers, that is just happenstance. There is no inconsistency here. Many other modes have functions which will also work to varying degrees outside the specific mode for which it was written. That does not mean you should use them outside the mode they were designed for. If you do use them, it is at your own risk. An expectation that a function will work outside the mode it was designed for is a user error of expectation not a mode error. This error in understanding is likely due to the lack of real name space support in Emacs. If we had real name spaces, org functions would not be visible outside of org modes. Unfortunately, Emacs doesn't have such a concept, so it is down to users respecting the conventions. One of those conventions is not to use mode specific functions outside the mode they were designed for.