Waldek Hebisch <[EMAIL PROTECTED]> writes:
> I jest tried a efricas and I have found a bug in efricas and fricas
> mode. Namely, fricas mode seem to use just 'fricas' as program name
> assuming that fricas is in the path and that the version in the path
> is the correct one. This is reasonable given no extra assumptions.
> However, one can install fricas in any strange directory and it
> should run OK regardless of the path. In such situation efricas
> fails -- emacs can not run fricas, or worse, runs wrong version
> of fricas. But efricas can know exact location of fricas, so it
> can and should use full pathname.
>
> So I think that:
> - fricas mode should take fricas location from a variable, if
> this variable is unset default to plain 'fricas'
> - efricas should set this variable to full pathname of fricas.
I agree. I suggest a variable FRICASCMD, which holds the path to fricas. This
is more flexible than FRICASROOT. Maybe we should also change the name from
AXIOMEDITOR to FRICASEDITOR globally, although this will break the installation
of many people...
Could you replace '???' by the apropriate magic in Makefile.in below, test and
commit?
Thanks,
Martin
BTW: ideally, maybe you could also test other shells. I vaguely recall having
problems with a tcsh.
Index: Makefile.in
===================================================================
--- Makefile.in (revision 426)
+++ Makefile.in (working copy)
@@ -16,6 +16,7 @@
efricas:
echo "#!/bin/sh -" > $@
+ echo "FRICASCMD='???'" >> $@
echo "AXIOMEDITOR='emacsclient +\$$line \$$name >/dev/null 2>&1'" >> $@
echo "export AXIOMEDITOR" >> $@
echo "if which emacs; then" >> $@
Index: fricas.el
===================================================================
--- fricas.el (revision 426)
+++ fricas.el (working copy)
@@ -293,8 +293,10 @@
(defun fricas-run ()
"Run FriCAS in the current BUFFER."
(message "Starting FriCAS...")
- (start-process-shell-command "fricas" (current-buffer)
- "fricas" "-noclef" "2>/dev/null"))
+ (let ((fricas-cmd (getenv "FRICASCMD")))
+ (start-process-shell-command "fricas" (current-buffer)
+ (or fricas-cmd "fricas")
+ "-noclef" "2>/dev/null")))
(defun fricas-check-proc (buffer)
"Return non-nil if there is a living process associated w/buffer BUFFER.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---