From: "Francisco Miguel Colaço" <francisco.colaco@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: An alternative to a monolithic ~/.emacs init file
Date: 11 Nov 2007 00:09:47 GMT [thread overview]
Message-ID: <4736484b$0$25509$a729d347@news.telepac.pt> (raw)
In-Reply-To: 1194544126.425679.261670@e9g2000prf.googlegroups.com
Thu, 08 Nov 2007 11:53:08 -0800, rustom wrote:
> On Nov 8, 6:08 pm, Sebastian Tennant <seb...@smolny.plus.com> wrote:
>> Quoth rustom <rustompm...@gmail.com>:
>>
>> > Could you please elaborate on how this works a little? [...] I
>> > really would like to have a tiny little .emacs file and a bunch of
>> > files and directories containing unrelated stuff
>>
>> If you don't care about autoloads (or you're not sure what they are)
>> and you just want a small ~/.emacs, then all you need is this:
>>
>> ;;; load dotemacs/*.el
>> (mapc (lambda (f) (load f))
>> (split-string
>> (shell-command-to-string "find ~/elisp/dotemacs -name *.el")))
>>
I use the following .emacs:
(set-language-environment "UTF-8")
(setq user-full-name "ABCDE"
user-initials "abc"
user-mail-address "abc@cde.com"
user-dir-library "~/.local/share/emacs"
user-dir-configuration "~/.config/emacs"
user-dir-cache "~/.cache/emacs"
)
(setq load-path (append load-path (expand-file-name user-dir-library)))
;;; Define some needed functions.
(defun user-conf-filename (filename)
"Gets the path of a configuration file, whose name is given.
FILENAME is path appended to 'user-dir-configuration'.
"
(concat user-dir-configuration "/" filename))
;;; Load the user configuration.
(load (user-conf-filename "conf-user.el"))
Well, this puts all files within ~/.config/emacs. Even ~/.emacs is a
symlink to ~/.config/emacs/dotemacs. This way:
1. I can zip all my emacs configuration by zipping one directory.
2. all I have to do is put in conf-user.el expressions like:
(load (user-conf-filename "conf-fonts.el"))
Of couse, I also maintain custom.el in the ~/.config/emacs directory by
issuing, in .config/emacs/conf-user.el:
(setq custom-file (user-conf-filename "custom.el"))
(load custom-file)
and all the emacs-specific files like ~/.projects.ede are moved intyo
the directory by issuing the correspondent customize commands or setting
their names in .emacs
Works like a charm.
Francisco Colaço
next prev parent reply other threads:[~2007-11-11 0:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2759.1193756709.18990.help-gnu-emacs@gnu.org>
2007-11-07 17:13 ` An alternative to a monolithic ~/.emacs init file rustom
2007-11-08 13:08 ` Sebastian Tennant
[not found] ` <mailman.3126.1194527313.18990.help-gnu-emacs@gnu.org>
2007-11-08 19:53 ` rustom
2007-11-09 14:18 ` Sebastian Tennant
[not found] ` <mailman.3180.1194617919.18990.help-gnu-emacs@gnu.org>
2007-11-10 12:18 ` rustom
2007-11-10 17:13 ` Tom Tromey
[not found] ` <mailman.3247.1194750639.18990.help-gnu-emacs@gnu.org>
2007-11-11 15:29 ` rustom
2007-11-12 21:56 ` Tim X
2007-11-13 4:21 ` rustom
2007-11-13 9:26 ` Tim X
2007-11-14 3:52 ` rustom
2007-11-13 1:22 ` rustom
2007-11-11 0:09 ` Francisco Miguel Colaço [this message]
2007-10-30 15:04 Sebastian Tennant
2007-10-30 20:30 ` Sebastian Tennant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='4736484b$0$25509$a729d347@news.telepac.pt' \
--to=francisco.colaco@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.