From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 kONzE1CUt2QlkQAASxT56A (envelope-from ) for ; Wed, 19 Jul 2023 09:44:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cEaVE1CUt2QTQQAA9RJhRA (envelope-from ) for ; Wed, 19 Jul 2023 09:44:16 +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 197924B67D for ; Wed, 19 Jul 2023 09:44:16 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b="U/3tmZ8A"; 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=1689752656; 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=e8w9JWcJj1JXYIgbF/a1FjFBUwZfA1Gw01Zzov55oSM=; b=PO1m1T+Fwk74YnhadjBxz3TCs7yTwFQVOzgrL08meq3isc+aS2us4fOTysc2SB3qrIY7cl Roz2G0pKUV+pNMS6OgOkkLeGfsi2In+RSIxXphSeAHwOFQldQ9Uz9G49gRAOVz21gPfTfJ XgUVStKOWcghnVx+f12rbwGy+BTrEXOMXjWE2u3i1Bti5SABMslaJ101esg/8Vsf/DdkYU TXUib81kcitkwsV89Y5GEw3SpdZgRMZVDWb3khMuOsX9CJPtUancTKiCdrgFrk7YEV4rl2 hS5uvOzdYhShj6bPjOJawSOqFgd5zzOglqemPETgxBKu9HeJCLifiBoSfuI0Vg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689752656; a=rsa-sha256; cv=none; b=NW+gITj9toIcrC78z7bm9QRbvgq6RAs3visGOUlcNHuTSI/8abDbf0FFh9dWG3fR5D8G5J FlDYaPdMiSms1Mt2WLVuv76zqFjpYawz8vYvoDSJoBPCvaDB1nmgav4tQxXimcGjq6IOs4 OeqI+KqNz15CBx+oNZslmU8QystKSkFfPAJGW116YISCy9i0wogUZJGE5GDLzesEhgmW3h YZP2bZI8HQt6OhxRfLwVOTY8wsw5n9C0Wsx/g5w7YAtuFHfnIL1GkGErjqBPsLHDPkAq70 HNUWp+sTzXSst1s8+RqCDebMNb/XwgTLpEuwVpgZMvUUic/Q5Y7sHiyJH6R1JA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b="U/3tmZ8A"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM1qB-0006LT-Td; Wed, 19 Jul 2023 03:43:19 -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 1qLqny-0000Dv-Co for emacs-orgmode@gnu.org; Tue, 18 Jul 2023 15:56:18 -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 1qLqnw-0007FD-3n for emacs-orgmode@gnu.org; Tue, 18 Jul 2023 15:56:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1689710162; bh=e8w9JWcJj1JXYIgbF/a1FjFBUwZfA1Gw01Zzov55oSM=; h=Message-ID:Date:User-Agent:Subject:To:References:Content-Language: From:In-Reply-To:Content-Type:From; b=U/3tmZ8AJckdQanSCUgEpfrXKFC/1x7wx0M24t5WZ09ZMlBSEUG2MX+rxXHsT2EiG yAergag1Dtg4DrEN6Nddrc3dC+fpOGzm1SsuYNhbNV70x4m7G/l2202SmsqwcSBEgO TsQi90z5gU2d+RHfq2Pk4K8bHAGnccgBUskgeEY0= 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 4R58pB4G98z1ymc; Tue, 18 Jul 2023 19:56:02 +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 4R58p30yfWzHpxl; Tue, 18 Jul 2023 19:55:52 +0000 (UTC) Message-ID: <4f92a0f3-6547-61cf-2f8e-e79dffa30188@vodafonemail.de> Date: Tue, 18 Jul 2023 21:55:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 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 From: Farblos 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: 2388 X-purgate-ID: 155817::1689710158-6B7C83B9-D31F34F2/0/0 Received-SPF: pass client-ip=145.253.228.163; envelope-from=akfkqu.9df7rp@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-Mailman-Approved-At: Wed, 19 Jul 2023 03:43:18 -0400 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-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -9.70 X-Spam-Score: -9.70 X-Migadu-Queue-Id: 197924B67D X-TUID: fr2LCe95F/k7 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)