5

我正在尝试将命令M-.(即)发送到在 Emacs中以多术语<ALT> .运行的终端。作为参考,通常必须在终端中插入上一个命令的最后一个参数(即/ )M-.yank-last-arginsert-last-argument

我有以下设置:

(require 'multi-term)
(multi-term-keystroke-setup)
(setq multi-term-program "/home/john/sw/zsh/bin/zsh")

(setq term-bind-key-alist
    (list
    ( cons "C-c C-j" 'term-line-mode)
    ( cons "C-c C-k" 'term-char-mode)
    ( cons "C-p"  'term-send-raw)
    ( cons "C-n"  'term-send-raw)
    ( cons "C-a"  'term-send-raw)
    ( cons "C-e"  'term-send-raw)
    ( cons "M-b"  'term-send-backward-word)
    ( cons "M-f"  'term-send-forward-word)
    ( cons "M-d"  'term-send-forward-kill-word)
    ( cons "C-k"  'term-send-raw)
))
)

# Make sure yanking works:
(add-hook 'term-mode-hook (lambda ()
                            (define-key term-raw-map (kbd "C-y") 'term-paste)))

我试过添加:

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

但它似乎没有做任何事情。

如果它有用,这里是似乎具有术语前缀并在term.el

term-send-M-x
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

1 回答 1

4

我不必multi-term测试它,但您可以尝试使用term-send-raw-meta而不是term-send-raw

(setq term-bind-key-alist
    (list (cons "C-c C-j" 'term-line-mode)
          ; ...
          (cons "M-."  'term-send-raw-meta)))
于 2013-03-01T18:43:45.507 回答