From: Robert Marshall <spam@chezmarshall.freeserve.co.uk>
Subject: Re: loading specific .emacs file on command line?
Date: Fri, 14 Feb 2003 06:59:05 +0000 [thread overview]
Message-ID: <m18ywjs5za.fsf@chezmarshall.freeserve.co.uk> (raw)
In-Reply-To: 3E4C229B.6040905@ihs.com
On Thu, 13 Feb 2003, kevin.rodgers@ihs.com wrote:
> You could break your .emacs file into multiple *.el files,
> byte-compile them if you want, and either load them from your .emacs
> file:
>
> (if foo
> (load-file "~/foo"))
> (if bar
> (load-file "~/bar"))
>
> or load them explicitly on the command line:
>
> emacs
> emacs -l ~/foo
Or for another approach - having broken up the emacs file I use the
name parameter on the command line and use the following defun
(defun rajm-get-emacs-class ()
(let ((emacs-class
(cdr (assoc 'name initial-frame-alist))))
(cond
((not emacs-class) 'full-class)
((string-equal "VM" emacs-class) 'vm-class)
((string-equal "rajm" emacs-class) 'full-class)
((string-equal "Root" emacs-class) 'root-class)
((string-equal "Gnus" emacs-class) 'fs-agent-class)
((string-equal "default" emacs-class) 'nil)
(t 'remote-class))))
(defvar rajm-emacs-class (rajm-get-emacs-class))
And then load files in .emacs based upon rajm-emacs-class
Robert
--
Take me to the world
A world that smiles
With streets instead of aisles
next prev parent reply other threads:[~2003-02-14 6:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1955.1045171264.21513.help-gnu-emacs@gnu.org>
2003-02-13 21:36 ` loading specific .emacs file on command line? Edward O'Connor
2003-02-13 22:56 ` Kevin Rodgers
2003-02-14 6:59 ` Robert Marshall [this message]
2003-02-14 18:05 ` Kevin Rodgers
2003-02-13 21:20 john doe
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=m18ywjs5za.fsf@chezmarshall.freeserve.co.uk \
--to=spam@chezmarshall.freeserve.co.uk \
--cc=robert@chezmarshall.freeserve.co.uk \
/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.