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#57129: 29.0.50; Improve behavior of conditionals in Eshell Date: Sat, 20 Aug 2022 11:49:34 -0700 Message-ID: <4f4b034b-6531-b7e3-2a4d-acecfc1acae3@gmail.com> References: <8fb3461d-b7eb-23c4-2736-cdd6dfeb1aa0@gmail.com> <87mtc9o5af.fsf@gnus.org> <83h72gmxtq.fsf@gnu.org> <7c04a92b-85f4-41c3-917b-4716cca2b9d6@gmail.com> <83pmh3l8ey.fsf@gnu.org> <9ca08054-5b73-a13e-0478-d838b650317b@gmail.com> <837d3bl1tx.fsf@gnu.org> <5ff283e8-9ced-5894-1075-43bba580185e@gmail.com> <831qthiu0s.fsf@gnu.org> <7259f313-c6ef-bce8-ddc4-e35ecc27d856@gmail.com> <83pmh1h2pv.fsf@gnu.org> <83lerpgyg3.fsf@gnu.org> <83ilmtgwq3.fsf@gnu.org> <83v8qmdbps.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5340"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, eggert@cs.ucla.edu, 57129@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 20 20:50:17 2022 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 1oPTY0-000192-2W for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Aug 2022 20:50:16 +0200 Original-Received: from localhost ([::1]:42800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPTXz-0003x2-2r for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Aug 2022 14:50:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPTXm-0003wt-DP for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 14:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPTXm-0004pn-2y for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 14:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPTXl-0007uq-Qp for bug-gnu-emacs@gnu.org; Sat, 20 Aug 2022 14:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Aug 2022 18:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57129 X-GNU-PR-Package: emacs Original-Received: via spool by 57129-submit@debbugs.gnu.org id=B57129.166102138830405 (code B ref 57129); Sat, 20 Aug 2022 18:50:01 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 20 Aug 2022 18:49:48 +0000 Original-Received: from localhost ([127.0.0.1]:33515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPTXX-0007uL-PQ for submit@debbugs.gnu.org; Sat, 20 Aug 2022 14:49:48 -0400 Original-Received: from mail-pf1-f173.google.com ([209.85.210.173]:36558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPTXS-0007tz-Gz for 57129@debbugs.gnu.org; Sat, 20 Aug 2022 14:49:46 -0400 Original-Received: by mail-pf1-f173.google.com with SMTP id w29so1409468pfj.3 for <57129@debbugs.gnu.org>; Sat, 20 Aug 2022 11:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:from:to:cc; bh=uneXAV4uRtoc741SnlonZ3qbDLUc//XJd2j2a4ewbLY=; b=nHwObuo13c6hQMipq9UGC2gY6G/ghaE/5u/CEmAuP2xpvn/UDYufWWHI4zsOU+K6Cm jvw+w6riqeSZ13tD3XO7UZDJOzXaXJhwWED54hfCp002zHX8fMAM0gMmHMohCRYCXkwC hNPfuacZQtJv6yE9GbBH3U2Yld+FEz4HT5DzepcwnqYpif8/khsulyxCduvuETTA+T+V HVYmKXANq9ZTL2nCXanyFDSI0b+VwFZpWuVbpqo0aZwt+aG9SPMOEVz1rJ4wAlDmPsY1 7Z5OfMCdRWw7bF01dHOCGBR63X+cAQn3U/kEyPTjdKspCZw9zXiGZHoynUHqmr0LsQ9N XGaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:x-gm-message-state :from:to:cc; bh=uneXAV4uRtoc741SnlonZ3qbDLUc//XJd2j2a4ewbLY=; b=HjIQDSM4ANEhc/u12JrEOLsuL2NFpvjNEq9TVGLpSWxpXg14+NvL9Rao6/4dELAxNl ZU9D0Axm86m63PVbmokQ5BakitNbL3HF/Vmv71pN1KursI1z/uyU1LfmKlXgwUTH7MOq jDVpUnuf4r1CvqvJqHcCQVHbmcBtx4Kh7sInXH9DLYXMp+z2c/UNEGH487Ohdl/OmPAZ QNAuOOe/xL3QfK8BKNyCHvtqDHQ8ZSD25oh+35Xy0rUSbYN2O2P5ur0PuBx2vkA3lpdJ vSCbLA8ppYI5y3aK+gGBlGKZdG3fWx6FY077kZdZwSYM2mCYgnSK5v1/jOOTh9hvklgS Pbdw== X-Gm-Message-State: ACgBeo3R2dhK0nhOyvVM2HD2DITSGI4yRULDMJFc56umXBLQhxNVtxPP otvmKLVQ9PMISQSzHk8FbTUWhECK+HE= X-Google-Smtp-Source: AA6agR4VjRGR9RjbfEmUjtu6VKRylCJ2ZzVJ1WpLdz5bLPweItn0D/M/n2aPALQ1jnkhhukxiGvGvQ== X-Received: by 2002:a63:cc51:0:b0:41f:12f5:675b with SMTP id q17-20020a63cc51000000b0041f12f5675bmr10714694pgi.69.1661021376708; Sat, 20 Aug 2022 11:49:36 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id 75-20020a62144e000000b00534a7a127bcsm5547962pfu.164.2022.08.20.11.49.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Aug 2022 11:49:35 -0700 (PDT) In-Reply-To: <83v8qmdbps.fsf@gnu.org> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:240269 Archived-At: On 8/20/2022 11:14 AM, Eli Zaretskii wrote: >> Cc: larsi@gnus.org, 57129@debbugs.gnu.org >> From: Jim Porter >> Date: Sat, 20 Aug 2022 11:03:27 -0700 >> >> In addition to the changes to temporary file name generation, I think it >> would be useful for Eshell to kill the temporary buffer too. If you use >> this feature in Eshell a lot, the temporary buffers could pile up, >> consuming memory for no real benefit. (A user who wanted the buffer to >> stick around would probably redirect to a non-temporary file, or even >> just to a buffer.) Attached is a patch to do this. > > That makes sense, of course, but why not use with-temp-buffer in the > first place? I'm not sure that would work in this case. 'with-temp-buffer' (or probably 'with-temp-file', since we want a real file) would clean everything up once BODY has executed, but we want to perform cleanup in a hook, which might execute quite a while later (e.g. if passing this temp file to an external process). If there's a way to use that though, I'm all for it.