bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15539: Setting user-emacs-directory at command line invocation


From: François Févotte
Subject: bug#15539: Setting user-emacs-directory at command line invocation
Date: Fri, 13 Mar 2015 16:01:55 +0100

Hello,

attached is a patch which tries to implement the desired feature. It should apply cleanly atop master (b91eafe31a524b391d5cec079cf8f36c2f9d5f30)

With this patch, emacs accepts a new command line argument:
    --user-emacs-directory=DIR
which has two effects:
1. it sets the `user-emacs-directory' variable to DIR (instead of the default "~/.emacs.d")
2. it looks for the init file in DIR/init.el (and only there: ~/.emacs & co are bypassed)

This doesn't impact anything else in emacs' startup sequence.

Implementationwise, I'm not very proud of having to define a new global variable, but I fail to see how to do otherwise, except maybe wrapping the whole `command-line' function in a let form to use a local binding.

Please do not hesitate to criticize or ask me for any modification which would be desirable. This is the first patch I propose to emacs; I don't expect to have it right on the first try.

Thanks in advance,

    François

Attachment: 0001-Add-a-user-emacs-directory-command-line-option.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]