jsinglet / latex-preview-pane

Makes LaTeX editing less painful by providing a updatable preview pane
129 stars 24 forks source link

M-p and M-P shortcuts are not defined. #26

Closed nelson-liu closed 8 years ago

nelson-liu commented 8 years ago

Hi There! I installed latex-preview-pane with melpa. So i had a .tex buffer open (with auctex) in emacs. I wanted to preview the entire buffer, so i used m-x latex-preview-pane-mode. After doing so, a split buffer named Latex Preview Pane Welcome opened with just the welcome screen and "[loading document preview...]" Pressing M-p or M-P do nothing ( Although strangely both make the minibuffer say M-p is not defined).

Any ideas as to what I could be doing wrong? Thanks!

nelson-liu commented 8 years ago

update - I discovered that it would output "Error running timer 'latex-preview-pane-update': (file-error "Searching for program" "no such file or directory" "pdflatex"). running M-x getenv on PATH returns

/Library/TeX/texbin/:/usr/local/bin:/Library/TeX/texbin/:/usr/local/bin:/Library/TeX/texbin/:/usr/local/bin:/Library/TeX/texbin/:/usr/local/bin:/Library/TeX/texbin/:/usr/local/bin:/Library/TeX/texbin/:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9:/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_9

In my .emacs file, I also have (setenv "PATH" "/Library/TeX/texbin/:$PATH" t).

Lastly, the output of which latex returns "/Library/TeX/texbin//latex"

any ideas?

nelson-liu commented 8 years ago

edit: turns out there were just some issues with latex not being in my exec-path variable. However, the shortcuts still do not seem to be defined. is there anyway to fix this besides manually rebinding them in my .emacs?

jsinglet commented 8 years ago

Hi Nelson,

Glad to hear you worked it out -- are you still having problems with the shortcuts? You should have this line in your .emacs

(latex-preview-pane-enable)

Then just restart your emacs. Also, may I suggest the following package: https://github.com/purcell/exec-path-from-shell

It makes life easier when dealing with these path issues. You really shouldn't have to manually manipulate the exec-path in your .emacs. Also, note that the platform correct place to put new path entries is in: /etc/paths.d (on OS X)

Best, JLS

nelson-liu commented 8 years ago

Hi @jsinglet! i had merely forgotten to M-x load-file .emacs after inserting that line. mybad! Thanks for the link to exec-path-from-shell! that solves all my issues :)

jsinglet commented 8 years ago

Glad to hear! Thanks for reporting your issue and thanks for using LaTeX Preview Pane!