Skip to content

Commit

Permalink
Rename .emacs if it exists in the installer(#1037)
Browse files Browse the repository at this point in the history
If user has a $HOME/.emacs file, the prelude installer script
will install just fine, but when starting emacs, nothing will
take effect because emacs doesn't load .emacs.d/init.el if .emacs
exists. Because this is confusing for new users, the installer should
default to renaming this file to make emacs actually load prelude.
  • Loading branch information
presheaf authored and bbatsov committed Oct 2, 2016
1 parent ccedc77 commit 086c389
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/installer.sh
Expand Up @@ -179,6 +179,13 @@ then
printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n"
fi

if [ -f "$HOME/.emacs" ]
then
## If $HOME/.emacs exists, emacs ignores prelude's init.el, so remove it
printf " Backing up the existing $HOME/.emacs to $HOME/.emacs.pre-prelude\n"
mv $HOME/.emacs $HOME/.emacs.pre-prelude
fi

if [ -d "$PRELUDE_INSTALL_DIR" ] || [ -f "$PRELUDE_INSTALL_DIR" ]
then
# Existing file/directory found -> backup
Expand Down

0 comments on commit 086c389

Please sign in to comment.