3 ms·
Very little, my .emacs just loads a whole load of other .el files. There's quite a lot in them though :) Here's a very very useful few lines if you're on X Wind
by almost 16y ago
Very little, my .emacs just loads a whole load of other .el files. There's quite a lot in them though :) Here's a very very useful few lines if you're on X Windows:
; Fix copy-paste between emacs and other x programs
(setq x-select-enable-clipboard t)
(if (functionp 'x-cut-buffer-or-selection-value)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value))
All your problems with cut and paste between Emacs and other programs? Gone!
The if statement stops it failing when you use it on other platforms.
EDIT: I also really really like this bit which I've not seen in other peoples lists:
(defun eshell-goto-current-dir (&optional arg)
(interactive "P")
(let ((dir default-directory))
(eshell arg)
(eshell/cd dir)))
(global-set-key "\C-cs" 'eshell)
(global-set-key "\C-cS" 'eshell-goto-current-dir)
That means I can switch to eshell with C-cs or a can switch to eshell and change the current directory to be the same as the file I was viewing with C-cS. It also passes through the argument so I can have multiple shells open and use the numeric argument (M-1, M-2 etc) to select them.