[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix point position shifting in some org-src instances
From: |
Bastien |
Subject: |
Re: [PATCH] fix point position shifting in some org-src instances |
Date: |
Fri, 30 Apr 2021 09:19:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Timothy,
thanks for reporting this.
Timothy <tecosaur@gmail.com> 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 █ indicating the
> cursor, if I call org-edit-special on a LaTeX fragment like:
> \( \alpha +█\beta \)
> which is displayed as \( α +█β \)
> The point is moved on creation of the org-src buffer
> \( \alpha + \beta █\)
> Then if I move it back to after the "+", on calling `org-edit-src-exit'
> the point is moved to
> \(█ \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,
--
Bastien