unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Customizable modes and package.el
@ 2015-03-28  8:58 Sebastian Wiesner
  2015-03-28  9:30 ` Philipp Stephani
  2015-03-28 12:26 ` Stefan Monnier
  0 siblings, 2 replies; 28+ messages in thread
From: Sebastian Wiesner @ 2015-03-28  8:58 UTC (permalink / raw)
  To: emacs-devel

Hello,

I have a globalized minor mode defined as follows:

(define-globalized-minor-mode global-flycheck-mode flycheck-mode
  flycheck-mode-on-safe
  :init-value nil
  :group 'flycheck
  :require 'flycheck)

If my understanding is correct, users should now be able to enable
"global-flycheck-mode" through the customize interface, shouldn't
they?  After all, I can see the mode in customize, enable it, and
Emacs writes the following form to my init file:

(custom-set-variables
...
 '(global-flycheck-mode t nil (flycheck))
 ...

Now, my users usually install my package via ELPA, and by default,
ELPA packages do not become available until *after* the init file was
loaded.

Consequently, the above form fails to load, since customize tries to
load a library which isn't available yet. I read the documentation on
customize again, but I didn't find anything related to package.el at
all.

What did I do wrong?

Greetings,
Sebastian



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Customizable modes and package.el
@ 2015-04-18  8:36 Richard Y. Kim
  0 siblings, 0 replies; 28+ messages in thread
From: Richard Y. Kim @ 2015-04-18  8:36 UTC (permalink / raw)
  To: emacs-devel


I have been a long time emacs user, but I just joined emacs-devel list
for the first time (I think).

I wanted to respond to Stefan's email so I cut-and-pasted his comments
from
<http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00864.html>
in order to respond.

> The following vars affect package-initialize and hence need to be set
> before package-initialize is run:
> - package-directory-list
> - package-pinned-packages
> - package-load-list
> 
> There might be others, but these seem like the most important ones.

I would add `package-user-dir' to Stefan's list which to me is the all
important one since it specifies the location of the installed packages.
I set it to either ~/elisp/24.5.50 or ~/elisp/25.0.50 (kind of confusing
due to too many 5's) depending on the value of `emacs-version'.

Isn't it dangerous to load files byte-compiled by one version of emacs
by another version of emacs due to potential incompatibilities caused by
change in byte-compile formats?  I was burned couple of times over the
years due to change in byte-compile file format.

I have *never* gotten used to using ~/.emacs.d for any purpose.  So the
thought of emacs, by default, using anything in that directory is highly
disturbing to me.  I have always set `user-emacs-directory' to something
like "~/elisp" plus many other variables so that all files generated by
emacs are housed under ~/elisp, not ~/.emacs.d.  Whatever files that may
be under ~/.emacs.d are by accident which resulted from some temporary
experimentation I did via "emacs -q" who knows how many years ago.

If emacs by default starts reading anything under ~/.emacs.d, then I
will probably deal with that by adding code to wipe out ~/.emacs.d
automatically or to do something like "chmod 0 ~/.emacs.d" to make it
not readable.



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

end of thread, other threads:[~2015-11-08 10:50 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-28  8:58 Customizable modes and package.el Sebastian Wiesner
2015-03-28  9:30 ` Philipp Stephani
2015-03-28 12:26 ` Stefan Monnier
2015-03-28 14:59   ` Sebastian Wiesner
2015-03-28 17:55     ` Artur Malabarba
2015-03-28 20:42       ` Stefan Monnier
2015-03-29 14:48         ` Artur Malabarba
2015-03-30  0:41           ` Stefan Monnier
2015-03-30  7:05             ` Artur Malabarba
2015-03-30 13:39               ` Stefan Monnier
2015-03-30 14:31                 ` Artur Malabarba
2015-03-30 14:55                   ` Robert Pluim
2015-03-30 16:07                     ` Artur Malabarba
2015-03-30 17:09                       ` Drew Adams
2015-03-30 17:28                     ` Stefan Monnier
2015-11-08  3:26                       ` David Reitter
2015-11-08  3:43                         ` Kaushal Modi
2015-11-08  4:33                           ` Drew Adams
2015-11-08 10:48                         ` Artur Malabarba
2015-11-08 10:50                           ` Artur Malabarba
2015-03-30 17:45               ` Achim Gratz
2015-04-18  1:52                 ` Ted Zlatanov
2015-04-18  4:30                   ` Stefan Monnier
2015-04-18  4:46                   ` Artur Malabarba
2015-03-30 19:06             ` Artur Malabarba
2015-03-30 20:36               ` Stefan Monnier
2015-03-31 20:14                 ` João Távora
  -- strict thread matches above, loose matches on Subject: below --
2015-04-18  8:36 Richard Y. Kim

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).