3 added 16 characters in body
source | link

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :defer t :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb")
(provide 'zwb)

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :defer t :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb")

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb")
(provide 'zwb)

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)

2 edited body
source | link

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :defer t :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb'zwb")

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :defer t :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb')

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :defer t :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb")

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)

1
source | link

How to load self package with use-package?

I use Prelude, and I want to use use-package for loading and configuring my personal config files.

In ~/.emacs.d/personal/load-private-config.el, my code is below: (like https://github.com/jwiegley/dot-emacs/blob/master/init.el#L99)

(defconst zwb-private-emacs-config-path "~/.emacs.d-private/")

(eval-and-compile
  (mapc
   #'(lambda (path)
       (push (expand-file-name path zwb-private-emacs-config-path) load-path))
   '("lib""theme" "")))

(eval-and-compile
  (defvar use-package-verbose t)
  (require 'cl)
  (require 'use-package))

(use-package zwb :defer t :load-path (lambda () (expand-file-name (concat zwb-private-emacs-config-path "lib/zwb"))))

In ~/.emacs.d-private/lib/zwb/zwb.el

(message "test-zwb')

restart emacs, in *Message* buffer, I cann't see test-zwb

I add (message load-path) at the end of load-private-config.el, restart emacs got:

Warning (initialization): An error occurred while loading `/Users/zwb/.emacs.d/init.elc':

Wrong type argument: stringp, (/Users/zwb/.emacs.d-private/lib/zwb /Users/zwb/.emacs.d-private /Users/zwb/.emacs.d-private/theme /Users/zwb/.emacs.d-private/lib ~/.emacs.d/themes/color-theme-ahei-20141223.221

It seems the lib/zwb is in the load-path, so I don't how:

  1. Why I cann't get test-zwb in *Message* buffer?
  2. Has zwb.el been already loaded? If not, how to load it?
  3. How to print load-path (use message method seems has some problem)?

My OS version: Mac OS X 10.11.2 beta4
My Emacs version: 24.5.1 (brew emacs-mac-emacs)