From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: Selecting diferent init file from command switch
Date: Sun, 24 Aug 2008 19:22:58 +0200 [thread overview]
Message-ID: <87myj2uy31.fsf@hubble.informatimago.com> (raw)
In-Reply-To: mailman.17464.1219595022.18990.help-gnu-emacs@gnu.org
David Hansen <david.hansen@gmx.net> writes:
>> So I created 2 different init files: .emacs-ide, .emacs-editor!
>>
>> But I do I tell emacs, that it should not loa ~/.emacs but i.E.
>> ~/.emacs-ide???
>
> You can set $HOME to get emacs load a ".emacs" from another directory.
I would rather propose a different solution.
You can have one ~/.emacs that will check the command-line-args
variable for arguments specific to each usage:
(let ((pname (file-namestring (first command-line-args))))
(cond
((string= "emacs-ide" pname)
;; do ide specific initialization
)
((string= "emacs-quick-edit" pname)
;; do quick-edit specific initialization
)
(t
;; do default emacs specific initialization
)))
and use symbolic links to emacs named emacs-ide and emacs-quick-edit.
If you really want to keep your initializations in different files,
then you can use in ~/.emacs:
(let ((pname (file-namestring (first command-line-args))))
(cond
((string= pname "emacs")
;; do default emacs specific initialization
)
(t
(load (format nil "~/.%s" pname)))))
--
__Pascal Bourguignon__ http://www.informatimago.com/
"This statement is false." In Lisp: (defun Q () (eq nil (Q)))
next prev parent reply other threads:[~2008-08-24 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-24 10:48 Selecting diferent init file from command switch TheLonelyStar
2008-08-24 11:36 ` Bernardo Bacic
2008-08-24 12:11 ` Peter Dyballa
2008-08-24 16:15 ` David Hansen
[not found] ` <mailman.17464.1219595022.18990.help-gnu-emacs@gnu.org>
2008-08-24 17:22 ` Pascal J. Bourguignon [this message]
[not found] <mailman.17457.1219574924.18990.help-gnu-emacs@gnu.org>
2008-08-24 19:05 ` Chat
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=87myj2uy31.fsf@hubble.informatimago.com \
--to=pjb@informatimago.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.