Summary: Added link to “highlight active buffer” code
> [http://amitp.blogspot.com/2013/05/emacs-highlight-active-buffer.html Highlight active buffer in Emacs 23]
Hello. My name is Amit Patel and I’m an Emacs user. I started using Emacs in 1990, switched to XEmacs in 1992, and switched back to GNU Emacs in 2007. I use Emacs on Linux, Mac, and occasionally Windows. I’m amitp on the #emacs irc channel.
Short answer: I used GNU Emacs 18, then switched to Lucid 19 and stayed on the Lucid/XEmacs side for a long time, then switched back to GNU Emacs 22, and now use 22 or 23 on Mac, Windows, and Linux. I’ve tried SXEmacs but never got into it, in part because it feels alien but also because I use multiple platforms.
Medium answer: I used GNU Emacs 18, and played with Epoch (!), and then switched to Lucid Emacs in 1992. I’m a visual person and find colors and fonts to be very useful; at the time, Emacs 18 didn’t have support for such things, so I switched. I stuck with Lucid/XEmacs 19, 20, 21. By the time XEmacs 21 came out, Emacs was starting to catch up, but it still didn’t have things like proportional fonts. XEmacs seems more polished and more useful out of the box (for example, it comes with python and ruby modes). GNU Emacs seems faster and more actively developed. By 2003 I was absolutely convinced that the two were diverging enough that I’d never be able to switch, nor would I want to. However, since then, XEmacs development has slowed to a crawl, and I’ve gotten a Mac (where XEmacs isn’t supported), and I’ve switched to Emacs 22/23 on Mac, Windows, and Linux.
Long answer: here.
I try to share the same Emacs setup across machines, but there are machine-specific settings that I keep in separate files. I then load those files with this:
(defvar my-modules `( ;; Loaded for all setups settings keybindings ;; In addition to the modules that are always loaded, you can put ;; in user-specific customization into [username].el: ,(intern (user-login-name)) ;; You can also put in machine-specific or domain-specific ;; customization. For example, if you have both a shell.pobox.com ;; account and a graphics.stanford.edu account, you can create ;; shell.pobox.com.el (or pobox.com.el) and ;; graphics.stanford.edu.el (or stanford.edu.el or edu.el). ,@(get-hostname-and-parents (or (getenv "HOSTNAME") (getenv "COMPUTERNAME") (system-name) "local")) ; customization per computer ;; And you can put in platform-specific customization (mac=darwin) ,(intern (subst-char-in-string ?/ ?- (format "platform-%s" system-type))) ;; Window system (mac=ns) ,(intern (format "window-%s" (window-system))) )) (loop for module in my-modules do (condition-case err (require module) (file-error (unless (equal err (list 'file-error "Cannot open load file" (format "%s" module))) (message "(require %s) failed: %s" module err)))))
For example, I have Mac-specific settings in
platform-darwin.el and my Stanford settings in
stanford.el. Sometimes other people will copy my emacs setup but certain things are specific to me so I’ll put them in
amitp.el so that they’re not automatically loaded by others. It’s not a clean use of module names but it’s simple and works reasonably well so far.
I haven’t contributed much. Among classmates and coworkers I’m usually the one who tries out new packages and shares customization tweaks. I do contribute small items to the Emacs Wiki. However, I haven’t written any big packages that I’ve shared with the world.
One problem I have in and out of Emacs is keeping track of what window has focus. Long ago I wrote a simple XEmacs package to change the modeline color of the active window. I’m happy to see that GNU Emacs 22 has an active and inactive modeline color (
‘mode-line-inactive’ face), although the active color is used even when Emacs doesn’t have OS-level focus. I also implemented something similar to highlight when the minibuffer is active, and it looks like GNU Emacs 22’s
‘minibuffer-prompt’ face can be used to achieve a similar effect.
I should post my `.emacs’ file someday. I’ve posted parts of it in blog posts. None of these are likely to be interesting to emacswiki members though.