Earlier quoted context omitted.
I start Emacs every few minutes, for Org mode notes.
You do not have to start a new instance of Emacs every time. You can tell emacs to start a server and then use emacsclient to connect to your already running instance of emacs.
A vision of a multi-threaded Emacs
111–120 of 136 posts
Re: A vision of a multi-threaded Emacs
#112Earlier quoted context omitted.
Why do you quit though? I don’t quit other programs... why is Emacs different?
I quit and restart Vim dozens of times daily. I’m not saying there’s something wrong with leaving Emacs running. But it’s a workaround. When I used Emacs, startup time was not a problem. But I didn’t use a bunch of packages.
Re: A vision of a multi-threaded Emacs
#113Earlier quoted context omitted.
A no-config Emacs has a rapid startup time - it's instant on my PC. > or an acceptance of “fit your workflow around Emacs” than it is truly a solution, which would be to reduce startup times. I don't see a problem with this. Emacs is a general purpose platform, and it's silly to expect really fast startup times if you're using it as a general purpose platform. People aren't expecting Linux to have an instant startup…
Actually, reducing OS startup time used to be a goal. I think that stock Ubuntu on run-of-the-mill hardware (spinning rust) was down to 14 seconds bios-to-login at some point when they made an effort on that front.
Re: A vision of a multi-threaded Emacs
#114Earlier quoted context omitted.
That multi-threading will solve this issue, is a common misconception. Emacs already supports asynchronous I/O and has sentinels for exactly that. However, not everything that runs on Emacs is taking advantage of that functionality. It is therefore up to you, to use the proper package (or not use the wrong one) / configure Emacs in such a way, so that this sort of issue is avoided. I can definitely say that if you're…
I just got into emacs last year, for Org mode. Startup times drive me crazy. What would be the correct way to configure my .emacs file to e.g. check for package updates in a background process?
Re: A vision of a multi-threaded Emacs
#115Earlier quoted context omitted.
Don't check for package updates during startup? Setup a cron job to upgrade the packages while you are asleep?
It seems that Emacs does the check automatically, no? I have looked briefly on how to disable that but I didn't have the prerequisite knowledge at the time to understand what was happening. I'll look at that again, thank you.
Re: A vision of a multi-threaded Emacs
#116Re: A vision of a multi-threaded Emacs
#117Earlier quoted context omitted.
My biggest pet-peeve is Org freezing when I'm exporting to PDF.
I've had that fixed in the past by simply adding an ampersand to org's compile command. This does make it run in the background but makes it ring the bell a number of times. Now when I'm editing and want to see the compiled pdf side by side I just start a bash while loop that recompiles continually with latexmk.
Re: A vision of a multi-threaded Emacs
#118Earlier quoted context omitted.
You should use `use-package` to manage your packages and defer their loading to when you use them. I have over 100 packages in my init.el and my Emacs loads in less than a second.
Thank you. I'm not using many packages, so I'm not sure what to change. Using csv for example: $ grep csv ~/.emacs '(package-selected-packages '(csv-mode org-evil dash))) If I want evil all the time but csv only when needed, I should change that to the following? '(package-selected-packages '(org-evil dash))) '(use-package '(csv-mode)))
(use-package org-evil :ensure t ;; download if not present :defer t ;; defer loading hook (org-mode . org-evil-mode)) ;; start this mode in org buffers
(use-package csv :ensure t :defer t) ;; modes are usually smart enough to know in which buffer they start
and so on for all your packages. If you NEED something to start when Emacs open, you can remove the `:defer t` macro. There are also other useful things like `:init` `:config` `custom`, you should check out the docs!
Re: A vision of a multi-threaded Emacs
#119Earlier quoted context omitted.
Use emacsclient and have a emacs server running at all times. Super fast startup times, you can even use emacsclient -nw (or make an alias 'e' for that) in the terminal for fast edits with instantaneous startup. You could also make a script that starts emacs as a client only if a server already is running #!/bin/sh if [ "$#" -eq 0 ] then echo "Starting new Emacs process ..." >&2 nohup emacs > /dev/null 2>&1 & elif em…
This is really “just leave Emacs running all the time,” which is more of a workaround or an acceptance of “fit your workflow around Emacs” than it is truly a solution, which would be to reduce startup times.
I normally never exit Emacs. This is not because of startup time. To me it's like the web browser; I use it all the time, have a workspace dedicated to it and it's natural to keep lots of buffers open. My muscle memory takes care of jumping between open buffers.
Re: A vision of a multi-threaded Emacs
#120Earlier quoted context omitted.
That multi-threading will solve this issue, is a common misconception. Emacs already supports asynchronous I/O and has sentinels for exactly that. However, not everything that runs on Emacs is taking advantage of that functionality. It is therefore up to you, to use the proper package (or not use the wrong one) / configure Emacs in such a way, so that this sort of issue is avoided. I can definitely say that if you're…
For me the most frequent source of freezes was Tramp. It led me to ditch Emacs for VSCode (with the remote editing extension) at least for my dayjob (I still use Emacs for my own projects). Tramp is an official built-in package, so it's not as if I downloaded a random package from GitHub.