2

I am trying to enable predictive-mode in AUCTex. I have downloaded and added the below configuration to my .emacs file: ("~/path/predictive" points to the directory where I have put the package).

(add-to-list 'load-path "~/path/predictive")
(autoload 'predictive-mode "predictive" "predictive" t)
(set-default 'predictive-auto-add-to-dict t)
(setq predictive-main-dict 'rpg-dictionary
      predictive-auto-learn t
      predictive-add-to-dict-ask nil
      predictive-use-auto-learn-cache nil
      predictive-which-dict t)

(add-to-list 'load-path "~/path/predictive/latex")
(add-to-list 'load-path "~/path/predictive/texinfo")

When I try to enable it, I got the following error message:

Warning (emacs): Predictive major-mode setup function predictive-setup-latex failed; latex-mode support disabled

After a few Google searches, I found out that I need to byte compile the package. However, when I try to do that, I get the following error:

In toplevel form:
completion-ui-dynamic.el:31:1:Error: Wrong type argument: listp, cons
make: *** [completion-ui-dynamic.elc] Error 1

I am using Aquamacs in Mac OS Sierra.

1
  • I downloaded/cloned predictive mode using git and then ran make in the terminal, and had the same error. Consider submitting a bug report to the package maintainer. Another factor to consider is that the make file is calling emacs which is the outdated version in /usr/bin that ships with OSX -- consider adding that complexity to your bug report.
    – lawlist
    Oct 14, 2016 at 1:43

2 Answers 2

2

Emacs 22.1.1 that ships with macOS Sierra is not able to compile predictive-mode. I was able to compile it by pointing the Makefile to a MacPorts-installed Emacs 25.1.1:

sed -i.orig -e 's|= emacs|= /opt/local/bin/emacs|' Makefile

A make clean was needed before compiling with Emacs 25.1.1 to remove the broken .elc files generated by Emacs 22.1.1.

1

I ran into this same issue when installing predictive-mode on OS High Sierra.

The emacs I am actually using is the emacs for mac osX, which is a self-contained application. I am not using the emacs which is shipped with macOS. I am not sure why I did this, only it seemed like the most appropriate route when I wanted to use emacs on my system.

I usually find all my packages on MELPA, so this was a new process for me.

My solution:

After unpacking the tarball from http://www.dr-qubit.org/predictive.html, I opened the makefile located in the folder and changed the emacs line to

EMACS = /Applications/Emacs.app/Contents/MacOS/Emacs

Next I ran the make install through terminal while in the predictive folder. It installed successfully and also printed to the window the necessary lines I should add to my .emacs file. It even customized those lines to fit my install directory for my computers/username.

Hope this helps someone in the future.

Edit: Additional note:

I haven't found any good readers or blogs on the topic of autocompletion in emacs, but other alternatives seem to be auto-complete and also company-mode.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .