Search code examples
emacsversionpackagerollbackspacemacs

rollback package version in spacemacs


During the initial spacemacs setup where a completion framework is selected (helm or ivy), packages are installed by default. In the past and at present, a bug exists in one of these packages, removing auto-completion functionality.

My question is: How do I scale back the bugged package version in spacemacs so that this functionality returns? I'm aware a similar question exists for vanilla emacs but I want to make sure I haven't missed any nuances that might exist in spacemacs.


Solution

  • Clone package repo (package url ends with .git):

    git clone https://github.com/<user>/<package-name>.git
    

    Checkout to older version, before bug. Check for older commit:

    cd /path/to/cloned/package
    git log
    

    Checkout:

    git checkout <commit hash>
    

    Copy older package version to local elpa location (package-directory will contain a date in the string):

    /bin/cp -f /path/to/cloned/package/* /path/to/.emacs.d/elpa/<package-directory>/
    

    Remove compiled files:

    rm -f path/to/.emacs.d/elpa/<package-directory>/*.elc
    

    Open up emacs, check for absence of package bug:

    emacs