jceb / vim-orgmode

Text outlining and task management for Vim based on Emacs' Org-Mode
http://www.vim.org/scripts/script.php?script_id=3642
Other
3.12k stars 267 forks source link

Export relies on emacs at /usr/bin #221

Closed hallfox closed 8 years ago

hallfox commented 8 years ago

I'm running a Macbook Pro OSX 10.11 and I have an updated working version of emacs 24.5.1 installed at /usr/local/bin/emacs (where homebrew puts it) that has org-mode installed and everything, yet I was noticing that the plugin was throwing errors despite everything being set properly. I traced back the error and found that the plugin was using /usr/bin/emacs, which was at version 22.1.1, which I guess doesn't have all the fancy org-mode functions you need. I've managed to resolve the problem just by running emacs -nw --batch --visit=foo.org --funcall=org-latex-export-to-pdf, which of course just uses the emacs installation my PATH resolves in /usr/local/bin. Any better way to do this / fix so that this plugin resolves the emacs binary on my path? Thanks!

Ron89 commented 8 years ago

Noted. But considering the versatility of the fixing, I believe a better way to fix it is to design new variable for user to specify their own binary of emacs when They don't use the system default. I recommended the variable name to be g:org_emacs_binary. You think? Also, I am extremely busy before weekend this week so I can't work on this before that. If you can send a PR on this it would be grand~

hallfox commented 8 years ago

Oh, duh yeah a variable makes a lot more sense. I'll see if I can work on it, never done vim plugin programming before.

Ron89 commented 8 years ago

@hallfox, I have taken a look at the code, and realized that a variable is already in place. Let variable g:org_export_emacs to your homebrew version of emacs and see if it solve your issue?

hallfox commented 8 years ago

Worked like a charm, thanks!

Ron89 commented 8 years ago

The variable is also documented in our doc/orgguide.txt. So I f it works fine in your case, I believe we can close the issue.

Rismor commented 5 years ago

@Ron89 Im on windows using a ubuntu subsystem, do i just add g:org_export_emacs to my vimrc file?