Hello using the shell in emacs $ls -l -rw-r--r-- 1 sam sam 319 Jul 31 13:00 [0mmain.cpp[0m to remove those strange character around the filename I
M-: (ansi-color-apply-on-region (point-min) (point-max)) I have currently in my .emacs this function which removes all the ^M from text which get infested with it. (global-set-key [f5] 'cut-ctrlM) ; cut all ^M. (defun cut-ctrlM () "Cut all visible ^M." (interactive) (beginning-of-buffer) (while (search-forward "\r" nil t) (replace-match "" nil t)) ) how can I do both, eval the expression and run the function by the [f5]key. thanks _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs