From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [OT] Not clobbering bash history Date: Sun, 03 Dec 2023 22:10:44 -0500 Message-ID: References: <87wmufm7r7.fsf@catern.com> <87fs12jkik.fsf@yahoo.com> <87ttphlqlo.fsf@catern.com> <87v89ujwa6.fsf@aarsen.me> <86il5g9qs9.fsf@aarsen.me> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16594"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brickviking@gmail.com, sbaugh@catern.com, luangruo@yahoo.com, emacs-devel@gnu.org To: Arsen =?iso-8859-1?Q?Arsenovi=C4=87?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 04 04:11:20 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r9zMe-0004AX-Bf for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Dec 2023 04:11:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9zM7-0004oB-1u; Sun, 03 Dec 2023 22:10:47 -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 1r9zM5-0004o0-C5 for emacs-devel@gnu.org; Sun, 03 Dec 2023 22:10:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9zM5-0006a9-0J; Sun, 03 Dec 2023 22:10:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=F7V0w1r+kAV9jrWPwZBdfXkt/Rj23kUZsfCMMkzTWPc=; b=a/99qhLeJFIJ gFjwlg5dBn79n3DLwu96pJJkx8eUROMYuTrJ2dqFsocJ0aiizdmQ7B9SZ5AUHZLE9+b8Rjk0Z2047 KJTt1mEKOn2Ifxsbx6pLcIY+o5vscItHDf6Lg+bd9N+hSVikzoeOdYB6gnT+fIZmNMqxREdMG+IcV Kx4V6fLFIEiBQwBf7wTgSwZ0yNnToNZip/2UG+WHbB7HOnK/rBm18Q4KSJT2c7m68rogPqf9IvROs SQ6j1hzSFaCpaLKET0imVvKoJUzowTEMiwpkuhJHi9pTKu23cBFGt8YXUZOo3FDzEfg8myqP8rwwz VceiWAqvWsli1AhQ9fhPzg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1r9zM4-000405-Gg; Sun, 03 Dec 2023 22:10:44 -0500 In-Reply-To: <86il5g9qs9.fsf@aarsen.me> (message from Arsen =?iso-8859-1?Q?Arsenovi=C4=87?= on Sun, 26 Nov 2023 11:20:03 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313501 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] I am trying to understand the words you wrote. > libhistory should, on recall attempt, What does "recall attempt" mean? I don't know that term. try to re-read the history file > from the last point it was on What does "last point it was on" mean? in order to catch new histories, it should > append to the file, What should it append, and in what circumstances? and it should attempt to lock the file via flock or > similar if such facilities are available (just in case). If two different shells will try to write history into one single file, are they doomed to give bad results, one way or another> It seems to me that the crucial thing is for them to use two different files. > In the event of truncation, What truncates the file? When does that occur? Is such truncation _supposed_ to occur, or is it a bug that it occurs? libhistory needs to be careful not to lose > any histories that were to be submitted in between the moment of > determination of truncation and commitment of the truncation to disk. I don't follow. > As a QoL feature, bash should prevent history truncation if ran with > --norc or other flags that would inhibit HISTFILE being set potentially. I don't understand this point -- can you explain? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)