From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cFXKKcWvi2ARywAAgWs5BA (envelope-from ) for ; Fri, 30 Apr 2021 09:20:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WNt5JcWvi2DwKwAAB5/wlQ (envelope-from ) for ; Fri, 30 Apr 2021 07:20:37 +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 2979914BFF for ; Fri, 30 Apr 2021 09:20:36 +0200 (CEST) Received: from localhost ([::1]:52228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcNRy-0000CU-SY for larch@yhetil.org; Fri, 30 Apr 2021 03:20:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcNRO-0000BZ-Eb for emacs-orgmode@gnu.org; Fri, 30 Apr 2021 03:19:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58347) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcNRN-0004EQ-BO; Fri, 30 Apr 2021 03:19:57 -0400 Received: from [2a01:e34:ec2b:7150:140b:2dc1:d41f:4033] (port=46426 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1lcNRE-0000Yi-I0; Fri, 30 Apr 2021 03:19:56 -0400 Received: by guerry (Postfix, from userid 1000) id B9A301A60EE2; Fri, 30 Apr 2021 09:19:41 +0200 (CEST) From: Bastien To: Timothy Subject: Re: [PATCH] fix point position shifting in some org-src instances In-Reply-To: <87r1iuhf69.fsf@gmail.com> (Timothy's message of "Wed, 28 Apr 2021 18:33:18 +0800") Organization: GNU References: <87r1iuhf69.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Fri, 30 Apr 2021 09:19:41 +0200 Message-ID: <8735v8ck8i.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: org-mode-email 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=1619767236; 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; bh=JKguhxstMXeiLOC/z8CRPYfpaoxOP2ot/chrGUUlevk=; b=KeCOtSydGjslLjA9AJCyqnFyIr4p960Pn8JsfFxYoFkpQ8cEXUUoq3Mo5WHWWrkrLozLbm 0WMBH0xh9AtdMkAp6s0I9dUAGQO52FCgYFAmwh+caSG+Jod4Mcbfsa3P0S4lFuGkzww1Xv vOVA62YEV2GGNhX521m66cLU2JlqYy6NEC1z1+XxaKhw274AA6wSOqX3kOYkwhSLoj7UKO K1YjgpWZvK/JCIgdRBm4fZqT3pXMJyKV9qkhG9X1wSF4LKv9KcoHfl7hZcKIGzUtYD4jxt QwyhvDmNX66OeBe1YJ3188/1HfRvkQWvpxh73SvnYGya3Wjbit30BJNz8BtVCw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619767236; a=rsa-sha256; cv=none; b=P13Ylqw1ryvB0vvTjOIUo4MXhMBcBNt0ilrSiV6arwF19s5ykyO2FizOCLkn2o0K8/J/KB zd1ZnnfHKtxa+0/whlRsPHxGVR9ltWIpHEluTAglNMeKAH7rkU/iWEJSCzQcnx8m7TQeag 1fOZIUriof4wxvYVv5htbn9qa2CzlWPO0oS+eRXJiJ+apw8dzMJ2+7zYSlm9mREOy25Toj jSgAXGPUzsHMSfwNh5eAausYZDuhLK9mGYJpjmx+5pDMFNSqfiZOJNYUlupgT+4kELMey/ ZEHLjw8QlrTpg0Pbq/XuqVE7qc+NPn9s6NjUamJqlrx2Wxe9R9KRpvtE243LEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -1.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 2979914BFF X-Spam-Score: -1.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6orXgIMqc/m9 Hi Timothy, thanks for reporting this. Timothy writes: > I've noticed for a while that if you have a block with > overlays/invisible characters that editing it with `org-edit-special' > moves the point around. > > For example, with Org pretty entities enabled, and =E2=96=88 indicating t= he > cursor, if I call org-edit-special on a LaTeX fragment like: > \( \alpha +=E2=96=88\beta \) > which is displayed as \( =CE=B1 +=E2=96=88=CE=B2 \) > The point is moved on creation of the org-src buffer > \( \alpha + \beta =E2=96=88\) > Then if I move it back to after the "+", on calling `org-edit-src-exit' > the point is moved to > \(=E2=96=88 \alpha + \beta \) > In the original buffer. > > This may seem quite minor, but if you're editing a lot of LaTeX > fragments having the point constantly jumping around can be quite a > pain. > > After investigating this, I tried shifting org-src--{goto-}coordinates > to a point-based approach from a column-based approach, and it seems to > have fixed the problem. Can someone else please test this patch and report any possible problem? I guess tests come a bit short for such fixes. Thanks, --=20 Bastien