Subject: mailing-list for TeXmacs Users
List archive
From : Henri Lesourd <address@hidden>- To: Bas Spitters <address@hidden>
- Cc: address@hidden, Joris van der Hoeven <address@hidden>
- Subject: Re: [TeXmacs] Space vs enter
- Date: Wed, 25 Oct 2006 17:14:33 +0200
Bas Spitters wrote:
On Monday 23 October 2006 09:47, Joris van der Hoeven wrote:This is a long lasting-problem, for which a standard solution
On Mon, Oct 23, 2006 at 09:26:51AM +0200, Bas Spitters wrote:
On Sunday 22 October 2006 23:15, Joris van der Hoeven wrote:Well, the *-kbd.scm files. You may also do a grep for "space" and/or
On Sun, Oct 22, 2006 at 10:35:00AM +0200, spitters wrote:
I often find myself typing \forall<space> instead of \forall<enter>.
Would it be possible to make texmacs recognize the first variant too?
I.e. to activate a command by <space> too, not only by <enter>.
"return".
I now have:
(kbd-map
("space" (if (inside? 'hybrid) (kbd-return) (insert " ")))
)
in my-init-texmacs.scm
Which does what I want!
However, I had to manually remove:
("space" " ")
From:
/usr/share/texmacs/TeXmacs/progs/math/math-kbd.scm
and
/usr/share/texmacs/TeXmacs/progs/generic/generic-kbd.scm
Which I think is strange. Shouldn't the user defined keyboard maps override the system wide ones?
has probably been implemented now (I don't remember exactly
what it is, but it has been discussed on the mailing list some
months ago).
Another possible solution is to insert the following
hacky chunk of code into your my-init-texmacs.scm :
<<
; Permanent key mappings
(define-public kbd-map-old kbd-map)
(define kbd-map-looping #f)
(define-public-macro (kbd-map . l)
`(begin
(kbd-map-old . ,l)
(if (not kbd-map-looping)
(begin
(set! kbd-map-looping #t)
(always-key-mappings)
(set! kbd-map-looping #f)))))
(define (always-key-mappings) (lambda () #t))
(define always-key-mappings0 always-key-mappings)
(define keyboard-extend-forever-nb 0)
(define-macro (keyboard-extend-forever . body)
(define akm0 "")
(define akm1 "")
(set! akm0 (string->symbol (string-append "always-key-mappings"
(number->string keyboard-extend-forever-nb))))
(set! keyboard-extend-forever-nb (+ keyboard-extend-forever-nb 1))
(set! akm1 (string->symbol (string-append "always-key-mappings"
(number->string keyboard-extend-forever-nb))))
`(begin
(define-public (,akm1)
,(cons 'kbd-map body)
(,akm0))
(set! always-key-mappings ,akm1)))
>>
, and then you can use :
<<
(keyboard-extend-forever
("z" (display "Hello\n"))
......................................
(<KEY> <ACTION>)
..................................
)
>>
, whether it is in your my-init-texmacs.scm or elsewhere.
Best, Henri
- Space vs enter, spitters, 10/22/2006
- Article on TeXmacs-1.0.6.6 in LinuxUser #11, Andrey G. Grozin, 10/22/2006
- Re: [TeXmacs] Space vs enter, Joris van der Hoeven, 10/22/2006
- Re: [TeXmacs] Space vs enter, Bas Spitters, 10/23/2006
- Re: [TeXmacs] Space vs enter, Joris van der Hoeven, 10/23/2006
- Re: [TeXmacs] Space vs enter, Bas Spitters, 10/24/2006
- Re: [TeXmacs] Space vs enter, Henri Lesourd, 10/25/2006
- Re: [TeXmacs] Space vs enter, Bas Spitters, 10/24/2006
- Re: [TeXmacs] Space vs enter, Joris van der Hoeven, 10/23/2006
- Re: [TeXmacs] Space vs enter, Bas Spitters, 10/23/2006
Archive powered by MHonArc 2.6.19.