[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disable, replace binding in method-map

From: peter hodgson
Subject: disable, replace binding in method-map
Date: Sun, 17 May 2020 10:59:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

 A simpler version of my earlier pos

 1. `set-input-method` + `greek-babel` 
                turns an emacs buffer from U:** to BGU:
     the entire keyboard is transformed to type greek;
       most bindings are obvious- a = alpha, b = beta ...
       but a few are handled differently from other greek maps i work with,
                and these are the ones i want to a. preempt, then b.replace;
                a. theta- j, sigma- s/c,  ksi-x, chi-q
                b.        q         s         c      x

 2. i had a similar problem with org-mode 
      my global key settings worked as i wanted in org-mode, 
         unless they were set to some other task in org-mode-map
    (bindings- mode trumping- minor trumps major, and major trumps global)
    SO, i disabled the keys which 
          a. are globally bound in my emacs 
          b. org-mode-map had given its own special tasks-
    this freed up such keys so they could work "globally;"

(add-hook 'org-mode-hook
          (lambda ()
            (define-key org-mode-map "\eh" nil)))

(add-hook 'org-mode-hook
          (lambda ()
            (define-key org-mode-map "\ea" nil)))

 can't i do the same with greek-babel?
 1. for theta (i won't need to remap 'j', 
        but i must preempt 'q' so i can give it a new job here 

 (add-hook 'input-method-hook
          (lambda ()
            (define-key input-method-greek-babel-map "j" nil))
          (lambda () 
            (define-key input-method-greek-babel-map "q" nil))
          (lambda () 
            (define-key input-method-greek-babel-map "q"

 the two issues i can't successfully google are
     1. does 'input-method-hook work like 'input-mode-hook?
     2. how do i disable a binding, then rebind the key to a new job?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]