4

I'm using a solarized-light theme, it is great. As you may notice, there are several packages provide the solarized theme:

  color-theme        20080305.34   installed             install color themes
  color-theme-san... 20150704.1855 installed             A version of Ethan Schoonover's Solarized themes
  color-theme-sol... 20150619.1734 installed             Solarized themes for Emacs
  solarized-theme    20150706.1028 installed             The Solarized color theme, ported to Emacs.

As a result, I forgot which package I used. Here is the line that I activated it in the init file:

(load-theme 'solarized-light t)

I tried describe-theme, it just let me specify a theme name.

Question:

  1. How to get the package name of the theme I'm using?
  2. How to get the list of current installed package? (list-packages list all package both available and installed.)
4

Long answer for question 1:

There are two types of color themes. One built for the old color-theme package which is no longer necessary for recent versions of emacs, and themes made for the new deftheme system which is built into emacs and is part of custom.

load-theme is part of the built in theme system. If you use the built in system (and you should), you load and enable themes with load-theme and enable-theme.

Themes made for the old color-theme package generally start with the color-theme- prefix.

If you are using load-theme then you are using the solarized-theme package, not the color-theme-solarized package.

I recommend you uninstall color-theme and all color-theme-* packages as they are using an outdated system of theming that won't play nice with the modern deftheme themes and by the looks of it you aren't actually using them anyway.

It is also important to note that there is no limit to how many themes can be enabled at once, when you use load-theme or enable-theme to enable a theme it does not disable the other themes. If you want to disable a previously enabled theme you use disable-theme which will prompt you for one of the enabled themes when run interactively.

If you want to know what themes are enabled currently. You can look at the value of the variable custom-enabled-themes. Once you know what theme's you are using, you can use describe-theme to get a link to the file where the theme is located.

Short answer for question 2:

An easy way to get a list of installed packages is:

(mapcar 'car package-alist)

I'm not aware of an easy built in way to filter the package list buffer to only installed items, but you could copy the contents of the package list buffer to another buffer then use delete-non-matching-lines with a regexp of [0-9] *installed to filter the data manually.

  • Thank you for explaining the old color-theme thing. I removed all the color-theme-* package, and figure out that I'm using the solarized-theme package. – Nick Jul 9 '15 at 3:19
  • It's also great to know the delete-non-matching-lines command. Quite useful! Thank you. I eval-ed (mapcar 'car package-alist), there's output in the minibuffer, I checked the *message*buffer, the list is trunked ... how to get the whole list? – Nick Jul 9 '15 at 4:30
  • Any easy way to get it would be to evaluate the expression in your scratch buffer with C-j – Jordon Biondo Jul 9 '15 at 11:58
  • Yes, I evaluated it, only got part of the package name: (ac-ispell use-package tablist solarized-theme popup pdf-tools multiple-cursors multi-term let-alist helm-R helm ess ...), part of them is represented by .... – Nick Jul 9 '15 at 13:08
  • If put your cursor on the truncated results and press enter, the whole result will show – Jordon Biondo Jul 9 '15 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.