From: "Tim O'Callaghan" <tim.ocallaghan@gmail.com>
To: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Re: R: WISH: separate org-mode customization file
Date: Thu, 3 Jul 2008 00:14:44 +0200 [thread overview]
Message-ID: <3d6808890807021514s602ad28eg745fab7afa626c4b@mail.gmail.com> (raw)
In-Reply-To: <b71b18520807021450u1cc3f24bt99a7a21957ca91a2@mail.gmail.com>
Its usable. In fact i'm still using it. I had forgotten i had posted
it into the emacswiki.
Here is my approach. The first thing to do is to consodate your emacs
directories into one place.
my .emacs contains this one instruction:
(load (expand-file-name (concat "~/.emacsen_d/init")))
On linux/unix ~/ is obvious. On Windows (x)emacs interprets the
environmental variable %HOME% as ~.
You can set this under Settings->Control
Panel->System->Advanced(tab)->Environmental Variables (Button)
In the user variables i have HOME set to C:\home\tim.
This load instruction then loads "c:\home\tim\.emacsen_d\init.el" under windows.
It should be noted that cygwin also uses this variable to find your
home directory, so you can have a windows and linux .bashrc too, but
that is another topic.
I use xemacs and emacs, on windows and linux, so my config files can
be a bit crowded. here is a cut down version of the init.el loaded
above:
----- my cut down emacs config -----
;; catch any initial errors
(setq debug-on-error t)
;; do not offer migration to xemacs
(custom-set-variables '(load-home-init-file t t))
;;;;;;;;;;;;;;;;;;;; set globals, and load init util functions
;;;;;;;;;;;;;;;;;;;;;;;
;; to ensure customsation is in one place
(setq custom-file "~/.emacsen_d/custom.el")
;;(load custom-file)
;; default (x)emacs main directory
(defconst toc:emacsen-dir "~/.emacsen_d/" "Path to init.el directory")
(setq user-emacs-directory toc:emacsen-dir)
;; default (x)emacs configuration directory
(defconst toc:emacsen-config-dir "~/.emacsen_d/configs/"
"Path to emacsen configuration fragments")
;; default machine (x)emacs configuration directory
(defconst toc:emacsen-machine-config-dir
"~/.emacsen_d/configs/machine_configs/"
"Path to emacsen machine specific configuration fragments")
;; default (x)emacs site lisp directory
(defconst toc:emacsen-site-lisp-dir "~/.emacsen_d/site-lisp/" "Path to
emacsen lisp includes")
;; load named+saved keyboard macros
(load (expand-file-name (concat toc:emacsen-dir "toc-macros")))
;; load elisp utility functions
(load (expand-file-name (concat toc:emacsen-dir "toc-util-fns")))
;; snipped from toc-util-fns for context
;; utility finction to auto-load my package configurations
(defun toc:load-config-file (filelist)
(dolist (file filelist)
(load (expand-file-name
(concat toc:emacsen-config-dir file)))
(message "Loaded config file:%s" file)
))
;; utility finction to auto-load my package configurations
(defun toc:load-machine-config-file nil
(interactive)
(setq machine-file (expand-file-name
(concat toc:emacsen-machine-config-dir (getenv
"COMPUTERNAME") ".el")))
(cond ((file-exists-p machine-file)
(load machine-file)
(message "Loaded config file:%s" file)))
)
;;;;;;;;;;;;;;;;;;;; personal usibility customisations ;;;;;;;;;;;;;;;;;;;;;;;
;; set up initial load path
(toc:add-to-load-path '(""))
;; startup at home
(progn (cd "~"))
;; make the y or n suffice for a yes or no question
(fset 'yes-or-no-p 'y-or-n-p)
;; setting the defualt tab expansion size
(setq default-tab-width 8)
;; ensure that all tabs are created as spaces.
(setq-default indent-tabs-mode nil)
;; loose the startup message
(setq inhibit-startup-message t)
;; ensure messages are kept
(setq message-log-max t)
;; So I always have the proper number of parenthesis
(cond ((featurep 'xemacs)
(paren-set-mode 'paren))
((featurep 'emacs)
(show-paren-mode 1)))
;; So gnuserv works
(cond ((featurep 'emacs)
(server-start)))
;; allow multiple minibuffers
(setq minibuffer-max-depth nil)
;; So we can see pound signs ok
(if (featurep 'xemacs)
(standard-display-european t))
(if (featurep 'emacs)
(prefer-coding-system 'utf-8))
;; highlighting regions and delete.
(delete-selection-mode)
(if (featurep 'xemacs)
(setq zmacs-regions t)
(transient-mark-mode 1))
;; set the colors and frame properties
(toc:load-config-file '("frames_config"
"keymaps_config"
"colour-theme_config"))
;; set any platform/(x)emacs specific properties
;; such as executbale paths, env variables and
;; info paths
(cond
((eq system-type 'windows-nt)
(toc:load-config-file '("win2k_config"))
)
;; otherwise try for maximum screenage
(t
(toc:load-config-file '("linux_config"))
))
;; load my configuration defaults
(toc:load-config-file '(
;; ediff files
"ediff_config"
;; set up session and dektop handling
"desktop_config"
;; set up remote file handling
"backup_config"
"modemaps_config"
"eshell-dired_config"
;; for ecb and suchlike
"ecb_config"
"speedbar_config"
;; for Xml & html & other mixed modes
"mmm_modes_config"
"xml_config"
;; spelling config.
"spell_config"
;; bookmarks config.
"bookmark_config"
;; XEmacs packages config.
"Xpackages_config"
;; pim config
; "personal_muse_settings"
; "elsevier_muse_settings"
"diary_config"
;; muse
; "muse_config"
;; planner-muse
; "planner-muse-remember_config"
;; org-remember
"org-remember_config"
;; web browser config
;; "w3_config" ;; rolled into org
;; mail user agent.
; "mutt_config"
; "gnus_config"
; "mew_config"
; "wanderlust_config"
;; work/machine specific config.
"tramp_efs_angeftp_config"
"elsevier_config"
; "lime_config"
; "telfort_config"
;; Java developmetn
"jde_config"
;; Perl Development
; "pde_config"
; "perlysense_config"
;; programming specific configs.
; "sqlmode_config"
; "template_config"
"doxygen_config"
"OOabrevs"
;; thumbs config
; "dired_thumbs_config"
;; final settings
"info_config"
"fontlock-face_config"
;; filladapt config
; "filladapt_config"
;; symbian programming config
"symbian_config"
;; Printing config
"printer_config"
))
;;
;; The things to do at the end of the init process..
;;
;; load machine specific configs
(toc:load-machine-config-file)
;; call frame maximuze post init:
(toc:post-init)
;; turn off debugging
(setq debug-on-error nil)
----- end of cut down emacs config -----
Feel free to ask questions if you dont get it.
Tim.
2008/7/2 Eddward DeVilla <eddward@gmail.com>:
> On Tue, Jul 1, 2008 at 1:21 PM, Harri Kiiskinen <harkiisk@utu.fi> wrote:
>> Thank you all for the answers, but it seems that I was not quite clear
>> enough. I'm quite able to set the 'custom-file' to whatever I want, and
>> I can (load "myconfig.el") - which is what I currently do. Lets restate
>> the problem:
>>
>> 1. I cannot and do not want to share _all_ customizations, since many of
>> them are system specific - absolute paths, modes which function on Linux
>> but not on XP (e.g. whizzy-tex), face settings etc.
>> 2. I want to share org-mode customization, which is system independent,
>> in my case. This I can do with (load "myconfig.el"), but the file has to
>> be edited by hand, as the Emacs Customize for org-mode saves everything
>> where 'custom-file' points to.
>> 3. If I set 'custom-file' to "myconfig.el", then I contradict no. 1.
>>
> Sorry for not responding sooner. I've had init split
> (http://www.emacswiki.org/cgi-bin/wiki/InitSplit) suggested to me for
> the same problem. The thread might be in the archive. I haven't had
> a chance to set this up yet, so I can say if it is really usable.
>
> Edd
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
next prev parent reply other threads:[~2008-07-02 22:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 12:19 WISH: separate org-mode customization file Harri Kiiskinen
2008-07-01 12:30 ` R: " Giovanni Ridolfi
2008-07-01 14:19 ` Manish
2008-07-01 14:53 ` Bernt Hansen
2008-07-01 18:21 ` Harri Kiiskinen
2008-07-01 20:26 ` John Rakestraw
2008-07-02 2:08 ` Sebastian Rose
2008-07-02 21:50 ` Eddward DeVilla
2008-07-02 22:14 ` Tim O'Callaghan [this message]
2008-07-04 11:57 ` Harri Kiiskinen
2008-07-01 15:04 ` Giovanni Ridolfi
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d6808890807021514s602ad28eg745fab7afa626c4b@mail.gmail.com \
--to=tim.ocallaghan@gmail.com \
--cc=emacs-orgmode@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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).