Emacs hacks

(defun sacha/reverse-line ()
  (interactive)
  (let ((string (buffer-substring (line-beginning-position) (line-end-position))))
    (delete-region (line-beginning-position) (line-end-position))
    (insert (apply 'string (reverse (string-to-list string))))))