[wplug] Emacs Magic
Christopher DeMarco
demarco at maya.com
Thu Oct 15 12:29:06 EDT 2009
On Wed Oct 14 18:25:30 2009 -0400, Joe Gallo wrote:
> So, emacs-using wpluggers, here's your chance to wow me. What's your
> most favorite "made with secret alien technology" feature of emacs?
8:-D
;; For starters, Emacs 23 fixes my two biggest complaints over the
;; years: native xft support in Linux and emacsclient can now connect
;; terminal-based and x-based frames to the same backend. Check out
;; emacs --daemon and emacsclient!
;; Read about exchange-point-and-mark and the mark ring
;; tramp-mode will rock your world.
;; Then use this so you always know where you are:
(defconst my-mode-line-buffer-identification
(list
'(:eval
(let ((host-name
(if (file-remote-p default-directory)
(tramp-file-name-host
(tramp-dissect-file-name default-directory))
(system-name))))
(if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
(substring host-name 0 (match-beginning 1))
host-name)))
": %12b"))
(setq-default
mode-line-buffer-identification
my-mode-line-buffer-identification)
(add-hook
'dired-mode-hook
'(lambda ()
(setq
mode-line-buffer-identification
my-mode-line-buffer-identification)))
;; And also http://www.emacswiki.org/emacs/EmacsNiftyTricks
--
Christopher DeMarco <demarco at maya.com>
IT Director
MAYA Group
+1-412-708-9660
More information about the wplug
mailing list