github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jimm / elisp

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

My Emacs initialization files — Read more

  cancel

http://www.io.com/~jimm/emacs_tips.html

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

removed unneeded code; comment 
jimm (author)
Mon Feb 08 15:31:24 -0800 2010
commit  ebe896a8c4de4b36840ffdb29a6ac7f2d6328703
tree    e93870721ae15fef38394b54a579ff75ea558afd
parent  d78aec3c5326bae8387d3e55f0301f3bff41b980
elisp /
name age
history
message
file .gitignore Tue Dec 16 07:13:36 -0800 2008 .gitignore files [Jim Menard]
file README.rdoc Sat Aug 15 21:10:18 -0700 2009 README [jimm]
file abbrev_defs.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file bootstrap-init.el Sun Jan 25 16:33:23 -0800 2009 Read path file from bootstrap dir. [jimm]
directory bootstrap/ Mon Feb 01 06:29:28 -0800 2010 different cursor color [jimm]
file crypt++.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
file dropdown-list.el Tue Jul 28 12:18:33 -0700 2009 yasnippet update [jimm]
directory elpa/ Mon Feb 01 06:44:46 -0800 2010 Use Technomancy's improved package.el (http://t... [jimm]
file emacs.el Mon Feb 08 15:31:24 -0800 2010 removed unneeded code; comment [jimm]
file eshell-customize.el Tue Apr 07 09:35:01 -0700 2009 removed unnecessary color code [jimm]
directory eshell/ Thu Nov 19 14:27:13 -0800 2009 new alias [jimm]
file flip.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
file hexlify.rb Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file htmlize.el Mon Sep 14 08:46:35 -0700 2009 Fix for Emacs 23 [jimm]
file http-twiddle.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file ido.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file inf-ruby.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
file malyon.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
file my-cygwin.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file my-emacs-wiki.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
file my-environment.el Sat Feb 14 15:35:33 -0800 2009 nimbus -> home [jimm]
file my-skeletons.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
directory org/ Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file pmd.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
directory progmodes/ Tue Feb 02 12:34:09 -0800 2010 better rakefile/capfile regexp [jimm]
file psvn.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file rails-find-other-file.el Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
directory remember/ Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
file ri.el Tue Dec 16 07:24:52 -0800 2008 removed executable bit from .el files [Jim Menard]
directory ses/ Tue Dec 16 07:11:37 -0800 2008 initial checkin [Jim Menard]
directory snippets/ Wed Dec 09 10:48:39 -0800 2009 new snippets [jimm]
file yasnippet.el Tue Jul 28 12:18:33 -0700 2009 yasnippet update [jimm]
README.rdoc

Introduction

Welcome to my Emacs initialization files.

The main initialization file is emacs.el, which is loaded as part of a machine-specific bootstrap process.

Bootstrap Process

Since I use Emacs on multiple machines, I came up with a customization scheme that lets me run "before" and "after" code for each machine around my main initialization code. Each domain (work, home, etc.) gets its own subdirectory and each machine gets its own subdirectory within the domain. Inside that are up to four files: dot_emacs, before.el, after.el, and the bookmark file emacs.bmk. The file ~/.emacs is a link to the dot_emacs file in that machine’s directory in the proper domain subdirectory.

Here’s the .emacs file on the machine I’m using right now, which is really a link to ~/Library/elisp/home/nimbus/dot_emacs:

  ;; -*- emacs-lisp -*-
  (defvar *my-emacs-lib-dir* "~/Library/elisp/")
  (defvar *my-pim-dir* "~/pim/")
  (load-file (concat *my-emacs-lib-dir* "bootstrap-init.el"))
  (bootstrap-init "home" "nimbux")

Here’s bootstrap-init.el:

  ;;; *my-emacs-lib-dir* must be defined

  (defun bootstrap-file (domain machine file-name)
    (concat *my-emacs-lib-dir* "bootstrap/" domain "/" machine "/" file-name))

  (defun load-init-if-exists (domain machine file)
    (let ((f (bootstrap-file domain machine (concat file ".el"))))
      (if (file-exists-p f)
        (load-file f))))

  (defun bootstrap-init (domain machine)
    (load-init-if-exists domain machine "before")
    (load-file (concat *my-emacs-lib-dir* "emacs"))
    (load-init-if-exists domain machine "after")
    (setq bookmark-default-file
          (bootstrap-file domain machine "emacs.bmk")))

So you can see that bootstrap-init runs a "before.el" file, then my main customization file "emacs.el", then an "after.el" file.

See Also

See also www.io.com/~jimm/emacs_tips.html.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server