all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* disable, replace binding in method-map
@ 2020-05-17 15:59 peter hodgson
  2020-05-19 13:16 ` Dmitry Alexandrov
  2020-05-19 15:22 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: peter hodgson @ 2020-05-17 15:59 UTC (permalink / raw)
  To: help-gnu-emacs


 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 
         but
          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?

-- 
imputerate@puteracy.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-19 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17 15:59 disable, replace binding in method-map peter hodgson
2020-05-19 13:16 ` Dmitry Alexandrov
2020-05-19 15:22 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.