unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Rainer M Krug <Rainer@krugs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How specify on the command line which .emacs to use?
Date: Mon, 07 Sep 2015 10:17:20 +0200	[thread overview]
Message-ID: <m2io7mabjj.fsf@krugs.de> (raw)
In-Reply-To: <8737ysl03f.fsf@debian.uxu> (Emanuel Berg's message of "Sun, 06 Sep 2015 05:04:36 +0200")

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

Emanuel Berg <embe8573@student.uu.se> writes:

> BobD <daycandle@gmail.com> writes:
>
>> Is there a way I can specify on the command line
>> which .emacs file to use?
>
> emacs(1) says:
>
>     -u user, --user user
>             Load user's init file.
>
>> I am now using this command line: runemacs.exe -q -l
>> /Directory/.emacs The "-q" means not to use a .emacs
>> file. The "-l" loads the named file. But the "-q"
>> suppresses saving customizations.
>
> Don't use customize, instead edit the .emacs file(s)
> by hand using any text editor around - why not
> Emacs itself?

Agreed. But sometimes it is necessary to use customizations (or much
easier, or di=one without my knowledge,...).

So I have the following as the last statement in my .emacs file:

,----
| * Load customizations
| Load customizations done through the Customization interface in emacs.
| New customizations will be stored in this file.
| #+begin_src emacs-lisp 
|   (setq custom-file "~/.emacs.d/customfile.el")
|   (load custom-file)
| #+end_src
`----

This should load the customizations, even when using the -q approach
mentioned. And the customizations are in their own file.

Cheers,

Rainer


-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 480 bytes --]

  parent reply	other threads:[~2015-09-07  8:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06  2:02 How specify on the command line which .emacs to use? BobD
2015-09-06  2:41 ` Eli Zaretskii
2015-09-06  3:04 ` Emanuel Berg
2015-09-06 14:29   ` Eli Zaretskii
2015-09-07  8:17   ` Rainer M Krug [this message]
2015-09-07 23:36     ` Emanuel Berg

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2io7mabjj.fsf@krugs.de \
    --to=rainer@krugs.de \
    --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.
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).