Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
in M-x shell,当打印钟字符时(例如 in echo -e '\a'),它不会发出任何噪音并打印出^G。它是否有可能像在普通终端中一样实际响铃?
M-x shell
echo -e '\a'
^G
通过评估以下代码,我能够在将 control-G 字符发送到 shell 时让铃声响起:
(defun beep-on-alert-char (str) (if (string-match-p "\x7" str) (beep))) (add-hook 'comint-output-filter-functions 'beep-on-alert-char)