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.
ではM-x shell、ベル文字が印刷される場合 ( などecho -e '\a')、ノイズは発生せず、 が印刷され^Gます。通常の端末のように実際にベルを鳴らすことは可能ですか?
M-x shell
echo -e '\a'
^G
このコードを評価することで、コントロール G 文字がシェルに送信されたときにベルを鳴らすことができました。
(defun beep-on-alert-char (str) (if (string-match-p "\x7" str) (beep))) (add-hook 'comint-output-filter-functions 'beep-on-alert-char)