Emacs Undo

Did not know that instead of the finger breaking C-_, undo on emacs can also be done using C-/ and C-x u, though I don't like the last one.

[Emacs] Using emacsclient

I have been using Emacs over gnu screen so that I can have my buffers and windows from work when I connect from home. The only problem is that over gnu screen, the Control-Up/Down/... does not work and instead I get the 5A, 5B, ... characters. The same is true for Alt and Shift. However, if I use Emacs over bash rather than gnu screen,  it works fine but I can't get my old buffers as it creates a new instance. Enter Emacsclient for the rescue.

Emacsclient can not only be used to tell a running Emacs session to visit a file but it can also be used to open a new Emacs frame and have your buffers from the other frame shown here. (Viola)

In order to get this to work, you need to start the Emacs server. This can be either done at run-time by
M-x server-start
OR, add it to your .emacs file
;; Start the emacs server
(server-start)

Now, create a few aliases in your .bashrc.
### Open emacs in console mode, non-gui
alias em='emacs -nw'
### Tell running emacs to visit a file
alias ecf='emacsclient -n'
### Start emacs with new frame
alias ecn='emacsclient -nw -c'

So, now I can run ecn and it would start a new Emacs instance but still show me the buffers from the existing one.

To close this frame you can type C-x 5 0

X11Vnc Shift Key Fix

There is a known bug with X11VNC where the Shift key does not work (ref). The quick fix is to add -xkb to the command string as suggested here.

My X11Vnc string looks like:

$ x11vnc -usepw -forever -xkb -display :0