From: Eli Zaretskii <eliz@gnu.org>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: Matthias Meulien <orontee@gmail.com>, 73420@debbugs.gnu.org
Subject: bug#73420: 30.0.90; Race condition in `ansi-osc-apply-on-region' with concurrent user input
Date: Sun, 22 Sep 2024 11:21:04 +0300 [thread overview]
Message-ID: <864j68hzf3.fsf@gnu.org> (raw)
In-Reply-To: <87v7yom94c.fsf@gmail.com> (message from Augusto Stoffel on Sun, 22 Sep 2024 09:37:55 +0200)
> From: Augusto Stoffel <arstoffel@gmail.com>
> Date: Sun, 22 Sep 2024 09:37:55 +0200
>
> In the current implementation of `ansi-osc-apply-on-region', the
> intention of the calls to `buffer-substring-no-properties' and
> `delete-region' is to get the payload of the OSC control sequence
> currently being parsed.
>
> However, it is possible that the user typed some characters in the
> buffer while the OSC payload is arriving (and I have actually observed
> this happen if the payload is moderately large). So
> `buffer-substring-no-properties' should be replaced with something that
> gets the buffer text in that range, but restricted to the portions that
> actually came from the subprocess.
Thanks. Since you (together with Matthias) are the author of
ansi-osc.el, would you like to propose a solution for this?
> PS: Is there already a version of `filter-buffer-substring' anywhere in
> Emacs that filters based on the value of a given text property, or do
> people bake their own every time?
Looks like the latter, see backtrace--filter-visible, for example.
prev parent reply other threads:[~2024-09-22 8:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-22 7:37 bug#73420: 30.0.90; Race condition in `ansi-osc-apply-on-region' with concurrent user input Augusto Stoffel
2024-09-22 8:21 ` Eli Zaretskii [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864j68hzf3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73420@debbugs.gnu.org \
--cc=arstoffel@gmail.com \
--cc=orontee@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.