From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Elias_M=C3=A5rtenson?= Newsgroups: gmane.emacs.devel Subject: defcustom problem with packages (user error?) Date: Wed, 12 Nov 2014 13:22:41 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b472948befbb30507a29510 X-Trace: ger.gmane.org 1415769782 10346 80.91.229.3 (12 Nov 2014 05:23:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Nov 2014 05:23:02 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 12 06:22:58 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XoQOP-0002oJ-Ch for ged-emacs-devel@m.gmane.org; Wed, 12 Nov 2014 06:22:57 +0100 Original-Received: from localhost ([::1]:52544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoQOO-0005fm-QC for ged-emacs-devel@m.gmane.org; Wed, 12 Nov 2014 00:22:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoQOB-0005fc-Vj for emacs-devel@gnu.org; Wed, 12 Nov 2014 00:22:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoQOA-0004la-ON for emacs-devel@gnu.org; Wed, 12 Nov 2014 00:22:43 -0500 Original-Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:55499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoQOA-0004lW-Gt for emacs-devel@gnu.org; Wed, 12 Nov 2014 00:22:42 -0500 Original-Received: by mail-ob0-f181.google.com with SMTP id uy5so8404898obc.26 for ; Tue, 11 Nov 2014 21:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=E/n/hHYMtYhkfIyNThMhCZWxXjboNd/ibTx05x7x78s=; b=JG57rMeBCafDoc5s2Octf5/GQtY95odqo/vQepl3MNEMNir9Gxa63/n/Lw7M5zklFQ skhpKHImtKXjxqm3GAcbKcQl2SxTTrUSLhwcJe9xHm/fW1VqxkEs1CQoH3fRML0FB+TD e/zB5mZLAeiz26XoFOBCwsqxCRVE6WXV3dC5ixPsCq4dOMXssLXbkz/a5A9NLun7sTnk Y2+cYDtEzW/fJuihI4wnkxHbRttn8suc22qXTc3mHVk2Sss2nordRll/N919CJG3TyOH RHo7sEWl6459IogXrPpObkDIEDFubV450L/Ojp0cySyoD3jOxb86q3LMIwvhG6oXtxAX GYeA== X-Received: by 10.60.134.20 with SMTP id pg20mr36303923oeb.36.1415769761968; Tue, 11 Nov 2014 21:22:41 -0800 (PST) Original-Received: by 10.202.182.138 with HTTP; Tue, 11 Nov 2014 21:22:41 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176796 Archived-At: --047d7b472948befbb30507a29510 Content-Type: text/plain; charset=UTF-8 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 --047d7b472948befbb30507a29510 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 m= y package from MELPA (which is where it's located currently).

<= /div>
The following is the minimal configuration I started out with:

=C2=A0 =C2=A0 (custom-set-v= ariables
=C2=A0 =C2=A0=C2=A0=C2= =A0 ;; ....
=C2=A0 =C2=A0=C2=A0= =C2=A0 )
=C2=A0 =C2=A0=C2=A0= (custom-set-faces
=C2=A0 = =C2=A0=C2=A0=C2=A0 ;; ...
=C2=A0 = =C2=A0=C2=A0=C2=A0 )
=C2=A0 = =C2=A0=C2=A0(require 'package)
=C2=A0 =C2=A0=C2=A0(add-to-list 'package-archives '("elpa&qu= ot; . "http://tromey.com/elpa/= "))
=C2=A0 =C2=A0=C2=A0(add-= to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages= /"))
=C2=A0 =C2=A0=C2=A0= (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/<= /a>"))


Given the configuration above, and gnu-apl-mode being the only package l= oaded, 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 ov= erridden as soon as `package-initialize'= ; is called.



--047d7b472948befbb30507a29510--