[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] fix point position shifting in some org-src instances
From: |
Timothy |
Subject: |
[PATCH] fix point position shifting in some org-src instances |
Date: |
Wed, 28 Apr 2021 18:33:18 +0800 |
User-agent: |
mu4e 1.4.15; emacs 28.0.50 |
Hi All,
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.
I have tested a few other situations (e.g. LaTeX environments, example
blocks, src blocks), and it seems to work well.
--
Timothy
0001-org-src-Use-point-instead-of-column-for-coords.patch
Description: Text Data
- [PATCH] fix point position shifting in some org-src instances,
Timothy <=