all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* custom-theme-load-path and package system
@ 2013-08-30  9:16 F. Gr.
  2013-09-01 19:55 ` Alex Kost
  0 siblings, 1 reply; 5+ messages in thread
From: F. Gr. @ 2013-08-30  9:16 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Hi,
every time I upgrade zenburn-theme by Emacs Package System, I have to
modify the "custom-theme-load-path" variable because of the old
value stored. If I don't edit the variable, the theme won't be loaded.
Is there a workaround for this?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom-theme-load-path and package system
  2013-08-30  9:16 custom-theme-load-path and package system F. Gr.
@ 2013-09-01 19:55 ` Alex Kost
  2013-09-02 16:02   ` Francesco Groccia
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2013-09-01 19:55 UTC (permalink / raw)
  To: F. Gr.; +Cc: help-gnu-emacs

F. Gr. (2013-08-30 13:16 +0400) wrote:

> Hi,
> every time I upgrade zenburn-theme by Emacs Package System, I have to
> modify the "custom-theme-load-path" variable because of the old
> value stored. If I don't edit the variable, the theme won't be loaded.
> Is there a workaround for this?

It shouldn't happen because zenburn package adds the right path to
`custom-theme-load-path' (look at "zenburn-theme-autoloads.el").

What is the value of your custom-theme-load-path?  How do you modify it?
Perhaps you have (setq package-enable-at-startup nil) in your .emacs?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom-theme-load-path and package system
  2013-09-01 19:55 ` Alex Kost
@ 2013-09-02 16:02   ` Francesco Groccia
  2013-09-03 14:56     ` Alex Kost
  0 siblings, 1 reply; 5+ messages in thread
From: Francesco Groccia @ 2013-09-02 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

Alex Kost [2013-09-01 23:55:15+0400]:

> F. Gr. (2013-08-30 13:16 +0400) wrote:
> 
> > Hi,
> > every time I upgrade zenburn-theme by Emacs Package System, I
> > have to modify the "custom-theme-load-path" variable because of
> > the old value stored. If I don't edit the variable, the theme
> > won't be loaded. Is there a workaround for this?
> 
> It shouldn't happen because zenburn package adds the right path to
> `custom-theme-load-path' (look at "zenburn-theme-autoloads.el").
> 
> What is the value of your custom-theme-load-path?

The value of my custom-theme-load-path is the following:
'(custom-theme-load-path (quote ("/home/fgr/.emacs.d/elpa/zenburn-theme-20130831.739/" "~/.emacs.d/themes/" custom-theme-directory t)))

> How do you modify it?

I modify it by ``M-x customize-themes''.

> Perhaps you have (setq package-enable-at-startup nil) in
> your .emacs?

No, I don't.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom-theme-load-path and package system
  2013-09-02 16:02   ` Francesco Groccia
@ 2013-09-03 14:56     ` Alex Kost
  2013-09-04  8:14       ` Francesco Groccia
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2013-09-03 14:56 UTC (permalink / raw)
  To: Francesco Groccia; +Cc: help-gnu-emacs

Francesco Groccia (2013-09-02 20:02 +0400) wrote:

>> What is the value of your custom-theme-load-path?
>
> The value of my custom-theme-load-path is the following:
> '(custom-theme-load-path (quote
> ("/home/fgr/.emacs.d/elpa/zenburn-theme-20130831.739/"
> "~/.emacs.d/themes/" custom-theme-directory t)))

I suppose it's not the value, but a part of the customization section of
your .emacs. Check the value with "C-h v custom-theme-load-path RET".

What the value will be if you will not customize this variable at all?

>> How do you modify it?
>
> I modify it by ``M-x customize-themes''.

Do you mean "M-x customize-variable"? ...Hm, wait a minute, i think i
guessed what happens to you. You customize zenburn theme (with
"customize-themes") as well, and in your customization section you have
something like this:

(custom-set-variables
...
 '(custom-enabled-themes (quote (zenburn)))
...
 '(custom-theme-load-path (quote
 ("/home/fgr/.emacs.d/elpa/zenburn-theme-20130831.739/"
 "~/.emacs.d/themes/" custom-theme-directory t)))
...
)

The problem is that emacs package system is loaded after the init file,
so emacs tries to load zenburn theme before the zenburn package will add
the proper path to `custom-theme-load-path'; that's why you have to
specify this path by hand. To solve it add these 2 lines in your .emacs
before customization section (before "(custom-set-variables ...)"):

