Emacs sees the directory with the new version of org-mode, but loads the old version

The org-mode version that comes with my version of Emacs (24.5.2) is 8.2.10 . I installed version 8.3.1 from ELPA and added this to my initialization file:

 (add-to-list 'load-path "~/.emacs.d/org-20150803") (require 'org) 

When I check the version of org in Emacs, it says:

Org-mode version 8.2.10 (release_8.2.10 @ / home / meir / .emacs.d / elpa / org-20150803 /)

That is, it reports the old version and the new directory ... (the built-in version is in /usr/local/share/emacs/24.5/lisp/org )

I tried the suggested solutions here and here .

Here is the corresponding part of my initialization file (there is nothing in front of this part):

 (require 'cl) ;; Org-mode that was shipped with Emacs (setq load-path (remove-if (lambda (x) (string-match-p "org$" x)) load-path)) ;; ELPA (setq load-path (remove-if (lambda (x) (string-match-p "org-20" x)) load-path)) (add-to-list 'load-path "~/.emacs.d/org-20150803") (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (package-initialize) (require 'org) 

How do I get Emacs to download the new version of org-mode ?

UPDATE: I renamed /usr/local/share/emacs/24.5/lisp/org as /usr/local/share/emacs/24.5/lisp/org1 , so Emacs probably can't see the built-in version. However, it still shows the old version number! ..

+7
org-mode
source share
1 answer

I recommend that you start everything by removing any personal versions of org:

 rm -rf ~/.emacs.d/elpa/org-* # your installation path _may_ vary. 

and then

  • make sure that when creating org from elpa you have not loaded org yet.
  • decide which version of org you want and the package archive from which it comes.

For example, if you, like me, want org-plus-contrib from http://orgmode.org/elpa , you must first:

 > emacs -Q -batch -eval "(progn (require 'package) (add-to-list 'package-archives '(\"org\" . \"http://orgmode.org/elpa/\")) (package-initialize) (package-refresh-contents) (package-install 'org-plus-contrib))" 

Then confirm success by eliminating emacs and reloading it as:

 > emacs -q -eval "(progn (require 'package) (package-initialize))" meta-x org-version 

Notes:

  • if you DO NOT include -eval "(progn (require 'package) (package-initialize))" , then the org version will most likely be automatically loaded from what you installed in ... / site - lisp - maybe old version
  • regular 'org package is also available at http://orgmode.org/elpa - cf http://orgmode.org/elpa.html for differences
+5
source share

All Articles