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

errors when using op/new-repository and op/new-post #192

Open
willtm opened this issue Jun 8, 2016 · 8 comments
Open

errors when using op/new-repository and op/new-post #192

willtm opened this issue Jun 8, 2016 · 8 comments

Comments

@willtm
Copy link

willtm commented Jun 8, 2016

Hello,

I'm using GNU Emacs 24.5.1 (x86_64-w64-mingw32) of 2015-05-16 on KAEL with org-page 20160413.329. I encounter errors each time I attempt to use op/new-repository and op/new-post (see below) that look similar. I know very little about Elisp but both functions appear to be failing when when trying to confirm a string.

Error from op/new-repository

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  call-process(nil nil #<buffer  *temp*> nil "--no-pager" "init")
  apply(call-process (nil nil #<buffer  *temp*> nil "--no-pager" "init"))
  git-run("init" nil)
  git-init("c:/Users/Will/Dropbox/websites/org-page/")
  op/git-init-repo("c:/Users/Will/Dropbox/websites/org-page/")
  op/new-repository("c:/Users/Will/Dropbox/websites/org-page/")
  call-interactively(op/new-repository record nil)
  command-execute(op/new-repository record)
  helm-M-x(nil "op/new-repository")
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

Error from op/new-post


Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-as-directory(nil)
  op/new-post("blog" "new-post.org")
  call-interactively(op/new-post record nil)
  command-execute(op/new-post record)
  helm-M-x(nil "op/new-post")
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)

Can you help me troubleshoot this? I'm impressed by how apparently simple org-page has made publishing to Github Pages and I'd like to do the same.

@WangLeshan
Copy link

WangLeshan commented Jun 15, 2016

@willtm, do you install git on your Windows system and does git in your system path?

stringngp nil appears in my emacs 24.4 for windows, but org-page works fine for GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 and emacs 24.4 in my Debian amd 64 stable.

@willtm
Copy link
Author

willtm commented Jul 7, 2016

@WangLeshan Sorry for the delay in replying. Yes, git is installed on my Windows system at c:\Program Files\Git\cmd\, which is also in my PATH. I still get the same errors. Should I try reinstalling org-page?

@sillykelvin
Copy link
Collaborator

sillykelvin commented Jul 15, 2016

Does the directory "c:/Users/Will/Dropbox/websites/org-page/" exist? If exists, then you may open a cmd shell in that directory and execute git init to see what happens.

@willtm
Copy link
Author

willtm commented Jul 15, 2016

@KelvinH the directory didn't exist. I created it, ran git init as you recommended and got the following:

Initialized empty Git repository in c:/Users/Will/Dropbox/websites/org-page/.git/

Following that, I attempted to execute both op/new-repository (selecting .../org-page/.git/ as the initial repository at the prompt) and got the same error message I provided earlier. I tried the same steps and selected .../org-page/ at the prompt and got the same error message.

I also attempted using op/new-post and got the same error message that I provided earlier.

I appreciate your help. I'd love to get this working.

@sillykelvin
Copy link
Collaborator

According to the message, it seems because your git executable cannot be found. You may check the variable git-executable to see if it is nil, and also, run (executable-find "git") to see if it produces nil.

If the both result is nil, you should check exec-path to see if you included the right one.

@willtm
Copy link
Author

willtm commented Jul 18, 2016

@KelvinH thank you for that advice. I found that both git-executable and (executable-find "git") were indeed both producing nil when I checked them. I'd misconfigured my exec-path in my init file. After the change, both results can find git at c:/Program Files/Git/cmd/git.exe.

After making that change, I attempted to use op/new-repository. It was successful (!) and I saw the following result in Emacs *Messages*:

Wrote c:/Users/Will/Dropbox/websites/org-page/README Wrote c:/Users/Will/Dropbox/websites/org-page/index.org Wrote c:/Users/Will/Dropbox/websites/org-page/about.org

However, when I attempted to run op/new-post I got the following error.

Debugger entered--Lisp error: (wrong-type-argument stringp nil) file-name-as-directory(nil) op/new-post("blog" "new-post.org") call-interactively(op/new-post record nil) command-execute(op/new-post record) helm-M-x(nil "op/new-post") call-interactively(helm-M-x nil nil) command-execute(helm-M-x)

Any suggestions on what I might troubleshoot here?

@willtm
Copy link
Author

willtm commented Jul 18, 2016

@KelvinH I found the source of the last problem. The variable below had not been set in my org-page configuration.

(setq op/repository-directory "path/to/your/org/repository")

Once I set it, everything worked as expected. Thank you for your help!

@sillykelvin
Copy link
Collaborator

Glad to see it works, congratulations! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants