Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-L option appends instead of prepends path #17

Closed
remyhonig opened this issue Apr 13, 2015 · 1 comment · Fixed by #20
Closed

-L option appends instead of prepends path #17

remyhonig opened this issue Apr 13, 2015 · 1 comment · Fixed by #20

Comments

@remyhonig
Copy link
Contributor

If I want to use a different version of a package in my tests (in my case I want to use a custom org-mode version) I have to perform some processing of the load-path in my test helper I found out after some debugging.

https://github.com/remyhonig/elfeed-org/blob/master/test/test-helper.el

;; Remove standard org-mode paths so I can supply them with my own
;; using the "cask exec ert-runner -L org-mode/lisp" command
(setq load-path (-remove (lambda (path) (s-ends-with? "lisp/org" path)) load-path))
(message "Org version: %s on Emacs version: %s" (org-version) (emacs-version))

The -L option of ert-runner appends the path and I expected it to work the same way as the -L option of emacs.

01c9442

But while reading the CHANGELOG for emacs I found out the -L option should prepend to the load-path

http://www.gnu.org/software/emacs/news/NEWS.24.5

** The -L option, which normally prepends its argument to load-path,
will instead append, if the argument begins with `:' (or `;' on MS Windows;
i.e., `path-separator').

My request is to change the behaviour of the -L option to match the one of emacs (so to prepend instead append) . If you don't have the time I'd be happy to provide a PR. Just let me know if you do.

@rejeep
Copy link
Owner

rejeep commented Apr 14, 2015

The -L option for ert runner is actually not related to the Emacs one. Didn't even think about it when I added it. But I still agree with you that it makes more sense to prepend the path. So please go ahead and send a PR with the change and I will merge it!

remyhonig added a commit to remyhonig/ert-runner.el that referenced this issue Apr 24, 2015
This makes it possible to use a different version of a package than the one provided by your emacs distribution
fixes rejeep#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants