Screencast: hello world

<-- DEBUG: url[en]: /emacs/emacs-hello.html --><-- DEBUG: url[ko]: --> [English]

Here is how to type a famous hello.c and compile it, and execute it in emacs:..

Beside the editing command, above demonstration uses following Emacs commands:

  • C-x C-f is binded to `dired-x-find-file' that is similar to `find-file' in vanillar emacs. `dired-x-find-file' loads filename near point when callled interactively with a prefix arg (e.g. C-u).
  • M-x compile to execute the compile command.
  • C-<TAB> to run `other-window'. `other-window' is binded to C-x o by default.
  • C-c d to execute `unicode-shell' command which is similar to `shell' except its coding system is UTF-8.
    (defun unicode-shell ()
      "Execute the shell buffer in UTF-8 encoding.
    Note that you'll need to set the environment variable LANG and others
    appropriately."
      (interactive)
      (let ((coding-system-for-read 'utf-8)
            (coding-system-for-write 'utf-8)
            (coding-system-require-warning t))
        (call-interactively 'shell)))
            

comments powered by Disqus