all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* defcustom problem with packages (user error?)
@ 2014-11-12  5:22 Elias Mårtenson
  2014-11-12 13:20 ` Artur Malabarba
  0 siblings, 1 reply; 5+ messages in thread
From: Elias Mårtenson @ 2014-11-12  5:22 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]

In preparation for the eventual inclusion of gnu-apl-mode into ELPA, I
decided to ensure that the new-user experience is as smooth as possible. So
I started out with a minimal Emacs configuration and loaded my package from
MELPA (which is where it's located currently).

The following is the minimal configuration I started out with:

    (custom-set-variables
      ;; ....
      )
    (custom-set-faces
      ;; ...
      )
    (require 'package)
    (add-to-list 'package-archives '("elpa" . "http://tromey.com/elpa/"))
    (add-to-list 'package-archives '("marmalade" . "
http://marmalade-repo.org/packages/"))
    (add-to-list 'package-archives '("melpa" . "
http://melpa.milkbox.net/packages/"))
    (package-initialize)

Now, to make a long story short, here's the problem I encountered:

Given the configuration above, and gnu-apl-mode being the only package
loaded, I am unable to use the customisation framework to set any
variables. I mean, the variables can be customised and all, but the changes
become overridden as soon as `package-initialize' is called.

The workaround, of course, is to call `package-initialize' *before* the
call to `custom-set-variables'. However, this is not made clear anywhere.
That said, I'm not sure if there is a problem with the package, or this is
the way things are supposed to work.

So I guess my question is this: Did I make a mistake in developing the
package? If so, then is the proper way documented anywhere? And if my
package is correct, then why does the package loading override the default
values set by `custom-set-variables'?

If anyone is willing to take a look at the package, the source is available
at https://github.com/lokedhs/gnu-apl-mode

Regards,
Elias

[-- Attachment #2: Type: text/html, Size: 2863 bytes --]

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

end of thread, other threads:[~2014-11-13 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12  5:22 defcustom problem with packages (user error?) Elias Mårtenson
2014-11-12 13:20 ` Artur Malabarba
2014-11-12 14:45   ` Stefan Monnier
2014-11-13 13:03     ` Elias Mårtenson
2014-11-13 17:40       ` Stefan Monnier

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.