[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: porting crufty old init.el to package management
From: |
Alan Schmitt |
Subject: |
Re: porting crufty old init.el to package management |
Date: |
Mon, 24 Mar 2014 13:42:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Tom Roche <Tom_Roche@pobox.com> writes:
>
>> I'm wondering, would anyone care to recommend especially worthy docs
>> for this process (guides, howto's, tutorials)? esp how best to
>> accommodate snippets of elisp (gists?)
>
> If you think of your init file more as '(comment)text with code',
> Org-Babel and the associated starter-kit
> (http://eschulte.github.io/emacs-starter-kit/) are definitely worth a
> try.
This is the approach I'm following. To get you started, here is my
configuration loading config file (init.el). It basically loads
a current version of org, then tangles the "myconfig.org" file to create
the configuration
#+begin_src emacs-lisp
;; Turn off mouse interface early in startup to avoid momentary display
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
;; remember this directory
(setq emacsd-dir
(file-name-directory (or load-file-name (buffer-file-name))))
;; org-setup
(add-to-list 'load-path (concat emacsd-dir "org/emacs/site-lisp/org"))
(require 'org)
;; Then tangle and load the file
(org-babel-load-file (expand-file-name "myconfig.org" emacsd-dir))
#+end_src
Here is a small snippet of the org file, to show you what it looks like:
--8<---------------cut here---------------start------------->8---
* Setting up
#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path emacsd-dir)
(setq autoload-file (concat emacsd-dir "loaddefs.el"))
(setq package-user-dir (concat emacsd-dir "elpa"))
(setq custom-file (concat emacsd-dir "custom.el"))
#+END_SRC
** System name
#+BEGIN_SRC emacs-lisp
(if (eq system-type 'darwin)
(setq system-name (car (split-string system-name "\\."))))
#+END_SRC
** Internationalization
Global environment
#+BEGIN_SRC emacs-lisp
(setenv "LANG" "en_US.UTF-8")
#+END_SRC
To make sure dates are in English
#+BEGIN_SRC emacs-lisp
(setq system-time-locale "C")
#+END_SRC
* Hush
#+BEGIN_SRC emacs-lisp
;; Don't use messages that you don't read
(setq initial-scratch-message "")
(setq inhibit-startup-message t)
#+END_SRC
I'm also hiding the startup echo area message using this:
(customize-option 'inhibit-startup-echo-area-message)
--8<---------------cut here---------------end--------------->8---
Hope this helps,
Alan
- porting crufty old init.el to package management, Tom Roche, 2014/03/23
- Re: porting crufty old init.el to package management, Fabrice Niessen, 2014/03/24
- Re: porting crufty old init.el to package management, Guido Van Hoecke, 2014/03/24
- Message not available
- Re: porting crufty old init.el to package management, Fabrice Niessen, 2014/03/24
- Re: porting crufty old init.el to package management, Guido Van Hoecke, 2014/03/24
- Message not available
- Re: porting crufty old init.el to package management, Fabrice Niessen, 2014/03/24
- Re: porting crufty old init.el to package management, Guido Van Hoecke, 2014/03/24
- Message not available
- Re: porting crufty old init.el to package management, Fabrice Niessen, 2014/03/24
- Re: porting crufty old init.el to package management, Stefan, 2014/03/24
- Re: porting crufty old init.el to package management, Guido Van Hoecke, 2014/03/25
porting crufty old init.el to package management, Barry OReilly, 2014/03/24