emacs-init-file-errors.html 2.9 KB

1234567891011121314
  1. <!DOCTYPE html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><meta name="keywords" content="GNU, Emacs, Libre Software, Hurd, Guile, Guix" /><meta name="description" content="GNUcode.me is a website focusing on libre software projects, especially the GNU project." /><link type="application/atom+xml" rel="alternate" title="GNUcode.me -- Feed" href="/feed.xml" /><a rel="me" href="https://fosstodon.org/@thegnuguy"></a><link type="text/css" href="css/footer.min.css" rel="stylesheet"></link><link type="text/css" href="css/header.min.css" rel="stylesheet"></link><link type="text/css" href="css/main.min.css" rel="stylesheet"></link><title>Emacs Init File Errors — GNUcode.me</title></head><body><header><nav><ul><li><a href="index.html">GNUcode.me</a></li><li><a href="services.html">Services</a></li><li><a href="about.html">About</a></li><li><a href="business-ideas.html">Business-ideas</a></li></ul></nav></header><h1>Emacs Init File Errors</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — May 13, 2018</h3><div><p>This morning, I was rummaging through my emacs init files, and I was noticing
  2. that as emacs started up, it seemed to be opening a lot of files.</p><blockquote><p>&quot;Hmmm, am I using desktop-save-mode?&quot;  I wondered.</p></blockquote><p>Desktop-save-mode is an emacs mode that saves your emacs session.  It remembers,
  3. which files you had opened, point's location in the files, etc.   When you open
  4. emacs again, emacs opens just the way you had it the last time. It can be kind
  5. of nice, but it can also make emacs slow to start.</p><p>So I was noticing that when I started emacs, it was taking opening a ton of
  6. files, and wasting a lot of time doing so.  So I looked through my init file and
  7. found that I was NOT using desktop-save-mode.  So something else was causing
  8. this.</p><p>I had to find the error the hard way: I commented more than half of my init
  9. file. Then I shut down emacs.  Restarted.  Then I un-commented out one line. 
  10. Shut off emacs restarted. Repeat.  I finally found the culprit:
  11. <code>(add-hook 'after-init-hook 'org-agenda-list)</code></p><p>Basically after my Emacs load, org-mode is opening lots of files to build the
  12. agenda.  It had to open 15 files!  And I only needed two of those files to build
  13. the agenda!  So I removed several files from the org-agenda-files variable and
  14. that solved the problem.  Onto the next issue with my emacs config files!</p></div></article></section></main><footer><p>© 2020 Joshua Branson. The text on this site is free culture under the Creative Commons Attribution Share-Alike 4.0 International license.</p><p>This website is build with Haunt, a static site generator written in Guile Scheme. Source code is <a href="https://notabug.org/jbranso/gnucode.me">available.</a></p><p>The color theme of this website is based off of the famous <a href="#3f3f3f" target="_blank">zenburn</a> theme.</p></footer></body>