Subject: mailing-list for TeXmacs Users
List archive
From : Maxim Nikulin <address@hidden>- To: address@hidden
- Subject: [TeXmacs] mathematical input withing session (1.0.7.2)
- Date: Sat, 19 Sep 2009 22:10:42 +0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=FZf/goGnQg5oOAfdIMuvzgigCs6+PxhFXpfJ+fi7nuPPIO6t1bFCRelSmmzfY+/sVf 3BBhsFXGbO6WQW8e9Ub9Ru9s2rQSiHeM3GcfoL5y2GTqEkbEppFjQLjtr43Xyedn0rGa KM65ihJQZXBIhZ3QKx961JLsCKi40Ux3fdMW4=
Hi,
Some time ago I was complaining on problem with switching to mathematical input in maxima session (texmacs-1.0.7.2)
https://lists.texmacs.org/wws/arc/texmacs-users/2009-07/msg00001.html
It seems that the problem is in the progs/dynamic/session-edit.scm file.
The field-update-math function sets node to <folded-io-math> (<folded-io>) even if it is <input> or <input-math> in the case of last session line:
(define (field-update-math t)
(if (session-math-input?)
(when (field-prog-context? t)
(tree-assign-node! t 'folded-io-math)
(tree-assign (tree-ref t 1) '(document "")))
(when (field-math-context? t)
(tree-assign-node! t 'folded-io)
(tree-assign (tree-ref t 1) '(document "")))))
I try to fix that. This is my attempt to write scheme code, so it looks ugly. I'm sure there is a compact and clear variant of
(define (field-update-math t)
(if (session-math-input?)
(when (tm-func? (tree-ref t :up) 'document)
(when (tree-in? t '(input))
(tree-assign-node! t 'input-math))
(when (tree-in? t '(folded-io))
(tree-assign-node! t 'folded-io-math))
(when (tree-in? t '(unfolded-io))
(tree-assign-node! t 'unfolded-io-math)))
(when (tm-func? (tree-ref t :up) 'document)
(when (tree-in? t '(input-math))
(tree-assign-node! t 'input))
(when (tree-in? t '(folded-io-math))
(tree-assign-node! t 'folded-io))
(when (tree-in? t '(unfolded-io-math))
(tree-assign-node! t 'unfolded-io))
; There should be a better way than just clear the field.
; Copy from input-math to input field converts the expression
; and something similar can be used here
(tree-assign (tree-ref t 1) '(document "")))))
--
Regards,
Maxim Nikulin
- [TeXmacs] mathematical input withing session (1.0.7.2), Maxim Nikulin, 09/19/2009
- Re: [TeXmacs] mathematical input withing session (1.0.7.2), Joris van der Hoeven, 09/24/2009
- Re: [TeXmacs] mathematical input withing session (1.0.7.2), Maxim Nikulin, 09/26/2009
- Re: [TeXmacs] mathematical input withing session (1.0.7.2), Joris van der Hoeven, 09/24/2009
Archive powered by MHonArc 2.6.19.