LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Emacs custom init file (https://www.linuxquestions.org/questions/linux-software-2/emacs-custom-init-file-4175449551/)

spirit1988 02-10-2013 10:20 AM

Emacs custom init file
 
Hi! I want to know if it's possibly to have multiple .emacs files (i.e. .emacs.full, .emacs.clean, etc.) for different "profiles". I use Emacs for programming, with ECB and alot of modes, but I use Emacs too for writting and for default command line Editor. I don't want to load ECB every time I want to do a git commit, or I want to write something for my blog.

I tried this:

emacs -q -l "/home/bizancio/.emacs.full"

But the initialization hooks are not executed. I know I have the -u option, but I want to specify the .emacs path (I don't have a "full" user, or a "writter" user).

I know I could do this making a really ugly hack with symbolic links and command line scripts, but I would like a simpler solution.

mina86 02-11-2013 08:12 AM

Have you tried that command without -q switch?

However, you should take a look at Emacs server since with it you can have one Emacs instance running all the time and do all editing in it including writing git commit message (it can run in the terminal if you want).

spirit1988 02-11-2013 09:33 AM

Hi mina86, thanks for your answer!

Without -q switch .emacs file is executed. Is not what I want. I didn't use Emacs server yet.. I probably should take a look at that.

I finally added a custom command line param (--profile) to my .emacs file. Depending on that param's value I'm loading some modules or not, using command-switch-alist.


All times are GMT -5. The time now is 03:57 PM.