Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell Emacs外壳中的贝尔_Shell_Emacs - Fatal编程技术网

Shell Emacs外壳中的贝尔

Shell Emacs外壳中的贝尔,shell,emacs,Shell,Emacs,在M-x shell中,当打印钟形字符时(例如在echo-e'\a'中),它不会发出任何噪音并打印出^G。它是否有可能像在普通终端中那样实际鸣响铃声?我能够通过评估以下代码,使铃声在control-G字符发送到外壳时发出嘟嘟声: (defun beep-on-alert-char (str) (if (string-match-p "\x7" str) (beep))) (add-hook 'comint-output-filter-functions 'beep-on-alert-cha

M-x shell
中,当打印钟形字符时(例如在
echo-e'\a'
中),它不会发出任何噪音并打印出
^G
。它是否有可能像在普通终端中那样实际鸣响铃声?

我能够通过评估以下代码,使铃声在control-G字符发送到外壳时发出嘟嘟声:

(defun beep-on-alert-char (str)
  (if (string-match-p "\x7" str) (beep)))

(add-hook 'comint-output-filter-functions 'beep-on-alert-char)