unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Can't Get Org-Drill to Work
@ 2017-06-30  4:46 M. P.
  2017-06-30 17:28 ` John Mastro
  2017-06-30 18:18 ` Kaushal Modi
  0 siblings, 2 replies; 3+ messages in thread
From: M. P. @ 2017-06-30  4:46 UTC (permalink / raw)
  To: help-gnu-emacs

I am trying to install org-drip. I have org and org-contrib installed through Elpa. The Problem has something to do with the line (require `org-drill. When I try to run this config I get

Warning (initialization): An error occurred while loading ‘/Users/m.r.p/.emacs’:

Symbol's function definition is void: copy-list

The documentation tells me to You will also need to make sure that Org's "contrib/lisp" directory is in the emacs load-path. How do I do this? 


                             Here is my config file.
;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(require 'org-drill)
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)

Any Ideas would be most appreciated.




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

* Re: Can't Get Org-Drill to Work
  2017-06-30  4:46 Can't Get Org-Drill to Work M. P.
@ 2017-06-30 17:28 ` John Mastro
  2017-06-30 18:18 ` Kaushal Modi
  1 sibling, 0 replies; 3+ messages in thread
From: John Mastro @ 2017-06-30 17:28 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: M. P.

M. P. <wintermute24x7@icloud.com> wrote:
> I am trying to install org-drip. I have org and org-contrib installed
> through Elpa. The Problem has something to do with the line (require
> `org-drill. When I try to run this config I get
>
> Warning (initialization): An error occurred while loading
> ‘/Users/m.r.p/.emacs’:
>
> Symbol's function definition is void: copy-list

From a quick look, this appears to be a bug in `org-drill', but luckily
it's easy to work around in your config.

To do so, add (require 'cl) to your config, before (require 'org-drill).

The problem is that `copy-list' is a function defined in `cl' (as an
alias to `cl-copy-list' in `cl-lib'), but `org-drill' only requires `cl'
at compilation time. `org-drill' should use `cl-copy-list' instead, or
else require `cl' unconditionally (i.e., without `eval-when-compile').

> The documentation tells me to You will also need to make sure that
> Org's "contrib/lisp" directory is in the emacs load-path. How do I do
> this?

I don't think you'll need to do this, ELPA will have handled it.

Hope that helps

        John



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

* Re: Can't Get Org-Drill to Work
  2017-06-30  4:46 Can't Get Org-Drill to Work M. P.
  2017-06-30 17:28 ` John Mastro
@ 2017-06-30 18:18 ` Kaushal Modi
  1 sibling, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2017-06-30 18:18 UTC (permalink / raw)
  To: M. P., help-gnu-emacs

What is your emacs version?

On Fri, Jun 30, 2017 at 9:47 AM M. P. <wintermute24x7@icloud.com> wrote:

> I am trying to install org-drip. I have org and org-contrib installed
> through Elpa.


Not that that could be causing the issue you are seeing, but there is no
point installing both org and org-plus-contrib. org-plus-contrib is a
super-set of org.


> The Problem has something to do with the line (require `org-drill. When I
> try to run this config I get
>
> Warning (initialization): An error occurred while loading
> ‘/Users/m.r.p/.emacs’:
>
> Symbol's function definition is void: copy-list
>

copy-list is in the cl-lib library. So the order of your package
initialization is probably the issue.

The documentation tells me to You will also need to make sure that Org's
> "contrib/lisp" directory is in the emacs load-path. How do I do this?


You do not need to do anything like that if you are installing
org-plus-contrib. org-plus-contrib includes files from Org and contrib/
directories under one single flat directory hierarchy.

You need to update the load-path as suggested if you are cloning the Org
repo and *not* building Org as it's supposed to (by customizing the local.mk
).


>                              Here is my config file.
> ;; Added by Package.el.  This must come before configurations of
> ;; installed packages.  Don't delete this line.  If you don't want it,
> ;; just comment it out by adding a semicolon to the start of the line.
> ;; You may delete these explanatory comments.
> (package-initialize)
> (require 'org-drill)
> (require 'package)
> (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
>
> Any Ideas would be most appreciated.
>

I would rearrange the above as:

(require 'package) ;You need this require so that the `package-archives'
var is declared
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")
:append)
(package-initialize)               ;MANDATORY (before you require *any*
package)
;; Now do all the package requires as needed (I would rather let the
packages be
;; auto-loaded instead.)
(require 'org-drill) ;Assumes that you have already installed
`org-plus-contrib' first

You can step through the above in an emacs -Q session as follows (tested on
emacs 25.2):

1. Start emacs -Q
2. Evaluate the below:

(progn
  (require 'package) ;You need this require so that the `package-archives'
var is declared
  (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")
:append)
  (package-initialize)
  (package-refresh-contents)
  (package-install 'org-plus-contrib)
  (require 'org-drill))

Then when I do M-: (featurep 'org-drill), I get "t" in the echo area. That
means that that package got loaded fine.
-- 

Kaushal Modi


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

end of thread, other threads:[~2017-06-30 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30  4:46 Can't Get Org-Drill to Work M. P.
2017-06-30 17:28 ` John Mastro
2017-06-30 18:18 ` Kaushal Modi

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).