GithubHelp home page GithubHelp logo

Comments (5)

daveloyall avatar daveloyall commented on July 19, 2024 1

WORKAROUND

After reading http://emacswiki.org/emacs/ELPA, I added this to .emacs:

(defun zenburn-init ()
  (load-theme 'zenburn)
)

(add-hook 'after-init-hook 'zenburn-init)

...Incidentally, I think that I should be able to do this without the defun. How?

NOTE

Emacs hangs on startup when you haven't added the zenburn theme to the safelist yet. (I let emacs automagically add it by loading zenburn manually first and following the prompts.)

from zenburn-emacs.

fdhenard avatar fdhenard commented on July 19, 2024 1

WORKAROUND
...
(add-hook 'after-init-hook 'zenburn-init)

@daveloyall: Awesome. Thanks!

...Incidentally, I think that I should be able to do this without the defun. How?

Use an anonymous function
Here's mine:

(add-hook 'after-init-hook (lambda () (load-theme 'zenburn t)))

from zenburn-emacs.

daveloyall avatar daveloyall commented on July 19, 2024

I installed zenburn-theme-20130108.1839 via melpa.

I tried various methods to load zenburn when emacs starts, no success.

However, I can always manually M-x load-theme -> zenburn after emacs is started.

So, I put a debug message into ~/.emacs.d/elpa/zenburn-theme-20130108.1839/zenburn-theme-autoloads.el ...

;;; zenburn-theme-autoloads.el --- automatically extracted autoloads
;;
;;; Code:


;;;### (autoloads nil "zenburn-theme" "zenburn-theme.el" (20717 51215))
;;; Generated autoloads from zenburn-theme.el

(and load-file-name (boundp 'custom-theme-load-path) (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))

;;;daveloyall debug message
(message "done adding zenburn to custom-theme-load-path")

;;;***

;;;### (autoloads nil nil ("zenburn-theme-pkg.el") (20717 51215 127251))

;;;***

(provide 'zenburn-theme-autoloads)
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; zenburn-theme-autoloads.el ends here

This is the result seen in my messages buffer:

("emacs")
Loading 00debian-vars...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done
Loading paren...done
Warning (initialization): An error occurred while loading `/home/hobbes/.emacs':

error: Unable to find theme file for `zenburn'

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.
done adding zenburn to custom-theme-load-path
Starting Emacs daemon.
When done with this frame, type C-x 5 0
goto-history-element: Beginning of history; no preceding item
goto-history-element: End of history; no default available
Making completion list...

...See what happens there? The code that makes zenburn available doesn't run until after my .emacs.

I hope this helps. And please pardon me if I'm not doing things as expected; I'm new to both github and emacs.

Cheers,
--Dave

from zenburn-emacs.

dudebout avatar dudebout commented on July 19, 2024

The following link will explain your problem and why the workaround works:

http://stackoverflow.com/questions/11127109/emacs-24-package-system-initialization-problems/11140619#11140619

from zenburn-emacs.

Txellenne avatar Txellenne commented on July 19, 2024

Hey!!!
Y had given up to lad the theme I was after and opted for using one of the included instead. But now that I have just upgraded to emacs 24.2 I tried with adding (package initialize) as guided in the above link (I had tried too but in the wrong place in the .emacs file I suppose) now instead it works for this question, It's great!!!.
However for some others, it doesn't. I got issues with flyspell, rainbown-mode, alternating dictionaries when in text-mode, uf! a never ending installation task... even the wraping visual line doesn't work as expected, I will post my (doc)emacs file on any pastebin site out there for a public analysis (perhaps it helps beginners others too). Thank you very much, anyway.

from zenburn-emacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.