Emacs Problems: Can't Post

My Emacs is temporarily broken because of a Melpa/use-package problem. It looks like the problem will be resolved when the current Melpa build cycle completes and if so, I will deliver today's wisdom then.

This entry was posted in Administrivia. Bookmark the permalink.
  • Phil

    If you can't trivially roll back your Emacs config to a working state, I would politely suggest that you're doing it wrong. Making yourself dependent on the state of upstream repositories is a bad idea, IMHO.

    • jcs

      So true--it's all part of life on the edge. Usually when something like this happens, I just disable the affected package for a day until it gets updated (a trivial rollback). The problem with use-package is that it's "foundational" in the sense that it controls the loading of my entire environment.

      Even so, I could have cloned the use-package GitHub repository, checked out the previous version, and pointed my init.el at it. Does that count as a trivial rollback? Regardless, I was too lazy to do that and opted to wait for MELPA.

      • jcs

        And, really, how do you easily handle rolling back a broken package? You could, I suppose, keep a clone of each package's repository locally and point your init.el at those. Then it really is trivial to roll back but that seems like a lot a effort for an infrequent problem. Of course, John Wiegley does something like that so it's not completely crazy. The problem is that then you give up all the benefits of the package manager. Maybe the package manager should back up the last version before it updates.

        • Phil

          My entire Emacs config is in a single git repo, which means I can clone the one thing and know I have a working config, and I can roll *any* change back with ease. I've seen people argue against committing ELPA packages to git, but that approach makes no sense to me.

          • jcs

            I started out doing that too. My original idea was to keep all my machines in sync but I didn't want to (essentially) maintain a git repository of all my packages.

            I have to say, though, that your method is making a lot more sense to me today.

          • Phil

            If I used any kind of "automatically update all of my ELPA packages" behaviour, I can imagine wanting that process to take care of automatically committing, as otherwise the maintenance cost might become annoying. As it is, I simply prize stability over most things and consequently I update packages manually when I have a reason to do so, so manual commits to my config repository work just fine. (I tend to equate automatic updates with potential breakage, and err on the side of caution.)

        • Phil

          I was convinced that package.el had an option which determined whether or not the previous version of a given package would be deleted when an upgrade was installed (which therefore provided a manual rollback facility), but I can't find such a thing. I may have imagined it.

  • Nuno M. Salgueiro

    Also broke my Emacs in one of my computers... :(

  • You can always clone the package from the repository, roll back the changes, and load it directly; ideally bisect and help the developer. That's that I did for use-package:
    and the issue was fixed promptly.

  • You can have the convenience of easy package rollbacks with a local Git repo
    initialized in your .emacs.d folder.

    When your Emacs works, and before you update your packages, run:

    cd ~/.emacs.d
    git add .
    git commit -m "Automated versioning"