all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Starting Emacs with different init file
  2003-10-28 17:20 Joachim Nilsson
@ 2003-10-28 17:20 ` Raimund Kohl-Fuechsle
  2003-10-28 17:32 ` Dan Anderson
  1 sibling, 0 replies; 7+ messages in thread
From: Raimund Kohl-Fuechsle @ 2003-10-28 17:20 UTC (permalink / raw)
  Cc: help-gnu-emacs

On Tue, 28 Oct 2003, Joachim Nilsson wrote:

>
> Hello Emacs lovers!
>
>
> I want to use different .emacs init files for different projects. This
> mostly because my lisp-fu is weak. The various startup-options I found
> does not seem to support:

don't know if that helps, but I created (on a Linux machine) an extra
user especialy for that purpose and call emacs like

emacs -u other_user

ray

-- 
		       Raimund Kohl Consulting
	       Kommunikative Praktizierungskonzepte und
	     Business-Dienstleistungen für Heilpraktiker
		 Schlesierstr. 19 * 67112 Mutterstadt
       T: 06234-929329 * F: 06234-929267 * e: info@nabuli.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Starting Emacs with different init file
@ 2003-10-28 17:20 Joachim Nilsson
  2003-10-28 17:20 ` Raimund Kohl-Fuechsle
  2003-10-28 17:32 ` Dan Anderson
  0 siblings, 2 replies; 7+ messages in thread
From: Joachim Nilsson @ 2003-10-28 17:20 UTC (permalink / raw)



Hello Emacs lovers!


I want to use different .emacs init files for different projects. This 
mostly because my lisp-fu is weak. The various startup-options I found 
does not seem to support:

--init-file=~/Projects/.emacs
--init-file=~/Work/Project/Customer1/.emacs
--init-file=~/Work/Project/Customer2/.emacs
--init-file=~/Work/Project/Customer3/.emacs

etc.

Is it planned *not* to support this scheme or is it merely an obvious 
oversight? I'm aware that this is probably easily fixed with some elisp 
magic, but I think more people than I could use it.


Regards
  /Joachim

-- 
Joachim Nilsson :: <joachim AT vmlinux DOT org>
+46(0)21-123348 :: <http://vmlinux.org/joachim/>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Starting Emacs with different init file
  2003-10-28 17:20 Joachim Nilsson
  2003-10-28 17:20 ` Raimund Kohl-Fuechsle
@ 2003-10-28 17:32 ` Dan Anderson
  2003-10-28 17:46   ` Joachim Nilsson
       [not found]   ` <mailman.2613.1067363441.21628.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 7+ messages in thread
From: Dan Anderson @ 2003-10-28 17:32 UTC (permalink / raw)
  Cc: help-gnu-emacs

You could leave an empty .emacs file on your main file, and then M-x
load-file RET filename to load the .emacs file from the directory, but
that would probably be more trouble then it's worth.

I wonder if you did something like:

(load-file "./.emacs")

in your .emacs, would that work?

-Dan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Starting Emacs with different init file
  2003-10-28 17:32 ` Dan Anderson
@ 2003-10-28 17:46   ` Joachim Nilsson
       [not found]   ` <mailman.2613.1067363441.21628.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Joachim Nilsson @ 2003-10-28 17:46 UTC (permalink / raw)
  Cc: help-gnu-emacs, Joachim Nilsson

Dan Anderson wrote:
> You could leave an empty .emacs file on your main file, and then M-x
> load-file RET filename to load the .emacs file from the directory, but
> that would probably be more trouble then it's worth.

Yep.

> I wonder if you did something like:
> (load-file "./.emacs")
> in your .emacs, would that work?

That did the trick!

Now, if only I knew how to traverse up the dir tree from where I start
emacs and let it take the first init file one it finds until it reaches
$HOME/.emacs-default. Like this:

~/Work/Projects/Customer_One/Product_Series1/SW/src/
~/Work/Projects/Customer_One/Product_Series1/SW/
~/Work/Projects/Customer_One/Product_Series1/
~/Work/Projects/Customer_One/.emacs

or

~/Work/Projects/Customer_Two/Productum/HW/vhdl/
~/Work/Projects/Customer_Two/Productum/HW/
~/Work/Projects/Customer_Two/Productum/
~/Work/Projects/Customer_Two/
~/Work/Projects/
~/Work/
~/.emacs-default

Looks like a recursive problem to me, and maybe even something I can put 
together myself even.


Thanks!
  /Joachim

-- 
Joachim Nilsson :: <joachim AT vmlinux DOT org>
+46(0)21-123348 :: <http://vmlinux.org/joachim/>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Starting Emacs with different init file
       [not found] <mailman.2609.1067362003.21628.help-gnu-emacs@gnu.org>
@ 2003-10-28 18:00 ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2003-10-28 18:00 UTC (permalink / raw)


> I want to use different .emacs init files for different
> projects. This mostly because my lisp-fu is weak.

        emacs -l ~/Projects/.emacs

This will load both ~/.emacs and ~/Projects/.emacs.
If you only want the latter, then use:

        emacs -q -l ~/Projects/.emacs

But maybe improving your lisp-fu is the way of wisdom,


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Starting Emacs with different init file
       [not found]   ` <mailman.2613.1067363441.21628.help-gnu-emacs@gnu.org>
