[O] Predictive for Latex in org-mode
Hi, I have installed Predictive package. It is working fine for normal English words while working in org-mode. When I am writing few latex codes in org-mode, it is not suggesting latex keywords it seems. I have added the following in .emacs. ;;predictive (add-to-list 'load-path ~/.emacs.d/predictive) ;; dictionary locations (add-to-list 'load-path ~/.emacs.d/predictive/misc) (add-to-list 'load-path ~/.emacs.d/predictive/texinfo) (add-to-list 'load-path ~/.emacs.d/predictive/latex) (add-to-list 'load-path ~/.emacs.d/predictive/html) ;; load predictive package (require 'predictive) How do I make it work for Latex ? - *Sanjib Sikder ** *
Re: [O] Predictive for Latex in org-mode
Hi Sanjib, Sanjib Sikder sanjibju2...@gmail.com writes: I have installed Predictive package. It is working fine for normal English words while working in org-mode. When I am writing few latex codes in org-mode, it is not suggesting latex keywords it seems. I have added the following in .emacs. I'm not sure I understand the problem: isn't the purpose of the predictive package to suggest keywords depending on the context? If so, why is it a problem that predictive suggests LaTeX keywords? Do you mean: once I write some LaTeX keywords in an org-mode buffer, it only suggests LaTeX keywords (and no english words) for the rest of the session? Thanks for confirming, -- Bastien
Re: [O] Predictive for Latex in org-mode
Hi Bastien and Sanjib, On Tue, Mar 05, 2013 at 10:44:55AM +0100, Bastien wrote: Hi Sanjib, Sanjib Sikder sanjibju2...@gmail.com writes: I have installed Predictive package. It is working fine for normal English words while working in org-mode. When I am writing few latex codes in org-mode, it is not suggesting latex keywords it seems. I have added the following in .emacs. I'm not sure I understand the problem: isn't the purpose of the predictive package to suggest keywords depending on the context? If so, why is it a problem that predictive suggests LaTeX keywords? Do you mean: once I write some LaTeX keywords in an org-mode buffer, it only suggests LaTeX keywords (and no english words) for the rest of the session? I think what he means is that predictive _does not_ suggest LaTeX keywords inside an org-mode buffer. I do not know how predictive works, but if it is dependent on the major mode to offer suggestions, then it will fail suggesting LaTeX keywords in Org mode. This particular feature of Org mode, allowing LaTeX commands natively is somewhat of a quirk. Hope this helps, -- Suvayu Open source is the future. It sets us free.
Re: [O] Predictive for Latex in org-mode
Hi Bastien, Do you mean: once I write some LaTeX keywords in an org-mode buffer, it only suggests LaTeX keywords (and no english words) for the rest of the session? I am writing my thesis in org-mode. My thesis consists of equations. So in my thesis.org file, I have latex codes also. I do latex pdf export to generate the pdf file of the thesis. While using predictive mode, it suggests regular English words but not Latex keywords. Just now I noticed that if my file extension is .tex, then predictive predicts and suggests latex keywords. May I configure predictive such a way that while I am working on a file thesis.org (not thesis.tex), predictive will suggest latex keywords also ? Thanks. - *Sanjib Sikder*
Re: [O] Predictive for Latex in org-mode
Hi Suvayu, I think what he means is that predictive _does not_ suggest LaTeX keywords inside an org-mode buffer. Yes, exactly, I wanted to mean this. Thanks - *Sanjib Sikder *
Re: [O] Predictive for Latex in org-mode
Hi Sanjib, Sanjib Sikder sanjibju2...@gmail.com writes: Yes, exactly, I wanted to mean this. Maybe: (add-to-list 'predictive-major-mode-alist '(org-mode . predictive-setup-latex)) Or (add-hook 'org-mode-hook 'predictive-setup-latex) Toby is on this list, he'll perhaps confirm/correct. Another idea would be to use the LaTeX predictions only in Org's LaTeX fragments/regions but that's another story. -- Bastien
Re: [O] Predictive for Latex in org-mode
Hi Bastien, (add-to-list 'predictive-major-mode-alist '(org-mode . predictive-setup-latex)) This one works :) Thanks a lot. --- Sanjib Sikder
Re: [O] Predictive for Latex in org-mode
Dear Bastien, (add-to-list 'predictive-major-mode-alist '(org-mode . predictive-setup-latex)) This works for latex keyword suggestion in org-mode buffer but while trying to pdf export, I am getting the following error. Wrong type argument: listp, t Thanks - *Sanjib Sikder ** *
Re: [O] Predictive for Latex in org-mode
Dear Bastien, The error Wrong type argument: listp, t was due to the following line (add-hook 'org-mode-hook 'predictive-mode) which was there in the .emacs file. While predictive mode is on [without (add-hook 'org-mode-hook 'predictive-mode) in .emacs] in org-mode buffer, C-c C-e p produces an empty folder .predictive, in the folder where .org file is located. If I use (add-hook 'org-mode-hook 'predictive-mode) in .emacs then the generated .predictive folder contains all the .el and .elc files. Thanks. - Sanjib Sikder