Command to clear shell while using emacs shell

Update February 2015 Just noticed that Emacs now (version 25+) has the command comint-clear-buffer, bound to C-c M-o by default, that does what we need here, and probably is preferable to the answers I originally posted below. Options to consider: C-l will recenter the buffer. Pressing it repeatedly cycles the buffer, so that point appears … Read more

eval-after-load vs. mode hook

Code wrapped in eval-after-load will be executed only once, so it is typically used to perform one-time setup such as setting default global values and behaviour. An example might be setting up a default keymap for a particular mode. In eval-after-load code, there’s no notion of the “current buffer”. Mode hooks execute once for every … Read more

Emacs – Error when calling (server-start)

I found this solution on the EmacsWiki: The problem is the ownership of the directory ~/.emacs.d/server when you also have “Administrators” rights on your account. Create the directory ~/.emacs.d/server and set the owner of this directory to your login name and the problem is gone. As I have a “Dutch” version of Windows 7 I … Read more

How to determine operating system in elisp?

The system-type variable: system-type is a variable defined in `C source code’. Its value is darwin Documentation: Value is symbol indicating type of operating system you are using. Special values: `gnu’ compiled for a GNU Hurd system. `gnu/linux’ compiled for a GNU/Linux system. `darwin’ compiled for Darwin (GNU-Darwin, Mac OS X, …). `ms-dos’ compiled as … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)