From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 sMydNQgtr2KclwAAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 16:04:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8BhYNQgtr2KyNAEAauVa8A (envelope-from ) for ; Sun, 19 Jun 2022 16:04:56 +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 998B2374F2 for ; Sun, 19 Jun 2022 16:04:56 +0200 (CEST) Received: from localhost ([::1]:55724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2vXr-0000Y0-R7 for larch@yhetil.org; Sun, 19 Jun 2022 10:04:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2vVg-0000Ur-C3 for emacs-orgmode@gnu.org; Sun, 19 Jun 2022 10:02:47 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:33576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2vVe-0004hc-Ps for emacs-orgmode@gnu.org; Sun, 19 Jun 2022 10:02:40 -0400 Received: by mail-pg1-x52a.google.com with SMTP id z14so8095128pgh.0 for ; Sun, 19 Jun 2022 07:02:38 -0700 (PDT) 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; bh=zN56BxJt97vuaYNcagQnEt0HloAuDDslLNG87K4uIuc=; b=VviINF/qcwRRd4GrlqFb4aZzsm9kmEIe0KZ68SrjEQjJuSzKvr8Pot71IYOOxg4GTG VNATEggcdHRR0hXkMMCVuHQbKHyxI2uZ5vpEELHVK3MGVfTROjJCCPNaAEw8QWLocGzs 3dHnQ/ZH31jH1kYo9+e7ro9WNEXb+mmLQMC3C8fS4RzyFrpFSUPUa6z+9jm1tDKmpkXg hzOM1RNwCge9PdjpHZSTucT3EJbOW71HEvCEVRXV7ls4KGnGa3va7cEPlNA4dZGxLfzQ z9ie63mBN8LVKw2mpLp7cKGY5wtF8ZyYaX5ht3DU1DU0fjueVB4pGbqH0OQaRKgUJFs9 CgVA== 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; bh=zN56BxJt97vuaYNcagQnEt0HloAuDDslLNG87K4uIuc=; b=M5pgMFp50JdfBqLCfxX4ZqjVqoxUgYNTwkLWnag1JGVJIl8MZhPMJtn8TBJxXNzuDV jBxrFhUFBOAieW1sAlQEwQKsVXscpCgKLgB3RcO6JTj/2BeAPCoNfy4rgY/lj1BHwjJV Sh5NqQW4kTSoND+xIZ9vBJtrpQHuAlFVb9gTAuDIPFaXpBvVIoWYFp1vgthZF4VB7r8r UQfGOxoHyR+xvf+LSvAgtFq1j0LxAYuwA9z/fOY/G8b5j+xCumAdhZ9COq+cRSVahNjh Vh2dwOPe6wW6FSwj3+c6V+VLImCiJ6CDD3sZQ+K6x5k/E5HzF4NLkxkmlCIRtMvTeuf8 OXYQ== X-Gm-Message-State: AJIora+LtK6RZKixUzmT7/wO5iEWLh5OEtqmThrZ+tQZem/QX863HwT+ UxmRWqx1N8U9XvV16Jos9Fs= X-Google-Smtp-Source: AGRyM1uwJaXENgSTPOQSjcH5FEj8ZKzGokEGCewU7hygIRH/vuRTEgG/2Tc8GEAD4M+/ITHrJCaPzA== X-Received: by 2002:a63:3713:0:b0:40c:b98c:5e4b with SMTP id e19-20020a633713000000b0040cb98c5e4bmr782645pga.8.1655647357468; Sun, 19 Jun 2022 07:02:37 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id d6-20020a170902654600b001674f2e1c3asm6834352pln.74.2022.06.19.07.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jun 2022 07:02:36 -0700 (PDT) From: Ihor Radchenko To: Edouard Debry Cc: Samuel Wales , "DEBRY.Edouard" , emacs-orgmode Subject: Re: Orgmode plain list bullet : change automatically with list depth In-Reply-To: <86sfo092qe.fsf@gmail.com> References: <87wndiv988.fsf@localhost> <87edznjyji.fsf@localhost> <86sfo092qe.fsf@gmail.com> Date: Sun, 19 Jun 2022 22:03:45 +0800 Message-ID: <87y1xsoim6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655647496; 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=zN56BxJt97vuaYNcagQnEt0HloAuDDslLNG87K4uIuc=; b=hKqbmlbxanNM+jbeg97CF46PV4UMdpUsX1YSt8wSKJ/DHSGvnckPARzniJHlsc4tRNA1fY g/LsmT3rQDG+QyMaYeRmc3rZwK/JWCemcmkHcXIJppd9rCqe+LgCd86X7rse89WdtPlca+ dV6PY/5Tj8kbaIMWoZwNw5WI+Bvlq7DSNxrDIudCaZKHxizOjSgYzq3RzSKO9AAFBZtsSP zj50ZZhwspW53tciUx55wMnl2YUF8pr8d2gq0keVrSNn3BV8jIMRlFzac7P2Era4G0GPS/ 3RhZ32GPGT63DAj52ZdQTgsv/5N+Amsi/RVo6QeRujIv0Y969I0+oWMDI5Kr9Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655647496; a=rsa-sha256; cv=none; b=JUMua6EGGNimYkx6Z2zdEPEPpgHKOx4DgWTav8n7Oy5EkV3dw6S+MxJe2l3GNTpYKsj5/1 bbRO3gyAqwAh3vhX+4QDRNhwmB0hccRz3OylI3phRSG8iuaTPnKB6SH7/pi2usLGpWCbzw ia9fowogCekGm4yTDlil5VhsPlCa2P3qwmHuA/7HGVOHXMnAjIbbG/W2iz75cnJ07o105w Krrt9SiexV8+fZx0vWxuL9waA/NKiO5BHUMEu3+I28ZmWuPOm/7G7IVg54P6PKbFo14npd gtr4Yz7SHO3zDkrI7j31DoXeIASgPaeMCvBcnMEQ9p6q395shUqTCFFOlwvHCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="VviINF/q"; 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.48 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="VviINF/q"; 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: 998B2374F2 X-Spam-Score: -5.48 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9HGX9VklL0BO Edouard Debry writes: > The key point is the regexp. I do not know if it is possible to capture > the depth level with a regexp. That is why I tried to use > org-list--depth in : > > ... > but it seems that "org-element-at-point" messes things. Sorry, I though that I gave you enough information to fix the issue. Just wrap (org-element-at-point) into save-match-data: (save-match-data (org-element-at-point)) That's it. P.S. I actually plan to fix `org-element-at-point' modifying match data (which is not documented), but it will probably be a part of a bigger font-lock-related patchset. Best, Ihor