From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SBkSN2bbVmG4GQEAgWs5BA (envelope-from ) for ; Fri, 01 Oct 2021 11:56:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id +DicMmbbVmGzBwAAbx9fmQ (envelope-from ) for ; Fri, 01 Oct 2021 09:56:54 +0000 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 7F020356A3 for ; Fri, 1 Oct 2021 11:56:54 +0200 (CEST) Received: from localhost ([::1]:57566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWFHh-0001jw-LL for larch@yhetil.org; Fri, 01 Oct 2021 05:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWFGA-0001iW-LL for emacs-orgmode@gnu.org; Fri, 01 Oct 2021 05:55:18 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:37864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWFG8-0008Nt-Vg for emacs-orgmode@gnu.org; Fri, 01 Oct 2021 05:55:18 -0400 Received: by mail-pj1-x1031.google.com with SMTP id me5-20020a17090b17c500b0019af76b7bb4so8866552pjb.2 for ; Fri, 01 Oct 2021 02:55:16 -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=38hBHq8+1mgA1vehemr+VHdw/ZQNYRKX4R86HrMO78I=; b=JSTAWsGBS/5zYb2WNYR/zh4GXDpBJAAIY6FlSwyVUbEyeiCLquA6B2Oy/Ioobnau6a jCOGjLGkTwaOnbqpdMAQV2rrEKw6hxhWMpqlkojkaK6pEXTn4PpDVIVYIALZyoIi5Kzo 1Vc2ewjo9XMyNhcSi33wqulB1mmb9hR9p49TG5EkGirgaNjvXBXdZEYsE2P/FWVVwIZ/ QJADkz2Ff1j62mesHTOispa4jaFpschCSNuDFndIveCNCNtRM8lEyooy9IoKZaH9Kp67 wnbUNRZbDdMAxV8FqlB4MJIqHRUDxIrN97lYDhso8bbV2B/Q4fBkYJIsquIfYcgX5eq7 KCmA== 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=38hBHq8+1mgA1vehemr+VHdw/ZQNYRKX4R86HrMO78I=; b=KowuE8PxM6Z49/VLL3SLm2M2TlUNG6TGC4l6vO6m0wX5AHXQiEHvPp5+ql6whEF9aj 9VB5D3V1uuifFKu7/RxrMYLGJImlbblIJ4MwAS4Is6TX++fKEIKmx7zY7PWGpSWW6kBl Mjr2GRc7EZjhK7qar4S+jvWX49zWBZ6ZNUQZ0kjojZZvQHKEMOGThR8eVrZUETVgnmgn 6X7f33qtSS5G8bQpaO2PY0ZPIBM37IVQr96+dognvqeocN9dg5s16dZFQ/bzFnYfEqKZ 3UHb/KMKOY4n42B/MI2IhfAMCvW00MTX+jhyBEvVai7y9AAAguM12rNf07hDnmYz5giK hisg== X-Gm-Message-State: AOAM5306Uwz0cxgpOfHAmuyOnWmyX0k3h8n158YjxnGq3TjedZHGwHWW AzKDSNSVIBCfoxFPRN0Ji4w= X-Google-Smtp-Source: ABdhPJx8tGW7QYawsPcDI4kd5nLE5lw9YB9rJ+1jpVHpH4p2RE0HjTXsT7MmuPlg7t+TAfnsTrnLmA== X-Received: by 2002:a17:90b:34c:: with SMTP id fh12mr14103576pjb.7.1633082115477; Fri, 01 Oct 2021 02:55:15 -0700 (PDT) Received: from localhost ([210.3.160.230]) by smtp.gmail.com with ESMTPSA id t1sm5200817pgf.78.2021.10.01.02.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 02:55:14 -0700 (PDT) From: Ihor Radchenko To: "Dr. Arne Babenhauserheide" Subject: Re: Bug: font-lock error with - in code-mode [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)] In-Reply-To: <87fsujp7mc.fsf@web.de> References: <87fsujp7mc.fsf@web.de> X-Woof-Patch: t Date: Fri, 01 Oct 2021 17:56:32 +0800 Message-ID: <87lf3d3w6n.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1031.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633082214; 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=38hBHq8+1mgA1vehemr+VHdw/ZQNYRKX4R86HrMO78I=; b=NmMYpfS48sj084jMNGF/vUxwYM/cyqHa7DBYDWNH+9T0Fp0GloqEcUNPuEvIKMoWMODxi8 h393Kl/yOsNwAGa5BJcDnkCuz6eanytgFtBFDX7ZIwtGcqjBvbo6M+W79NXg/05M/f71c3 jSUhwcaN3BACUw+Bp6YwU4OzX8t6blqUaJiExebYfQSxBDGzfqyGUxaQ+/tPvOI9Fg0LOb pjT/dSUK3x5sbl4kWkqJooi7qDYXLgcbTqCoUYMYJhhCsJsZlxYoxyZ4Kk1HHCTshVutxd 9Y1jHvMWWjUwhkJhibZsbA3ZH436CiAKN4cQoHybmqbVnGT3w12VYCmnf0WU1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633082214; a=rsa-sha256; cv=none; b=Ve65loa3XD0CJ0umbBQE3GQ/GU4zN3+r7ZPgaQyWEhL2oIT1c8ApzEazMENcKPvV2b05KJ y83jkfl0bzV33wqhJ7oCA18A6Krv0TaYjuZvpL6SIZyUozPSSkpiscGCNjjWlUQy6wG9a6 DBjPg2ZMHa8kdemhkoIFXG6OTA6Lnwd9q8HFFmKth5jkPPmbIJhvJs4jik5/IMQ/SBS713 2JE67YeLeQ0UTNq4BPBRQVTpSuVXqsYgzclLMJsxRYyr8Buh0v1Z15huMETQz7VHcg+PqD nBzW5RXapFCCc3ODBkk6YQwpHPZ1cznGD+Ap5sjtJ17HXNdSDGwKspl62AKRUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JSTAWsGB; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=JSTAWsGB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7F020356A3 X-Spam-Score: -2.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: JyTQnJ/EFJkx --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Dr. Arne Babenhauserheide" writes: > When parsing the following code: > > Am richtigen Ort zur richtigen Zeit (=3D+=3D; 1x pro Abenteuer im richtig= en > Moment auftauchen), Computeraffinit=C3=A4t (=3D+=3D oder =3D++=3D; Bonus = von 3 oder 6), > Kurze Aufmerksamskeitsspanne (~-~), Photographisches Ged=C3=A4chtnis (=3D= +=3D), > Primitive Technologie (~-~), Schreckhaft (~-~), Schrecklich Schusselig (~= -~), > Toller Laptop (=3D+=3D) oder Vertr=C3=A4umt (~-~). > > The fourth line is highlighted as code beginning at the first ~-~ until > the final closing paren (")") of the paragraph. Confirmed The fix is attached. Best, Ihor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-org-do-emphasis-faces-Never-treat-closing-marker-as-.patch >From a4c864b7f983a135e8debbc32d8ef4ff3f2e89f4 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Fri, 1 Oct 2021 17:47:02 +0800 Subject: [PATCH] org-do-emphasis-faces: Never treat closing marker as next opening marker * lisp/org.el (org-do-emphasis-faces): Make sure that we never match ending marker of an emphasis as a beginning marker of another emphasis. For example, in "(~-~) test (~+~)" "~) test (~" is a valid code match unless we move point to the end the first code emphasis completely during parsing. Fixes https://orgmode.org/list/87fsujp7mc.fsf@web.de --- lisp/org.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/org.el b/lisp/org.el index 9608b52ee..9f68182d9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4855,6 +4855,7 @@ (defun org-do-emphasis-faces (limit) '(invisible t)) (add-text-properties (match-beginning 3) (match-end 3) '(invisible t))) + (goto-char (match-end 0)) (throw :exit t))))))))) (defun org-emphasize (&optional char) -- 2.32.0 --=-=-=--