How to send M-. to the terminal (repeatedly) in Emacs

I am trying to send the M-. command M-. (i.e. <ALT> . ) to a terminal that works in multi-user in Emacs, For reference, M-. usually bound to insert the last argument of the previous command into the terminal (i.e. yank-last-arg / insert-last-argument )

I have the following setup:

 (require 'multi-term) (multi-term-keystroke-setup) (setq multi-term-program "/home/john/sw/zsh/bin/zsh") (setq term-bind-key-alist (list ( cons "Cc Cj" 'term-line-mode) ( cons "Cc Ck" 'term-char-mode) ( cons "Cp" 'term-send-raw) ( cons "Cn" 'term-send-raw) ( cons "Ca" 'term-send-raw) ( cons "Ce" 'term-send-raw) ( cons "Mb" 'term-send-backward-word) ( cons "Mf" 'term-send-forward-word) ( cons "Md" 'term-send-forward-kill-word) ( cons "Ck" 'term-send-raw) )) ) # Make sure yanking works: (add-hook 'term-mode-hook (lambda () (define-key term-raw-map (kbd "Cy") 'term-paste))) 

I tried to add:

 ( cons "M-." 'term-send-raw) 

but he does nothing.

In case this is useful, here is a list of commands that appear to have the term prefix and which are defined in term.el

 term-send-Mx term-send-backspace term-send-backward-kill-word term-send-backward-word term-send-del term-send-down term-send-end term-send-eof term-send-forward-kill-word term-send-forward-word term-send-home term-send-input term-send-insert term-send-invisible term-send-left term-send-next term-send-prior term-send-quote term-send-raw term-send-raw-meta term-send-reverse-search-history term-send-right term-send-up 
+4
source share
1 answer

I don't have multi-term to test it, but you can try using term-send-raw-meta instead of term-send-raw :

 (setq term-bind-key-alist (list (cons "Cc Cj" 'term-line-mode) ; ... (cons "M-." 'term-send-raw-meta))) 
+3
source

All Articles