syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

how to disable check package updating when start spacemacs #9628

Closed kycent closed 7 years ago

kycent commented 7 years ago

Sorry to bother you, i'm a newbie of spacemacs. I noticed that spacemacs will connect to elpa repository and check package updates automatically when i startup spacemacs each time. Is there a way to avoid this? except to delete the elpa repositories configuration in the dot file. thx.

chasinglogic commented 7 years ago

It shouldn't be checking for updates. It is connecting to verify that you don't need to install additional packages (i.e. if you added a layer). Why do you want to disable this behavior?

kycent commented 7 years ago

The problem is that spacemacs will do that every time when startup, even without any change to my dot file. I just want to get faster to open files with emacs. Any way to approach that?

chasinglogic commented 7 years ago

So it has to connect or else it can't tell if it needs to install anything. If the goal is faster startup time I use emacs --daemon and have a few bash aliases for emacsclient. My bash aliases are:

function e() {
    emacsclient -a "" $@
}

function et() {
    e -nw $@
}

(et is for opening in the terminal). You can find more info about running the emacs daemon on the Emacs Wiki: https://www.emacswiki.org/emacs/EmacsAsDaemon which includes info for enabling the daemon on startup. Spacemacs also has a setting that will make it auto start the server and not kill it when you quit. In your .spacemacs look for dotspacemacs-persistent-server and set it to t.

I hope this helps and if this answers your question please don't forget to close the ticket!

sdwolfz commented 7 years ago

@kycent Check your .spacemacs file, you should have a variables there named dotspacemacs-check-for-update. Set it to nil.

dotspacemacs-check-for-update nil
chasinglogic commented 7 years ago

@sdwolf

Per the doc comment:

   ;; If non nil then spacemacs will check for updates at startup
   ;; when the current branch is not `develop'. Note that checking for
   ;; new versions works via git commands, thus it calls GitHub services
   ;; whenever you start Emacs. (default nil)
   dotspacemacs-check-for-update t

That is checking for a new version of spacemacs which doesn't reach out to elpa or effect packages

sdwolfz commented 7 years ago

Oh, my mistake, sorry about that.

kycent commented 7 years ago

@chasinglogic thanks for your suggestion very useful

jpventura commented 3 years ago

@SDWolf @chasinglogic Instead of turning it off, I wish it was possible to run the update check once in a week :thinking:

kkrausse commented 3 years ago

It shouldn't be checking for updates. It is connecting to verify that you don't need to install additional packages (i.e. if you added a layer). Why do you want to disable this behavior?

I very much want to disable this behavior. This ~3-5 seconds can be such a flow ruiner.

qbe commented 2 years ago

i would very much like to declare this issue open

It shouldn't be checking for updates. It is connecting to verify that you don't need to install additional packages (i.e. if you added a layer). Why do you want to disable this behavior?

If the configuration hasn't changed, then spacemacs should not need to check for the need to install additional packages.

All package updates AND package repository checks should ONLY be triggered by the user (possibly asking for package updates after changing the configuration). Everything else is a usability nightmare.

The issue is compounded in its severity by the fact that all package archive refreshing and downloading of packages seems to be done sequentially, leading to terrible throughput due to the slow ramp-up of tcp connection speed . Pacman (as in, the archlinux package manager) 6 added the option for parallel downloads mostly for this reason.

lebensterben commented 2 years ago

@qbe are you on develop branch?

qbe commented 2 years ago

not anymore, its still contacting all configured repos for package archive refreshs on on emacs (server) restart.

danShumway commented 2 years ago

Is the expected behavior not just that it will check for new packages on the develop branch but that it will also install and update packages that are out of date?

For as long as I've been using Spacemacs on develop I've just kind of dealt with the fact that periodically I'd start my computer up and go to launch Spacemacs and it would force me to wait for 5 minutes while it installed a bunch of packages, and 50% of the time I'd end up with an unsusable text editor until I debugged which parts of my configuration needed to be updated. For that reason Spacemacs has always kind of been the least reliable part of any Linux system I run, because it's one of the only programs on my computer where I don't get to choose when it updates, and it semi-regularly ends up blocking me from getting work done.

And I just kind of put up with it because of inertia and laziness, but I assumed there would be a config option to disable it? But reading this issue it sounds like the updates shouldn't have been happening in the first place, it should have just checked if it needed to install new layers? I could be misunderstanding.

It's not 100% clear to me why being on develop would cause Spacemacs to auto-pull new Git commits every time it launches; this would be like Linux running pacman -S firefox every time I launched my browser just because I'm on the developer version of Firefox. I've always just kind of rolled with it, but I won't lie that it's colored my perception of Emacs a little bit, because my impression using Emacs for all these years has been, "you don't run it for stability, sometimes it just breaks behind your back" -- whereas the rest of my Linux system doesn't change unless I tell it to change. I'm here on this thread because I just booted up my editor to get some coding done and the mouse controls no longer work, and I thought, "okay, we'll debug this, but seriously you need to take the 5 minutes to search online and figure out the config option to turn this behavior off."

Reading this issue, I would love to only lose ~3-5 seconds on each startup, that would be fine. And it's possible that I'm bad at searching, but most of the links I find online end up routing back to this issue. Aside from dotspacemacs-check-for-update, is it enough for me to either get off of develop or detach my head? Will this behavior stop if I switch off of develop?


Edit: to be clear, this isn't a complaint. I think an auto-updating behavior is weird, but whatever, not my decision to make. I'm mostly just trying to figure out if I can make this problem go away by switching to master or if (as qbe implies above) it's going to keep happening regardless.