emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Predictive for Latex in org-mode
@ 2013-03-05  9:37 Sanjib Sikder
  2013-03-05  9:44 ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Sanjib Sikder @ 2013-03-05  9:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

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
**

*

[-- Attachment #2: Type: text/html, Size: 1044 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05  9:37 Predictive for Latex in org-mode Sanjib Sikder
@ 2013-03-05  9:44 ` Bastien
  2013-03-05  9:51   ` Suvayu Ali
  2013-03-05  9:53   ` Sanjib Sikder
  0 siblings, 2 replies; 9+ messages in thread
From: Bastien @ 2013-03-05  9:44 UTC (permalink / raw)
  To: Sanjib Sikder; +Cc: emacs-orgmode

Hi Sanjib,

Sanjib Sikder <sanjibju2002@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05  9:44 ` Bastien
@ 2013-03-05  9:51   ` Suvayu Ali
  2013-03-05  9:58     ` Sanjib Sikder
  2013-03-05  9:53   ` Sanjib Sikder
  1 sibling, 1 reply; 9+ messages in thread
From: Suvayu Ali @ 2013-03-05  9:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi Bastien and Sanjib,

On Tue, Mar 05, 2013 at 10:44:55AM +0100, Bastien wrote:
> Hi Sanjib,
> 
> Sanjib Sikder <sanjibju2002@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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05  9:44 ` Bastien
  2013-03-05  9:51   ` Suvayu Ali
@ 2013-03-05  9:53   ` Sanjib Sikder
  1 sibling, 0 replies; 9+ messages in thread
From: Sanjib Sikder @ 2013-03-05  9:53 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

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*

[-- Attachment #2: Type: text/html, Size: 1036 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05  9:51   ` Suvayu Ali
@ 2013-03-05  9:58     ` Sanjib Sikder
  2013-03-05 10:08       ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Sanjib Sikder @ 2013-03-05  9:58 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

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
*

[-- Attachment #2: Type: text/html, Size: 361 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05  9:58     ` Sanjib Sikder
@ 2013-03-05 10:08       ` Bastien
  2013-03-05 10:19         ` Sanjib Sikder
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2013-03-05 10:08 UTC (permalink / raw)
  To: Sanjib Sikder; +Cc: emacs-orgmode

Hi Sanjib,

Sanjib Sikder <sanjibju2002@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05 10:08       ` Bastien
@ 2013-03-05 10:19         ` Sanjib Sikder
  2013-03-05 10:55           ` Sanjib Sikder
  0 siblings, 1 reply; 9+ messages in thread
From: Sanjib Sikder @ 2013-03-05 10:19 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

Hi Bastien,

>(add-to-list 'predictive-major-mode-alist
             '(org-mode . predictive-setup-latex))

This one works :)

Thanks a lot.
-------------------
Sanjib Sikder

[-- Attachment #2: Type: text/html, Size: 265 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05 10:19         ` Sanjib Sikder
@ 2013-03-05 10:55           ` Sanjib Sikder
  2013-03-05 11:19             ` Sanjib Sikder
  0 siblings, 1 reply; 9+ messages in thread
From: Sanjib Sikder @ 2013-03-05 10:55 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

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
**
*

[-- Attachment #2: Type: text/html, Size: 595 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Predictive for Latex in org-mode
  2013-03-05 10:55           ` Sanjib Sikder
@ 2013-03-05 11:19             ` Sanjib Sikder
  0 siblings, 0 replies; 9+ messages in thread
From: Sanjib Sikder @ 2013-03-05 11:19 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 678 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-05 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-05  9:37 Predictive for Latex in org-mode Sanjib Sikder
2013-03-05  9:44 ` Bastien
2013-03-05  9:51   ` Suvayu Ali
2013-03-05  9:58     ` Sanjib Sikder
2013-03-05 10:08       ` Bastien
2013-03-05 10:19         ` Sanjib Sikder
2013-03-05 10:55           ` Sanjib Sikder
2013-03-05 11:19             ` Sanjib Sikder
2013-03-05  9:53   ` Sanjib Sikder

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).