Skip to content

Commit

Permalink
Separating user literate config file
Browse files Browse the repository at this point in the history
  • Loading branch information
wcbeard committed Apr 14, 2011
1 parent b6fda24 commit d52b75a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 172 deletions.
28 changes: 7 additions & 21 deletions starter-kit-misc.org
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
c#+TITLE: Starter Kit Misc
#+TITLE: Starter Kit Misc
#+OPTIONS: toc:nil num:nil ^:nil

This is part of the [[file:starter-kit.org][Emacs Starter Kit]].
Expand Down Expand Up @@ -71,8 +71,7 @@ will load the =railscasts= color theme when Emacs starts.
Set the font size to a bearable one:
#+source: Font
#+begin_src emacs-lisp
(unless (system-type-is-gnu)
(set-face-attribute 'default nil :font "Menlo" :height 150))
(set-face-attribute 'default nil :height 150)
#+end_src

** Window system stuff
Expand Down Expand Up @@ -179,18 +178,8 @@ Give me Dvorak or give me death
(setq next-line-add-newlines t)

(setq history-length 100)

;; ido mode
;(ido-mode t)
;(setq ido-enable-flex-matching t)
;(setq ido-create-new-buffer 'always)
;(setq ido-use-filename-at-point 'guess)

(setq inhibit-startup-screen t)
(unless (system-type-is-gnu)
(setq initial-buffer-choice "~/Library/Application Support/Aquamacs Emacs/scratch buffer"))
(setq ns-alternate-modifier (quote meta))


(if (string-match "24" emacs-version) (progn
;; (ns-toggle-fullscreen)
(show-paren-mode 1)
Expand All @@ -200,7 +189,7 @@ Give me Dvorak or give me death
))

;; Changes all yes/no questions to y/n type
(fset 'yes-or-no-p 'y-or-n-p) ;from http://www.codecoffee.com/tipsforlinux/articles/033.html
(fset 'yes-or-no-p 'y-or-n-p)
(setq show-paren-delay 0) ; show the matching parentheses immediately
(display-time) ;displays the time in the status bar

Expand All @@ -209,7 +198,9 @@ Give me Dvorak or give me death
(setq cursor-type 'box)

;; recentf
(setq recentf-save-file "~/.emacs.d/Recent Files.el")
(setq recentf-save-file (concat dotfiles-dir "/Recent Files.el"))
;; (setq recentf-save-file "~/.emacs.d/Recent Files.el")
;; (add-to-list 'load-path (concat dotfiles-dir "/elpa-to-submit"))
(recentf-mode 1)
(setq recentf-max-saved-items 100)

Expand All @@ -227,10 +218,6 @@ Give me Dvorak or give me death
;; spell check
(setq-default ispell-program-name "aspell")

;; smart tab
;; (require 'smart-tab)
;; (global-smart-tab-mode 1)

;; hooks
;; (dolist (hook '(text-mode-hook))
;; (add-hook hook (lambda () (flyspell-mode 1))))
Expand Down Expand Up @@ -323,7 +310,6 @@ Give me Dvorak or give me death

#+end_src


** ido mode
ido-mode is like magic pixie dust!
#+srcname: starter-kit-loves-ido-mode
Expand Down
8 changes: 0 additions & 8 deletions starter-kit-org.org
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ GTD system or tool for reproducible research and literate programming.
For more information on org-mode check out [[http://orgmode.org/worg/][worg]], a large Org-mode wiki
which is also *implemented using* Org-mode and [[http://git-scm.com/][git]].

** Org fs-tree
#+BEGIN_SRC emacs-lisp
(unless (system-type-is-gnu)
(add-to-list 'load-path (concat dotfiles-dir "/src/org-fstree"))
(require 'org-fstree))
#+END_SRC


** My Latex stuff
#+BEGIN_SRC emacs-lisp
;;; Great help from here
Expand Down
147 changes: 4 additions & 143 deletions starter-kit.org
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ in the Starter Kit, they are described below in [[* customization][Customization
** Customization
:PROPERTIES:
:CUSTOM_ID: customization
:ORDERED: t
:END:

The many defaults built into the starter kit are only the beginning of
Expand Down Expand Up @@ -253,7 +254,6 @@ Settings/%your user name%/Application Data=
This section contains all code implementing the Emacs Starter Kit.

** Starter kit basics

*** Load path etc.

#+srcname: starter-kit-load-paths
Expand Down Expand Up @@ -521,9 +521,10 @@ After we've loaded all the Starter Kit defaults, lets load the User's stuff.
(if (file-exists-p elisp-source-dir)
(let ((default-directory elisp-source-dir))
(normal-top-level-add-subdirs-to-load-path)))
(if (file-exists-p system-specific-config) (load system-specific-config))
(if (file-exists-p system-specific-literate-config)
(if (file-exists-p system-specific-literate-config) ;placing lit
;before reg
(org-babel-load-file system-specific-literate-config))
(if (file-exists-p system-specific-config) (load system-specific-config))
(if (file-exists-p user-specific-config) (load user-specific-config))
(if (file-exists-p user-specific-literate-config)
(org-babel-load-file user-specific-literate-config))
Expand All @@ -533,146 +534,6 @@ After we've loaded all the Starter Kit defaults, lets load the User's stuff.
(mapc #'org-babel-load-file (directory-files user-specific-dir nil ".*org$"))))
#+end_src

*** W3M Mode
Right now just loading it up for Anything.el
#+source: w3m
#+begin_src emacs-lisp
;; (add-to-list 'load-path (concat dotfiles-dir "/src/emacs-w3m"))
;; (require 'w3m)
#+end_src

*** Matlab
#+source: matlab
#+begin_src emacs-lisp
(add-to-list 'load-path (concat dotfiles-dir "/src/matlab-emacs-super/matlab-emacs/"))
(eval-after-load "matlab-mode" 'matlab-load)

;; (load-library "matlab-load")
#+end_src

*** Anything mode
#+begin_src emacs-lisp
(unless (system-type-is-gnu)
(progn
(require 'anything-config)
(require 'anything)))

;; trying to get it to search jabber contacts
;; http://groups.google.co.uk/group/gnu.emacs.sources/msg/84a9e5fb0139af61
(defun my-jabber-list-contacts (&optional subset require-match default resource)
"List Jabber contacts.
This is a blatant copy-paste from `jabber-chat-with' with some
code removed."
(let ((jid-at-point (or
(and default
;; default can be either a symbol or a string
(if (symbolp default)
(symbol-name default)
default))
(get-text-property (point) 'jabber-jid)
(bound-and-true-p jabber-chatting-with)
(bound-and-true-p jabber-group)))
(completion-ignore-case t)
(jid-completion-table (mapcar #'(lambda (item)
(cons (symbol-name item) item))
(or subset (jabber-concat-rosters))))
chosen)
(dolist (item (or subset (jabber-concat-rosters)))
(if (get item 'name)
(push (cons (get item 'name) item) jid-completion-table)))
;; if the default is not in the allowed subset, it's not a good default
(if (and subset (not (assoc jid-at-point jid-completion-table)))
(setq jid-at-point nil))
jid-completion-table))
#+end_src

*** Auto-complete mode
#+source: auto complete
#+begin_src emacs-lisp
(unless (system-type-is-gnu)
(prog
(add-to-list 'load-path (concat dotfiles-dir "/src/auto-complete/"))
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/src/auto-complete/dict/")


(ac-config-default)
; (ac-flyspell-workaround) i believe this is redundant in config file
;; dirty fix for having AC everywhere
(define-globalized-minor-mode real-global-auto-complete-mode
auto-complete-mode (lambda ()
(if (not (minibufferp (current-buffer)))
(auto-complete-mode 1))
))
(real-global-auto-complete-mode t)
(real-global-auto-complete-mode 0)

;;; Slime with auto-complete
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)))
#+end_src

*** Fastnav package
#+source: fast-nav
#+begin_src emacs-lisp
(require 'fastnav)
#+end_src

*** Tab-bar
#+source: Tab bar
#+begin_src emacs-lisp
(require 'tabbar)
(tabbar-mode 1)

;; (defun tabbar-buffer-groups ()
;; "Return the list of group names the current buffer belongs to.
;; This function is a custom function for tabbar-mode's tabbar-buffer-groups.
;; This function group all buffers into 3 groups:
;; Those Dired, those user buffer, and those emacs buffer.
;; Emacs buffer are those starting with “*”."
;; (list
;; (cond
;; ((string-equal "*" (substring (buffer-name) 0 1))
;; '("Emacs Buffer")
;; )
;; ((eq major-mode 'dired-mode)
;; '("Dired")
;; )
;; (t
;; '("User Buffer")
;; )
;; ))) ;; from Xah Lee

;; (setq tabbar-buffer-groups-function 'tabbar-buffer-groups)

;; (defun tabbar-buffer-groups (buffer)
;; "Return the list of group names BUFFER belongs to.
;; Return only one group for each buffer."
;; (with-current-buffer (get-buffer buffer)
;; (cond
;; ((string-equal "*" (substring (buffer-name) 0 1))
;; '("Emacs Buffer"))
;; ((eq major-mode 'dired-mode)
;; '("Dired"))
;; (t
;; '("User Buffer"))
;; )))

#+end_src

#+results: Tab
: tabbar-buffer-groups

*** Aquamacs tabbar
#+source: Aquatabs
#+begin_src emacs-lisp
;; (require 'aquamacs-tabbar)
;; (require 'aquamacs-tools)
;; (require 'tabbar)
;; (require 'tabbar-window)
#+end_src

* FAQ
:PROPERTIES:
:tangle: no
Expand Down

0 comments on commit d52b75a

Please sign in to comment.