From: Bastien <bzg@gnu.org>
To: Timothy <tecosaur@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] fix point position shifting in some org-src instances
Date: Fri, 30 Apr 2021 09:19:41 +0200 [thread overview]
Message-ID: <8735v8ck8i.fsf@gnu.org> (raw)
In-Reply-To: <87r1iuhf69.fsf@gmail.com> (Timothy's message of "Wed, 28 Apr 2021 18:33:18 +0800")
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
next prev parent reply other threads:[~2021-04-30 7:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 10:33 [PATCH] fix point position shifting in some org-src instances Timothy
2021-04-30 7:19 ` Bastien [this message]
2021-05-01 9:58 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735v8ck8i.fsf@gnu.org \
--to=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=tecosaur@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).