[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texmacs-dev] file-exists? name conflict (was: Bad crash)
From: |
David Allouche |
Subject: |
[Texmacs-dev] file-exists? name conflict (was: Bad crash) |
Date: |
Wed, 7 May 2003 09:43:34 +0200 |
User-agent: |
Mutt/1.5.3i |
On Wed, May 07, 2003 at 09:18:22AM +0200, David Allouche wrote:
> On Tue, May 06, 2003 at 05:58:12PM -0600, Nix N. Nix wrote:
> > I tried to compile TeXmacs from source on RedHat9. It compiled just
> > fine, but when I tried to run it, it completely crashed and burnt with
> > guile errors. I assume the code does not work with guile 1.6.0.
> >
> > This is really bad, because I cannot run TeXmacs when compiled from
> > source, and I cannot seem to get guile 1.4 to compile.
> >
> > TeXmacs] Loading ecrm11 at 300 dpi
> > /usr/share/TeXmacs-1.0.1.12/progs/core/texmacs/tm-preferences.scm:113:7:
> > In expression (file-exists? "$TEXMACS_HOME_PATH/system"
> > "preferences.scm"):
> > /usr/share/TeXmacs-1.0.1.12/progs/core/texmacs/tm-preferences.scm:113:7:
> > Wrong number of arguments to #<procedure file-exists? (str)>
>
> Humm... that looks like a problem related to patch #1405.
[..]
> I cannot see what may be causing this problem. Maybe texmacs
> mis-detects the guile-dialect at configure time...
By looking that your patch, I can see that guile-dialect detection is
not the problem (your fix affects the guile-b branch of the dialect
test).
Yet I am unsure that is really correct.
Here the old code:
(if (guile-a?)
(set! file-exists?
(let ((guile-file-exists? file-exists?))
(lambda args
(if (null? (cdr args))
(apply guile-file-exists? args)
(apply texmacs-file-exists? args)))))
(define file-exists? texmacs-file-exists?))
Here the new code:
(if (guile-a?)
(set! file-exists?
[same stuff here]
(set! file-exists? texmacs-file-exists?))
The problem is, if not guile-a? then symbol 'file-exists?' is
supposedly not bound at this point. So 'set!' is not really correct.
Actually, the problem with set! is that you may be setting a variable
in the guile module (which is always visible) thus reverting back to
the name conflict situation we had before: internal guile functions
are using texmacs-file-exists? instead of guile's primitive.
But the problem with 'define' may be that a binding is created in the
module (core boot compat) and not exported to (guile-user).
In addition, since the binding is *not always* created in (core boot
compat), we may not add 'file-exists?' to the public interface of the
module without breaking the current convention that a module interface
is completely set in the texmacs-module expression.
Well maybe we could do so... but exporting a symbol which is not
defined in the current module is not really what I would call clean.
So the correct fix is probably to load compat.scm with
(exec-file "$TEXMACS_PATH/progs/core/boot" "compat.scm")
instead of inherit-modules.
--
-- ddaa