From: Jim Porter <jporterbugs@gmail.com>
To: 54486-done@debbugs.gnu.org
Subject: bug#54486: 29.0.50; Eshell `escaped' string property can "leak" into output
Date: Sat, 23 Nov 2024 22:56:54 -0800 [thread overview]
Message-ID: <c15483f1-875b-bd88-cd23-fa882e041dac@gmail.com> (raw)
In-Reply-To: <4246ce24-e48e-4bdf-4918-412bf6c0e595@gmail.com>
On 3/20/2022 8:52 PM, Jim Porter wrote:
> When using Eshell, it's possible to inadvertently add an `escaped'
> string property to strings, resulting in some pretty surprising
> behavior. Starting from "emacs -Q --eval '(eshell)'":
>
> ~ $ setq var (list "foo" "bar")
> ("foo" "bar")
> ~ $ echo $var
> ("foo" "bar")
> ~ $ echo $var[0]
> foo
> ~ $ echo $var
> (#("foo" 0 3
> (escaped t))
> "bar")
In the intervening years, I've improved Eshell's parser to prevent other
bugs, which has resulted in the 'escaped' string property no longer
being useful.
Instead, Eshell now propertizes text that has actual syntactic meaning:
for example a globbing character like "*" gets the 'eshell-glob-char'
text property. By marking *syntactic* characters with a text property,
we ensure that Eshell only ever adds properties to text literally
written into the Eshell buffer, which avoids the issue here.
As a result of all this, we can now remove the calls that added that
property in Eshell. I've now made this change in b4655ff99b5, so closing
this bug.
prev parent reply other threads:[~2024-11-24 6:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 3:52 bug#54486: 29.0.50; Eshell `escaped' string property can "leak" into output Jim Porter
2022-03-21 4:04 ` Jim Porter
2022-03-21 12:19 ` Eli Zaretskii
2022-03-21 19:24 ` Jim Porter
2022-03-21 20:00 ` Eli Zaretskii
2024-11-24 6:56 ` Jim Porter [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=c15483f1-875b-bd88-cd23-fa882e041dac@gmail.com \
--to=jporterbugs@gmail.com \
--cc=54486-done@debbugs.gnu.org \
/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.