[PATCH] fix ')history )file'

0 views
Skip to first unread message

Qian Yun

unread,
7:56 AM (10 hours ago) 7:56 AM
to fricas-devel
First, there is a variable misname.

Second, to save history in "axh" format, a directory is needed.
So set the second argument of kaf_open to true.

- Qian


diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index ae6a2564..9dbe3a33 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -1481,7 +1481,7 @@ optargs, 1)
'done

-say_file_or_core_msg(in_core?) ==
+say_file_or_core_msg(inCore) ==
inCore => say_msg("S2IH0032", CONCAT(
'"When the history facility is active, history information will
be",
'" maintained in memory (and not in an external file)."), nil)
@@ -1513,7 +1513,7 @@
say_file_or_core_msg(true)
$HiFiAccess:= 'NIL
histFileErase histFileName()
- str := kaf_open(histFileName(), false)
+ str := kaf_open(histFileName(), true)
for [n,:rec] in reverse $internalHistoryTable repeat
SPADRWRITE(str, object2String2(n), rec)
kaf_close(str)

Waldek Hebisch

unread,
8:47 AM (9 hours ago) 8:47 AM
to fricas...@googlegroups.com
On Sat, Jun 06, 2026 at 07:56:12PM +0800, Qian Yun wrote:
> First, there is a variable misname.

There is mismatch. 'in_core?' is a better name, so the itent was
to use it instead of 'inCore'.

> Second, to save history in "axh" format, a directory is needed.
> So set the second argument of kaf_open to true.

Yes, to write we need writable library.

> diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
> index ae6a2564..9dbe3a33 100644
> --- a/src/interp/i-syscmd.boot
> +++ b/src/interp/i-syscmd.boot
> @@ -1481,7 +1481,7 @@ optargs, 1)
> 'done
>
> -say_file_or_core_msg(in_core?) ==
> +say_file_or_core_msg(inCore) ==
> inCore => say_msg("S2IH0032", CONCAT(
> '"When the history facility is active, history information will
> be",
> '" maintained in memory (and not in an external file)."), nil)
> @@ -1513,7 +1513,7 @@
> say_file_or_core_msg(true)
> $HiFiAccess:= 'NIL
> histFileErase histFileName()
> - str := kaf_open(histFileName(), false)
> + str := kaf_open(histFileName(), true)
> for [n,:rec] in reverse $internalHistoryTable repeat
> SPADRWRITE(str, object2String2(n), rec)
> kaf_close(str)
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/013fbe6e-6cb2-47a8-82c3-3bab3f721002%40gmail.com.

--
Waldek Hebisch

Qian Yun

unread,
9:11 AM (8 hours ago) 9:11 AM
to fricas...@googlegroups.com
On 6/6/26 8:47 PM, Waldek Hebisch wrote:
> On Sat, Jun 06, 2026 at 07:56:12PM +0800, Qian Yun wrote:
>> First, there is a variable misname.
>
> There is mismatch. 'in_core?' is a better name, so the itent was
> to use it instead of 'inCore'.
>

Shall we do the rename in function 'setHistoryCore' as well?

- Qian

Waldek Hebisch

unread,
9:26 AM (8 hours ago) 9:26 AM
to fricas...@googlegroups.com
Yes.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages