mailing-list for TeXmacs Users

Text archives Help


why : (delayed (lazy-keyboard-force) …


Chronological Thread 
  • From: vincent douce <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: why : (delayed (lazy-keyboard-force) …
  • Date: Tue, 20 Feb 2024 09:47:25 +0100

hello
in my-init-texmacs some shorcut are bounded with delayed (lazy-keyboard-force
other aren’t
both work
example :
(kbd-map (:mode in-text?) 
    ("e e e" (insert-go-to ' 
                           (enumerate-alpha (document (item))) 
                           (list 0 0 1)
                           )); liste a)
    ("p p p" (make 'acronym)); Sigle ou acronyme comme PISA ou PEEP.
    ("R R R" (make 'r-code)); lignes de code R
    ("r r r" (make 'r)); petit bout de code R
    ("s s s" (insert '(underline "ssi") )); liste a)
    ("= = = =" (insert '(with "font-size" ".15pt" (hrule))))
)
————————————
or :
(delayed (lazy-keyboard-force) 
         (kbd-map
           (:mode in-math?)
  ;------------ lettres doubles et triples ------------   
      ("^ ^ ^" (make-wide "^")) ; pour notation des angles ok
      ("^ ^" (insert '(math (rsup "2")))) ; pour carre en exposant
      ("_ _" (make-wide-under "<wide-bar>")) ; pour souligner
      ("a a" (make-above))
      ("b b" (make-below))
      ("b b var" (make 'binom))
       etc...

————————————

i would like to understand if(delayed (lazy-keyboard-force) is need and when and why
i dont really understand Max’ explanations here


what i understand is : for shortcuts already eixsiting in the code of TeXmacs i must put (delayed (lazy-keyboard-force) and so to prevent risk i could put it everywhere
but i would like to be sure it is the good explanation

if Joris or Max or anyone else can help me understand i ‘ll be glad

Vincent




Archive powered by MHonArc 2.6.24.

Top of page