(setq package-enable-at-startup nil)
(package-initialize)

P.S.  If you just want Emacs to look at "~/.emacs.d/themes/" for
additional themes, it would be better to modify `custom-theme-directory'
instead of `custom-theme-load-path' (by customizing it or adding
(setq custom-theme-directory "~/.emacs.d/themes/") into your .emacs).




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom-theme-load-path and package system
  2013-09-03 14:56     ` Alex Kost
@ 2013-09-04  8:14       ` Francesco Groccia
  0 siblings, 0 replies; 5+ messages in thread
From: Francesco Groccia @ 2013-09-04  8:14 UTC (permalink / raw)
  To: help-gnu-emacs

Alex Kost [2013-09-03 18:56:41+0400]:

> Francesco Groccia (2013-09-02 20:02 +0400) wrote:
> 
> >> What is the value of your custom-theme-load-path?
> >
> > The value of my custom-theme-load-path is the following:
> > '(custom-theme-load-path (quote
> > ("/home/fgr/.emacs.d/elpa/zenburn-theme-20130831.739/"
> > "~/.emacs.d/themes/" custom-theme-directory t)))
> 
> I suppose it's not the value, but a part of the customization
> section of your .emacs.

Yes.

> Check the value with "C-h v custom-theme-load-path RET".

The value is the same as I've already posted. That is:
"
custom-theme-load-path is a variable defined in `custom.el'.
Its value is
("/home/fgr/.emacs.d/elpa/zenburn-theme-20130831.739/" "~/.emacs.d/themes/" custom-theme-directory t)

Original value was 
(custom-theme-directory t)
[...]
"

> What the value will be if you will not customize this variable at
> all?
> 
> >> How do you modify it?
> >
> > I modify it by ``M-x customize-themes''.
> 
> Do you mean "M-x customize-variable"? ...Hm, wait a minute, i think
> i guessed what happens to you. You customize zenburn theme (with
> "customize-themes") as well, and in your customization section you
> have something like this:
> 
> (custom-set-variables
> ...
>  '(custom-enabled-themes (quote (zenburn)))
> ...
>  '(custom-theme-load-path (quote
>  ("/home/fgr/.emacs.d/elpa/zenburn-theme-20130831.739/"
>  "~/.emacs.d/themes/" custom-theme-directory t)))
> ...
> )

That's right!

> The problem is that emacs package system is loaded after the init
> file, so emacs tries to load zenburn theme before the zenburn
> package will add the proper path to `custom-theme-load-path';
> that's why you have to specify this path by hand. To solve it add
> these 2 lines in your .emacs before customization section (before
> "(custom-set-variables ...)"):
> 
> (setq package-enable-at-startup nil)
> (package-initialize)
> 
> P.S.  If you just want Emacs to look at "~/.emacs.d/themes/" for
> additional themes, it would be better to modify
> `custom-theme-directory' instead of `custom-theme-load-path' (by
> customizing it or adding (setq custom-theme-directory
> "~/.emacs.d/themes/") into your .emacs).

Thank you for making yourself available.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-04  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30  9:16 custom-theme-load-path and package system F. Gr.
2013-09-01 19:55 ` Alex Kost
2013-09-02 16:02   ` Francesco Groccia
2013-09-03 14:56     ` Alex Kost
2013-09-04  8:14       ` Francesco Groccia

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.