@ 2003-10-28 19:40     ` Kevin Rodgers
  2003-10-29  7:18     ` Tim X
  1 sibling, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2003-10-28 19:40 UTC (permalink / raw)


Joachim Nilsson wrote:

> Now, if only I knew how to traverse up the dir tree from where I start
> emacs and let it take the first init file one it finds until it reaches
> $HOME/.emacs-default. Like this:
> 
> ~/Work/Projects/Customer_One/Product_Series1/SW/src/
> ~/Work/Projects/Customer_One/Product_Series1/SW/
> ~/Work/Projects/Customer_One/Product_Series1/
> ~/Work/Projects/Customer_One/.emacs
> 
> or
> 
> ~/Work/Projects/Customer_Two/Productum/HW/vhdl/
> ~/Work/Projects/Customer_Two/Productum/HW/
> ~/Work/Projects/Customer_Two/Productum/
> ~/Work/Projects/Customer_Two/
> ~/Work/Projects/
> ~/Work/
> ~/.emacs-default
> 
> Looks like a recursive problem to me, and maybe even something I can put 
> together myself even.

It's already been done for you!

http://www.emacswiki.org/cgi-bin/wiki/ProjectSettings

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Starting Emacs with different init file
       [not found]   ` <mailman.2613.1067363441.21628.help-gnu-emacs@gnu.org>
  2003-10-28 19:40     ` Kevin Rodgers
@ 2003-10-29  7:18     ` Tim X
  1 sibling, 0 replies; 7+ messages in thread
From: Tim X @ 2003-10-29  7:18 UTC (permalink / raw)


>>>>> "Joachim" == Joachim Nilsson <joachim@vmlinux.org> writes:

 Joachim> Dan Anderson wrote:
 >> You could leave an empty .emacs file on your main file, and then
 >> M-x load-file RET filename to load the .emacs file from the
 >> directory, but that would probably be more trouble then it's
 >> worth.

 Joachim> Yep.

 >> I wonder if you did something like: (load-file "./.emacs") in your
 >> .emacs, would that work?

 Joachim> That did the trick!

 Joachim> Now, if only I knew how to traverse up the dir tree from
 Joachim> where I start emacs and let it take the first init file one
 Joachim> it finds until it reaches $HOME/.emacs-default. Like this:

 Joachim> ~/Work/Projects/Customer_One/Product_Series1/SW/src/
 Joachim> ~/Work/Projects/Customer_One/Product_Series1/SW/
 Joachim> ~/Work/Projects/Customer_One/Product_Series1/
 Joachim> ~/Work/Projects/Customer_One/.emacs

 Joachim> or

 Joachim> ~/Work/Projects/Customer_Two/Productum/HW/vhdl/
 Joachim> ~/Work/Projects/Customer_Two/Productum/HW/
 Joachim> ~/Work/Projects/Customer_Two/Productum/
 Joachim> ~/Work/Projects/Customer_Two/ ~/Work/Projects/ ~/Work/
 Joachim> ~/.emacs-default

 Joachim> Looks like a recursive problem to me, and maybe even
 Joachim> something I can put together myself even.

What is it about the different projects/jobs that requires totally
different init files? I suspect there is a much better solution, but
without knowing what it is you need different for the various
projects, its impossible to make any suggestion.

Tim




-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-10-29  7:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2609.1067362003.21628.help-gnu-emacs@gnu.org>
2003-10-28 18:00 ` Starting Emacs with different init file Stefan Monnier
2003-10-28 17:20 Joachim Nilsson
2003-10-28 17:20 ` Raimund Kohl-Fuechsle
2003-10-28 17:32 ` Dan Anderson
2003-10-28 17:46   ` Joachim Nilsson
     [not found]   ` <mailman.2613.1067363441.21628.help-gnu-emacs@gnu.org>
2003-10-28 19:40     ` Kevin Rodgers
2003-10-29  7:18     ` Tim X

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.