 (defvar home-directory)
 (setq home-directory default-directory)
 
+(if (or
+		 (string-equal (getenv "EMACS_USER_DIRECTORY") nil)
+		 (string-equal (getenv "EMACS_USER_DIRECTORY") "")
+		 )
+		()
+	(setq user-emacs-directory
+				(expand-file-name (concat (getenv "EMACS_USER_DIRECTORY") "/"))))
+
 ;; set path to settings
 (defvar settings-dir)
 (setq settings-dir

(setq lisp-dir
      (expand-file-name "lisp" user-emacs-directory))
(add-to-list 'load-path lisp-dir)

;; set path to wemacs folder with additional third-party software
(defvar wemacs-dir)
(setq wemacs-dir
      (expand-file-name "ownCloud/wemacs" home-directory))


;; set path to notes directory
(defvar notes-dir)

    (load custom-file)
  (message "Warning: custom.el not found.")
)

;;==========================================================
;;      PACKAGE MANAGEMENT
