From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.emacs.bugs Subject: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell Date: Tue, 16 Aug 2022 19:29:33 +0200 Message-ID: <2594092.Isy0gbHreE__26547.4623230816$1660671093$gmane$org@nimes> References: <4165399.mogB4TqSGs@nimes> <83wnb8dukz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18720"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, larsi@gnus.org, eggert@cs.ucla.edu, bug-gnulib@gnu.org, 57129@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 16 19:31:27 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 1oO0PV-0004hl-Uy for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 19:31:26 +0200 Original-Received: from localhost ([::1]:57880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oO0PU-0002Mr-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Aug 2022 13:31:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oO0OB-0002Km-MH for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 13:30:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oO0OB-0001f0-E3 for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 13:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oO0OA-0001v3-Q6 for bug-gnu-emacs@gnu.org; Tue, 16 Aug 2022 13:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Aug 2022 17:30:02 +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.16606709807327 (code B ref 57129); Tue, 16 Aug 2022 17:30:02 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 16 Aug 2022 17:29:40 +0000 Original-Received: from localhost ([127.0.0.1]:48217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oO0Nn-0001u7-Vs for submit@debbugs.gnu.org; Tue, 16 Aug 2022 13:29:40 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.20]:39025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oO0Nl-0001tx-FF for 57129@debbugs.gnu.org; Tue, 16 Aug 2022 13:29:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1660670974; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=y/FpYlIaG9c90SiPB8ozskZf3MFr5ouzwwXozvKZbDk=; b=rNzlXx18HdqH5cf9ipElaqEQ7ewes0jMibyHWu7DT8R0tILoxYF2YfPtHlJSFcv7at SdkD1/ux0SpJbXQ09T3oXR+ZPT+A7U0jhpVckiVweq0KcuP4mH9durV5goEHtJM5SYJR h4WsP1Nzm5j54s/YF1zq+SWMrs3aBQP/GzZas58jozXsttwlntTzExHQeNSkgC6Zi0kJ teaBPqTqWdxEitx6SnWECbETNP04AGC/Ri9sHPLecDUx1hqvR6Z7j4FR/vrmNquO/xfk mqg414tp9LdnzMX6YqJKotQaTI/GJBqHZxOaw4EqdTFuUp6tvsPXTqqUAo8j9Q0IjJb8 dnDw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zG6tLj91pCR2L7hM6+Odi8PRCuZoP2/ZC83xg==" X-RZG-CLASS-ID: mo00 Original-Received: from nimes.localnet by smtp.strato.de (RZmta 47.47.0 AUTH) with ESMTPSA id g97246y7GHTYmYt (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 16 Aug 2022 19:29:34 +0200 (CEST) In-Reply-To: <83wnb8dukz.fsf@gnu.org> 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:239982 Archived-At: Thanks for the explanations, Eli. Eli Zaretskii wrote: > > Maybe the problem is that the file gets deleted too early, when some pa= rts > > of Emacs still reference it? >=20 > The buffer which visited that file still exists, and still records the > name of the file, yes. And then, when the program writes to another > file created by another call to make-temp-file, it actually writes to > a file that some buffer still visits, and in Emacs that triggers a > prompt to the user to refresh the buffer. That is a reasonable behaviour for a text editor =E2=80=94 but only for file names that are explicitly controlled by some program or by the user, not for temporary files. > The programmer didn't > expect that because it is natural to expect each call to a function > that creates a temporary file to create a file under a new name, not > reuse the same name. This is an incorrect assumption. Just like socket numbers are randomly generated in some situations, temp file names are random, and you can't make assumptions about the resulting file name. How about storing, as an attribute of the buffer, a boolean that tells whether the underlying file name is randomly generated (i.e. a temp file), and query this boolean before prompting to the user to refresh the buffer? Bruno