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

"When I turn on org-mode" does not work #12

Open
tkf opened this issue Feb 28, 2013 · 8 comments
Open

"When I turn on org-mode" does not work #12

tkf opened this issue Feb 28, 2013 · 8 comments

Comments

@tkf
Copy link

tkf commented Feb 28, 2013

I tried this scenario.

  Scenario: Turning on org-mode
    When I turn on org-mode

I got "Cannot open load file: overlay".

This also fails with the same error

   And I load the following:
    """
    (require 'org)
    """

However, running the following command does not raise error.

carton exec emacs -Q --batch --eval "(require 'org)"

Moreover, adding this to env.el does not change anything. I still got "Cannot open load file: overlay" error.

(require 'org)
;; (require 'overlay)  ; commenting out this does not change anything
@rejeep
Copy link
Contributor

rejeep commented Mar 1, 2013

I think the issue is that the org-mode function does not take an argument. Can you try and override the step, like this:

(When "^I turn on org-mode$" 'org-mode)

(you still have to require org)

@tkf
Copy link
Author

tkf commented Mar 1, 2013

I don't think so because this does not explain why "And I load the following..." step raises an error.

@rejeep
Copy link
Contributor

rejeep commented Mar 1, 2013

Ohh, so you mean you only have the eval step and not the "turn on org-mode"? Anyways, try it out, worked for me.

@tkf
Copy link
Author

tkf commented Mar 1, 2013

"I turn on org-mode" succeeds when (require 'org) is added to env.el. It is strange because it was not the case when I was writing this PR... But thanks anyway!

"I load the following:" still does not work. For reference, I made a repository to reproduce the problem I had.
https://github.com/tkf/espuds-issue-12

@rejeep
Copy link
Contributor

rejeep commented Mar 1, 2013

"I turn on org-mode" succeeds when (require 'org) is added to env.el. It is strange because it was not the case when I was writing this PR... But thanks anyway!

Same for me, wtf? :)

"I load the following:" still does not work. For reference, I made a repository to reproduce the problem I had.
https://github.com/tkf/espuds-issue-12

Gotta love Carton and Makefile's :)

The problem is with espuds-fake-eval (https://github.com/rejeep/espuds/blob/master/espuds-helpers.el#L4-L9). Replacing that with a simple eval will do the job. I hate eval, but why make things more complicated...

@rejeep
Copy link
Contributor

rejeep commented Mar 1, 2013

I spoke too soon. Still having this issue. I will actually ignore fixing the eval issue because that step should not even exist. If such a step should exist, it should look something like this:

(When "^I eval:$"
  (lambda (content)
    (with-temp-buffer
      (Given "I insert \"%s\"" content)
      (And   "I go to end of buffer")
      (And   "And I press \"%s\"" "C-x C-e"))))

That is an actual interaction by the user.

@tkf
Copy link
Author

tkf commented Mar 1, 2013

I think the problem with your approach is that it changes current buffer. What is the reason to not use (eval (read content)) here?

@rejeep
Copy link
Contributor

rejeep commented Mar 1, 2013

I think the problem with your approach is that it changes current buffer.

Yes, so it cant (and should not) be used in the same way it is today.

What is the reason to not use (eval (read content)) here?

That was what I tried just now, but that gave me the same result.

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

No branches or pull requests

2 participants