+;; You've split the window into two buffers?
+;; But you wanted the new buffer on the left?
+(defun rwd-swap-buffers ()
+ "Swap the current 2 buffers in their windows"
+ (error "Frame doesn't have two windows")
+ (let* ((cw (selected-window))
+ (cb (buffer-name (window-buffer cw)))
+ (nb (buffer-name (window-buffer nw))))
+ (switch-to-buffer cb))))