From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#54486: 29.0.50; Eshell `escaped' string property can "leak" into output Date: Sat, 23 Nov 2024 22:56:54 -0800 Message-ID: References: <4246ce24-e48e-4bdf-4918-412bf6c0e595@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36889"; mail-complaints-to="usenet@ciao.gmane.io" To: 54486-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 24 07:58:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tF6Zg-0009TJ-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Nov 2024 07:58:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tF6ZH-0004t8-Uw; Sun, 24 Nov 2024 01:58:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tF6ZG-0004ss-E1 for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 01:58:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tF6ZG-0003Xj-5p for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 01:58:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:From:MIME-Version:Date:To:Subject; bh=FRupJjo0DP3GapldKbjqB4pmk1SH5EppiZt0CokxurE=; b=qboPMAerzdf9duDdr9jw3SFpK67MUwhi6pGXBBiNElTZd3STaGIOhZsgFKwL4nHag9uqutNUsiOh+P/paufCvPHRhcp0xAgiQX9z6PwQ1VJulbNNDqXMdRZZ1/Kq/q83PDXfXukNv7xX13m5YHillzklK79kHCcZWGHBuKjzhAh920wcnU8+cxs5JdtRbZ6+MshBzaR041UQBdRJkoT7hdTh5wfLngjev/z2j2NLf4SVaEA2+gvBwhdPDeQfyJNC6Yin/GQYMy/OKLTtJ8D16HFpDXBSwr5WeNsnPpfWGUYpbcoSHJVj3MBecVilPemFsYDkH5SXmStyVjZJvhviWA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tF6ZF-0001ei-RP for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 01:58:01 -0500 Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Nov 2024 06:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 54486 X-GNU-PR-Package: emacs Mail-Followup-To: 54486@debbugs.gnu.org, jporterbugs@gmail.com, jporterbugs@gmail.com Original-Received: via spool by 54486-done@debbugs.gnu.org id=D54486.17324314796351 (code D ref 54486); Sun, 24 Nov 2024 06:58:01 +0000 Original-Received: (at 54486-done) by debbugs.gnu.org; 24 Nov 2024 06:57:59 +0000 Original-Received: from localhost ([127.0.0.1]:60486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF6ZC-0001eN-T1 for submit@debbugs.gnu.org; Sun, 24 Nov 2024 01:57:59 -0500 Original-Received: from mail-pf1-f176.google.com ([209.85.210.176]:60648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF6ZA-0001eD-Ub for 54486-done@debbugs.gnu.org; Sun, 24 Nov 2024 01:57:57 -0500 Original-Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-72410cc7be9so3138551b3a.0 for <54486-done@debbugs.gnu.org>; Sat, 23 Nov 2024 22:57:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732431416; x=1733036216; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=FRupJjo0DP3GapldKbjqB4pmk1SH5EppiZt0CokxurE=; b=KzzhZfZfC+0gQB6Yk55EvvMnWxOdto11NF8rtmWPkoVcID5Ec4OpxPZh1qbjYdEXX+ 6Sovoeh5/W4xSYZXRAO+oa57nSNYEGGcMn7IpGVfp7bhCTKn3Ys1pIOKHoR7OdqW/XnQ UHes4vIeMBiiqZnTVHZkpVvL+qjiT74zOng2EqvP/Fi45Ytt465IwfL/MZMjrQhyTE79 CwmL4SekXILVD1YSBL+rTGNfk7PSRu1Z664yI/SI+Equ4q5ooXch0YgJk5KGCs24+VEb agSdkye+SCSIXiMLdCG0Hmg0GWoi7x24RLLTNO0EXc6uxtMkRCujxq4f4JEdB2lq/tNs ih4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732431416; x=1733036216; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FRupJjo0DP3GapldKbjqB4pmk1SH5EppiZt0CokxurE=; b=wkDzk4hHzywIjygOGZc8s3xiwmSmCgTVc6T/ZMoHdxcxn5mWtU0WxN+GLths/sZB+G mn7jSJetVg6iRHR5fHgsAvop4sUb1MrKhuGO/DVABIaWN7L7hEDnnPveWWVKhAYAE8l/ EZCAP+sxJjEPzND+t9b3qjhOZ1aCIRM0pHlsr68BfxyRxA9dvgE+FsZrgVAdwB5T5cCs 4vHDrPcFYdNDSmR22IkxAqLBkafBepispz0NMlo6nVXT88HxqdDy71RUqoDxho9OT5qO sRvlFzazlw32xnWRrpa21/STiJIfqTCV4M863NTEh8spyuzaY3iWR3bGGjWXVTLiJupQ J1mQ== X-Gm-Message-State: AOJu0YwvaeN2q9KEQnsWfdMQCCz8DjfLR2IehjLtsnO1LUeSlnfifOtG 1qvY9sG2UMf0QmyABddu9xAshNfLB4kIhtETKHryP1ZZwpylpm4nDlZL5Q== X-Gm-Gg: ASbGncuEf8p5v360Vvo0cqwP7HvFN6sXfBPYGOYER1ZGiageUxypw7XDNd5ftofdLyQ cLoH5LixH1T0RKu9Om29y/JeA6+KPzBH6iy3NmwYgpT56nBlzP6DZ9l29ls8gmR/fNdTSaETPu/ 5EIirAoUhqZYZI8yotjC9lXK5iiGnfuXYt1cH8JmRyJCJp2Gi3PhDVffjPAjCLm12vzKzbQnFBV DWkTSdAAjTVg8jXXaPQQct1XFECO1M3yXDmY+LzlqXJb1HhyRE9vAM8FSo6xfzzAP/MnwIQNRGC Gyp0oF2KyH7h3cUF3UujLjqUSYs= X-Google-Smtp-Source: AGHT+IGavgSTaVyzxEZhOdclXCCTYGh7jRCyafeiDujYjVchDEax/Efg5n2D7SrVzIcbri7DLAACyg== X-Received: by 2002:a17:903:1c7:b0:212:1f:e66b with SMTP id d9443c01a7336-2129f2a5333mr98790025ad.51.1732431415887; Sat, 23 Nov 2024 22:56:55 -0800 (PST) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-2129dbf9791sm42035235ad.145.2024.11.23.22.56.55 for <54486-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Nov 2024 22:56:55 -0800 (PST) Content-Language: en-US In-Reply-To: <4246ce24-e48e-4bdf-4918-412bf6c0e595@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295888 Archived-At: 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.