From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AAdsFAP8tmQfggAASxT56A (envelope-from ) for ; Tue, 18 Jul 2023 22:54:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KA1iEwP8tmS3CwEAG6o9tA (envelope-from ) for ; Tue, 18 Jul 2023 22:54:27 +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 B39A14D476 for ; Tue, 18 Jul 2023 22:54:26 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=Qz0J30z3; 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=quarantine) header.from=vodafonemail.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689713667; 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=ot2kXESXiEFKKy1FKK2DxHHVB8xCeN2Sm+dt995OCPQ=; b=JO5QcSmcGLq+u8RV7dwuJ37E1GMgLWhE3ancEhbVaRGBGqFwbOo1cz13iaTqrZadDRrPTb NxjQM5OcTX13FgNxXPXQXzbMkON2Cqy0/PGlz964rmiIdLMFwe/a4vHpPUsCUJsGEuyBi2 D+67P5UgDbK0EjIChSQPjhdH81u2Qf6bJkat+YOYjviKX6WN7jPwAi3C1CxraAPwSxj1VH VhdZnGCR5UdbUaE+0fpaMWQ7tuURbJEdS6Y//GjcgtQa3O85fX3cSDo04ecjsWisROZKzH B7td7rbjBu2hGrRXWAVTWW9CglL76B+XGZGiHxKcpTt9eZroMWZltHxqtObe+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=Qz0J30z3; 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=quarantine) header.from=vodafonemail.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689713667; a=rsa-sha256; cv=none; b=DvUalJimRlQSWEeVQfyfJAuUoU1QDQ/4bUzJbUEokX5HffaBMm7iX5v/G6CRU2a/YI0Y+n Y7mJjJ0lksD+iUVLjKpPAP04ioIwne/k1RwHiUrkW0NLfIm69eE8SAu72ECdjYi5sFerf+ u89UKdPmd3JEpE7U+W5EFcyCRsv+VBSwx5W6jyt2ozaO4oO4vvAZJvhYbbHviEtgJ8VARo +6/wDgZCWbDm8N8uuLUKyO8UeuL/cH/K7/ZBBIoxadM7jtbKHIBDqWolMtcwqv+agzCmG4 Dlv690FPunnJhr7oNwZKKjBKPYJhtYhlyiqLwd63hmkXI583h7ryRRGNII7YOw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLrhL-0007rI-Ow; Tue, 18 Jul 2023 16:53:31 -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 1qLrhJ-0007r2-J5 for emacs-orgmode@gnu.org; Tue, 18 Jul 2023 16:53:29 -0400 Received: from mr3.vodafonemail.de ([145.253.228.163]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLrhG-00024J-Hl for emacs-orgmode@gnu.org; Tue, 18 Jul 2023 16:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1689713593; bh=ot2kXESXiEFKKy1FKK2DxHHVB8xCeN2Sm+dt995OCPQ=; h=Message-ID:Date:User-Agent:From:Subject:To:References: Content-Language:In-Reply-To:Content-Type:From; b=Qz0J30z3/Ks0mE26i7M4PGQCmuOusyyMhGrFBBwxw4ef94eGSNZkkZMayq+s34JzN n4wIiv0pFNbyy9t5StPlloFXvOJ+QpHTSnEbMPC5fV/40iMy7Eyi/PIEphr+M1oWXE xea91eqIwnJ/j6SRYyoKBFvt0C6cuu/lU6PDyvxA= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr3.vodafonemail.de (Postfix) with ESMTPS id 4R5B490jC9z1ysS; Tue, 18 Jul 2023 20:53:12 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-95-245.dynamic.as20676.net [92.194.95.245]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4R5B414pFjz9s3t; Tue, 18 Jul 2023 20:53:02 +0000 (UTC) Message-ID: Date: Tue, 18 Jul 2023 22:53:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Jens Schmidt Subject: Re: [BUG] SPACE jumps to tag in header line after hidden emphasis marker [9.7-pre (release_9.6.7-562-g5b6268 @ /home/jschmidt/work/org-mode/lisp/)] To: Ihor Radchenko Cc: emacs-orgmode@gnu.org References: <8b691a7f-6b62-d573-e5a8-80fac3dc9bc6@vodafonemail.de> <87edl53ae3.fsf@localhost> Content-Language: de-DE-frami, en-US In-Reply-To: <87edl53ae3.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 2489 X-purgate-ID: 155817::1689713588-717BF86E-F009BF25/0/0 Received-SPF: pass client-ip=145.253.228.163; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr3.vodafonemail.de X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.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, NICE_REPLY_A=-0.095, RCVD_IN_DNSWL_LOW=-0.7, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -8.21 X-Migadu-Queue-Id: B39A14D476 X-Migadu-Spam-Score: -8.21 X-Migadu-Scanner: mx0.migadu.com X-TUID: yeRhYFzyc3Mt [Resent with correct identity to make this visible on the list as well - sorry for the hassle.] On 2023-07-18 10:13, Ihor Radchenko wrote: > Confirmed. Thanks for caring about this so quickly ... > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64696 ... and for the discussion with Eli & co. Which I did not try to follow TBH. > Fixed, on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3e3b873d3 Well, I have one not-so-minor nit here: With that commit you cannot insert text *before* some text having hidden emphasis without breaking the emphasis. More concretely (in an empty org-mode buffer): t ;; org-self-insert-command e ;; org-self-insert-command s ;; org-self-insert-command t ;; org-self-insert-command SPC ;; org-self-insert-command = ;; org-self-insert-command t ;; org-self-insert-command e ;; org-self-insert-command s ;; org-self-insert-command t ;; org-self-insert-command = ;; org-self-insert-command SPC ;; org-self-insert-command t ;; org-self-insert-command e ;; org-self-insert-command s ;; org-self-insert-command t ;; org-self-insert-command C- ;; left-word C- ;; left-word SPC ;; org-self-insert-command The last SPC breaks the emphasis around the middle "test", which it did not previously. Previously, the SPC would just move the whole emphasized word one space to the right. Which I somehow got used to, and probably many others as well. OTOH, to fix my bug, only the first of the new `org-rear-nonsticky-at' calls is actually needed. So probably we could have something like the following to get my bug fixed without any changes in behavior (diff on top of main, that is, in addition to your commit): diff --git a/lisp/org.el b/lisp/org.el index 0d8b5386c..71f482f64 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5153,8 +5153,7 @@ stacked delimiters is N. Escaping delimiters is not possible." ;; https://orgmode.org/list/8b691a7f-6b62-d573-e5a8-80fac3dc9bc6@vodafonemail.de (org-rear-nonsticky-at (match-beginning 5)) (add-text-properties (match-beginning 3) (match-end 3) - '(invisible t)) - (org-rear-nonsticky-at (match-end 3))) + '(invisible t))) (throw :exit t)))))))) (defun org-emphasize (&optional char)