From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gJfWB3iYJmVjtQAAG6o9tA:P1 (envelope-from ) for ; Wed, 11 Oct 2023 14:43:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gJfWB3iYJmVjtQAAG6o9tA (envelope-from ) for ; Wed, 11 Oct 2023 14:43:36 +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 E11353CEB2 for ; Wed, 11 Oct 2023 14:43:35 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=eWfINjSc; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697028215; 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=jg2LGNQJfPb+I8if5xR9VB1dWB5eNwbhSwVQwvMiovA=; b=UiV200OipuOagBMrolqdQ1gNwTEK4Fjh4aPMp5gOz1w1h1+1b/HEZ4DsmOt7mUGB6uAE+V n5za2PiAWjOuyHs5Lqm3WxCO1+xqMg9JYeJXznj+Tw9gwY5hn/dJ+FLBEJ7cybHZe9ISJU NKaPPwe++IBUp39/PI9dhZaQXD2tXSjrTgDo4uLQEqAHyzEGUsSdt3q8ln7btzq/QCwIe6 aAYHdlXG5+3UBBnvlUQRLWJNKlqoz7R8M8rQFecdyJvprDq2hLa7vZDuBxG+PpCpbrD3GZ JzmZppvAFg/0VLSUjBRciLrYbmSqwKZqop6XNObZ38m51VtVvVboeSTYr2XfHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=eWfINjSc; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697028215; a=rsa-sha256; cv=none; b=LS1lb928zu/whYfzlGfk+GHgiYI0pToz4a97UF3W3FoZtdApsAkq6xm27sAilGzhPGQZeI 2piuSVgMMA/PbCMflbTIM4qiBv425m7Q5kNwUtrmfkfKbxi1EqYCKhcBBdWx+/9bKZI0tj wpMos+AhZ6OAGe8t819pDG64MFdAOuN4xliZZoonahKmfad5Ts80FZyhsFZjKsdFcyWkcn +uOQYhhSyoPITeMAIO56T4yMoA0gCykS39geOxKpi8GWJOA+1XkkDGCJaBqciN3wXb/5V7 S2mDZ0/CnDSMvGoNiaoo6xfw+Vqd/XSH7vQM6LfBhXCT5ofZm80kR3iLmzNZjA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqY8r-0005J2-AJ; Wed, 11 Oct 2023 08:16:45 -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 1qqY8p-0005Ij-4D for emacs-orgmode@gnu.org; Wed, 11 Oct 2023 08:16:43 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqY8n-0005QM-Dc for emacs-orgmode@gnu.org; Wed, 11 Oct 2023 08:16:42 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50435ad51bbso8305582e87.2 for ; Wed, 11 Oct 2023 05:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697026599; x=1697631399; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=jg2LGNQJfPb+I8if5xR9VB1dWB5eNwbhSwVQwvMiovA=; b=eWfINjSci/xXh0NIZqIBsisTW/67zhv8j08HtRjH6qp5MetiyaQB4zo0bHhZs/iuJR QWKq1EskJUpXoEON494XiW+kKi6HD4/ik2yznlvj+acvk4xYVCkMcXzFMkxprdLZ46qf 7hPtoA3qS+WwzqOLo+EJZnHsfXysqVVEpakY8srr5nZ7SaaVy7pv7xHLeMShMnDKwSq5 Up5FaZRGsyUoIG/v5TC8j3n+g6WRgnP+tnuC4qTBFX9h4Dih5umG6w0k36g2wB3eH9qo hZgU9bsv2t1QtP1aMjWNHyIQ56bGSHIe0WQFH7l34WM7T816X1HO/+ABSkdULmJNc+g/ SIhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697026599; x=1697631399; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jg2LGNQJfPb+I8if5xR9VB1dWB5eNwbhSwVQwvMiovA=; b=rubOS0A+rFEQY/xXF8nKhTXr2tT7napHM3vZ+5rthMT1tnTgt2aZdCie1QFLFf4If3 9w7nxkFtZBO5PUDG/NFOvuOgVzrYGc6eqQiwkmei/eOsXdLxEC/GAZziOMTd0XiXBaC+ IbAfvyBlestB79UZhUb3K03TkrIdUmQDx445p7Io8q3JpO8n4Pd1UkcI9TjApWU6u7HK T0T59F1wSgOsvu3ebZs9oAtyDB285hsKmmDhgRYA5kQA3JRs+5kRXtC+R3efvPBeOMLQ LCbchU7By1+sxypg+ZHsjDVPmOmCWP0Y+ircGFY7EKTwWeXaBMVYh+MxAZZHGH0JM7fK ySUg== X-Gm-Message-State: AOJu0YwrPxTyxwPbnBW+9E7vv1ts/m4CGYrtVnPyAXOG+8Ybh/ifgbMY LvNSyjoQbUHIpmmrgddtxlA= X-Google-Smtp-Source: AGHT+IHrF52cyGmvbwdXOpn3MYo5Uj/eHMkLgqu1IpyeK9uC2+Jsgfb9UYFwBjzpYUU9MfvnZIjc8Q== X-Received: by 2002:a05:6512:68a:b0:505:73e7:b478 with SMTP id t10-20020a056512068a00b0050573e7b478mr22112203lfe.16.1697026598789; Wed, 11 Oct 2023 05:16:38 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id o11-20020ac2494b000000b005057860da73sm2253038lfi.203.2023.10.11.05.16.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Oct 2023 05:16:38 -0700 (PDT) Message-ID: Date: Wed, 11 Oct 2023 19:16:37 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Inconsistent text markup handling when double-nesting markers Content-Language: en-US, ru-RU To: Ihor Radchenko Cc: Tom Alexander , emacs-orgmode@gnu.org References: <8734yiadey.fsf@localhost> <2909a6ed-3a34-4aa1-a7bc-586169248029@gmail.com> <87wmvt7c5k.fsf@localhost> From: Max Nikulin Mail-Followup-To: Ihor Radchenko , Tom Alexander , emacs-orgmode@gnu.org In-Reply-To: <87wmvt7c5k.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=manikulin@gmail.com; helo=mail-lf1-x133.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 X-Migadu-Spam-Score: 6.13 X-Spam-Score: 6.13 X-Migadu-Queue-Id: E11353CEB2 X-Migadu-Scanner: mx2.migadu.com X-TUID: g0CFJfpk9YRi On 11/10/2023 16:15, Ihor Radchenko wrote: > Max Nikulin writes: > >> Isn't nested bold for "**bold**" a bug? Generally it is not allowed and >> >> *b1 *b2* b3* >> >> is parsed as bold only for "b1 *b2". > > No, **bold** it is not a bug. The parser is recursive with inner markup > not "seeing" its parent. So, we first parse the outer bold and then > continue parsing the contents separately, as *bold*. I just find the following rather confusing: (org-export-string-as "**bold**" 'html t) "

\nbold

\n" (org-export-string-as "**inner* outer*" 'html t) "

\n*inner outer*

\n" (org-export-string-as "*outer *inner**" 'html t) "

\nouter inner

\n" (org-export-string-as "*begin *inner* end*" 'html t) "

\nbegin *inner end*

\n" > Be it another way, /*bold italic*/ would also not be allowed as > we demand bol, whitespace, -, (, {, ', or " before the markup: > https://orgmode.org/worg/org-syntax.html#Emphasis_Markers Certainly /*b*/ should work, but nested bold was a surprise for me. I believed that nesting is strictly prohibited. The case of underscores is even more tricky due to ambiguity of underline and subscript. P.S. Juan Manuel at certain moment discovered that pandoc allows nesting for *b1 *b2* b3*.