From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 22FF43858D35 for ; Sun, 29 Jan 2023 16:56:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 22FF43858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org 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 1pMAyv-0001Cq-Mw; Sun, 29 Jan 2023 11:56:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mWE0SgQ9VZSrqfJ/yR6v+cAEiAE7Cu/pg/e2WAqn3S8=; b=Bxq6whJblqxd B+Zq9mU8/YI9P6xMtlndblUaaNZ+90W9fcIR7xL7m0b2Tpz+M9YJzwgnLcS5bh6fSCvSuPuKIFH3S d2LpU7eX3QFOmKBLXK6UVS1ysqhJhLVlQ8Xu1MTF9d62RHxgiR8TKWwUxvaPbBwO2CrzCEyVTD48/ OJABt6f1Ff55xz83mHWNh4mdWkAFV2Lkw+pgWXNk/b2moW/xmDU848ZzOWjHadDqyfJl0OslWJiGE pb3SdfBxuEotoLKhLf2TzCUfVVLK5S4VO8KxDLktSV/8PDbVTM9RsURty5EyA3y8MCvyPh7W/P1zg adzTwMS85YQTDPMMnI7xBQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMAyv-0000hV-04; Sun, 29 Jan 2023 11:56:41 -0500 Date: Sun, 29 Jan 2023 18:56:32 +0200 Message-Id: <83bkmh6zzz.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <20230129162105.526266-6-tom@tromey.com> (message from Tom Tromey on Sun, 29 Jan 2023 09:21:05 -0700) Subject: Re: [PATCH 5/5] Add "save history" command References: <20230129162105.526266-1-tom@tromey.com> <20230129162105.526266-6-tom@tromey.com> X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Tom Tromey > Cc: Tom Tromey > Date: Sun, 29 Jan 2023 09:21:05 -0700 > > PR cli/23664 points out that it would sometimes be convenient to > immediately save the current history to a file. This patch implements > this feature. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23664 > --- > gdb/NEWS | 3 +++ > gdb/doc/gdb.texinfo | 8 ++++++ > gdb/testsuite/gdb.base/save-history.exp | 36 +++++++++++++++++++++++++ > gdb/top.c | 18 +++++++++++++ > 4 files changed, 65 insertions(+) > create mode 100644 gdb/testsuite/gdb.base/save-history.exp The documentation parts are okay, thanks. > +Occasionally you may want to save your history to a file. This > +command will do just that, saving the commands in your current session > +to the named file. Note that you should normally edit the saved > +history before using @code{source} to reload it, as the @code{save > +history} command itself will be at the end of the file. What is the rationale for saving the "save history" command as well? Are there any circumstances when the user might want that?