Skip to main content
deleted 138 characters in body
Source Link
undostres
  • 1.8k
  • 14
  • 15

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-"20" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-2016031420250314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-"20" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))

Caveats:

This code will be evaluated only at startup so you'll have to restart Emacs after you've upgraded your packages. Or else run eval-buffer. Or define a command based on this answer.

If in "~/Dropbox/emacs/prelude/elpa/" there are more directories that start with "org-"In the variable definition will choke. I can't solve this issue now so I'll come back lateryear 3000 you'll have to provide a solutionchange "org-20" for "org-30".

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-20160314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))

Caveats:

This code will be evaluated only at startup so you'll have to restart Emacs after you've upgraded your packages. Or else run eval-buffer. Or define a command based on this answer.

If in "~/Dropbox/emacs/prelude/elpa/" there are more directories that start with "org-" the variable definition will choke. I can't solve this issue now so I'll come back later to provide a solution.

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-20" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-20250314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-20" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))

Caveats:

This code will be evaluated only at startup so you'll have to restart Emacs after you've upgraded your packages. Or else run eval-buffer. Or define a command based on this answer.

In the year 3000 you'll have to change "org-20" for "org-30".

added 404 characters in body
Source Link
undostres
  • 1.8k
  • 14
  • 15

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-20160314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))

Caveats:

This code will be evaluated only at startup so you'll have to restart Emacs after you've upgraded your packages. Or else run eval-buffer. Or define a command based on this answer.

If in "~/Dropbox/emacs/prelude/elpa/" there are more directories that start with "org-" the variable definition will choke. I can't solve this issue now so I'll come back later to provide a solution.

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-20160314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-20160314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))

Caveats:

This code will be evaluated only at startup so you'll have to restart Emacs after you've upgraded your packages. Or else run eval-buffer. Or define a command based on this answer.

If in "~/Dropbox/emacs/prelude/elpa/" there are more directories that start with "org-" the variable definition will choke. I can't solve this issue now so I'll come back later to provide a solution.

Source Link
undostres
  • 1.8k
  • 14
  • 15

This is a hacky answer but it works (add the code to your .emacs file):

;; First, define a variable to hold the directory name. It will always
;; be updated whenever there's a new Org version.
;; The important part is this function:
;; (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/")
;; returns:
;; "org-20150511/"
;; or in the future:
;; "org-20160314/"
;; etc.

(setq my-org-from-elpa-dir (expand-file-name (file-name-completion "org-" "~/Dropbox/emacs/prelude/elpa/") "~/Dropbox/emacs/prelude/elpa/")

;; Finally, add the directories to load-path.
;; (concat my-org-from-elpa-dir "lisp/")
;; returns:
;; "/home/YOU/Dropbox/emacs/prelude/elpa/org-20150511/lisp/"
;; and so on.

(add-to-list 'load-path (concat my-org-from-elpa-dir "lisp/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/"))
(add-to-list 'load-path (concat my-org-from-elpa-dir "contrib/lisp/"))