Having trouble getiting Tomorrow theme to work in Emacs - emacs

I have only recently started to use emacs. I have succesffully used a couple of different themes, but am having trouble getting Tomorrow to work.
Here's what I have done:
The .el files are in ~/.emacs.d/themes/
my-init.el:
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(require 'color-theme-sanityinc-tomorrow)
(load-theme 'color-theme-sanityinc-tomorrow-night t)
I load this in .emacs by doing
(add-hook 'after-init-hook '(lambda ()
(load "~/.emacs.d/my-noexternals.el")
(load "~/.emacs.d/my-init.el") ))
When I reload emacs I see eval-buffer: Cannot open load file: no such file or directory, color-theme-sanityinc-tomorrow.

If color-theme-sanityinc-tomorrow.el is in ~/.emacs.d/themes/ you need to had:
(add-to-list 'load-path "~/.emacs.d/themes/")
before the require.
Regards

Related

Emacs Predictive - Accept with punctuation

I have successfully managed to install the predictive package for Emacs and am trying to accept the most likely correction with punctuation, which is mentioned in the manual:
http://www.dr-qubit.org/predictive/predictive-user-manual/html/Auto_002dCompletion-Mode.html
But I cannot for the life of me figure out how to set this up, I have tried the code snippet, among others (in my .Emacs):
(custom-set-variables
'(auto-completion-syntax-alist (quote (accept . word))))
And while Emacs does not complain, auto-completion-mode is off when he code is included.
When opening a file, I can see that it does not scan for auto-overlays, when the above code is in my .emacs file.
The rest of my predictive .emacs related file looks like this:
(add-to-list 'load-path "~/.emacs.d/predictive/")
;; dictionary locations
(add-to-list 'load-path "~/.emacs.d/predictive/latex/")
(add-to-list 'load-path "~/.emacs.d/predictive/texinfo/")
(add-to-list 'load-path "~/.emacs.d/predictive/html/")
;; load predictive package
(autoload 'predictive-mode "predictive.el" t)
(add-hook 'LaTeX-mode-hook 'predictive-mode)
(setq predictive-main-dict 'dict-english
predictive-predictive-use-buffer-local-dict t
predictive-auto-learn t
predictive-auto-add-to-dict t
predictive-dict-autosave t)

Emacs does not see new installation of Org-Mode

I had installed org-mode version 8.2.1 from emacs list-packages.
I downloaded the latest version 8.2.4 and placed it in .emacs.d and added the following to my .emacs,
(add-to-list 'load-path "~/.emacs.d/org-8.2.4/lisp")
Emacs still reports org-mode version to be 8.2.1
Try removing old installation(s) of org-mode from the load-path first:
(require 'cl)
;; Org-mode that was shipped with Emacs
(setq load-path (remove-if (lambda (x) (string-match-p "org$" x)) load-path))
;; ELPA
(setq load-path (remove-if (lambda (x) (string-match-p "org-20" x)) load-path))
(setq custom-org-path "~/.emacs.d/org-8.2.4/lisp")
(add-to-list 'load-path custom-org-path)
Also make sure to do it as early as possible in your init.el - especially if you use org-mode-based system for your emacs configuration files.
Add the following to your init.el file.
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
From the org compact guide here.

Emacs auto-complete-mode at startup

I just install auto-complete-mode, however everytime I start emacs I have to M-x auto-complete-mode. Is there anyway to have it loaded automatically ?
My .emacs is as follows:
;; auto-complete
(add-to-list 'load-path "~/.emacs.d/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
(ac-config-default)
Thanks
I think you can do it in various ways. To enable it globally you should use
(global-auto-complete-mode t)
But it uses auto-complete-mode-maybe, which turn AC on only those listed in ac-modes. You can add them manually just like this
(add-to-list 'ac-modes 'sql-mode)
You can make your own list if you wish AC be active only for few modes
(setq ac-modes '(c++-mode sql-mode))
Or rewrite it to have AC everywhere.
(defun auto-complete-mode-maybe ()
"No maybe for you. Only AC!"
(auto-complete-mode 1))
edited:
Autocomplete in minibuffer is bad. I think this will be better.
(defun auto-complete-mode-maybe ()
"No maybe for you. Only AC!"
(unless (minibufferp (current-buffer))
(auto-complete-mode 1)))
I just needed this:
(require 'auto-complete)
(global-auto-complete-mode t)
added to my .emacs.d/init.el file.
I installed auto-complete with the package manager. I'm using Emacs 24.

What's the magic behind the ELPA?

I use Aquamacs, and I use ELPA that installs files in ~/.emacs.d/elpa?
What's the magic behind this ELPA? I mean, without ELPA, I should download and install the packages in a specific directory, and add those two lines in .emacs.
(add-to-list 'load-path "PACKAGE_DIRECTORY")
(require 'PACKAGE)
But, with ELPA, I don't see anything added to .emacs or /Users/smcho/Library/Preferences/Aquamacs Emacs/{Preferences.el, customizations.el}. How is this possible?
Added
This is what I found with Aquamacs.
Aquamacs reads ~/Preference/Aquamacs Emacs/Preference, and it has "(add-to-list 'load-path kitfiles-dir)(require 'init)", which reads start kit.
The init.el of start kit has the "(require 'package)(package-initialize)"
~/Library/Preferences/Aquamacs Emacs/aquamacs-emacs-starter-kit/vendor has the package.el
I guess the initialization files are not changed, but the package manager reads the ~/.emacs.d/elpd/* to initialize automatically, as I see ***-autoloads.el in each of it.
Added2
With emacs 24, it seems that package is pre-built. I need only to have these lines in .emacs or .emacs.d/init.el to get ELPA working. Hints from this site.
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(defvar my-packages '(clojure-mode
nrepl))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
(package-initialize) will go through all the installed packages (in ~/.emacs.d/elpa/ or similar, depending on configuration), and add them to the load path. One you have run it, take a look at load-path (C-hvload-path), it will have all those subdirectories added. So at this point, file loading will use the normal mechanisms.
You have a (require 'package) (package-initialize) pair somewhere in your initialization files. Package.el does the magic :)

Problem installing Auto-Complete plugin in Emacs

I downloaded Auto-Complete from here: http://github.com/m2ym/auto-complete/downloads, I placed all the files from the .zip file in my load-path (C:\...Application Data\.emacs.d\plugins\auto-complete-1.0), and added the following to my .emacs:
;; load auto complete
(add-to-list 'load-path "~/.emacs.d/plugins/auto-complete-1.0")
(require 'auto-complete)
(global-auto-complete-mode t)
but an error message shows up:
.emacs:53:1:Error: Cannot open load file: auto-complete
I use a trailing '/' with directory names (as per file-name-as-directory). e.g.:
(add-to-list 'load-path (file-name-as-directory
(expand-file-name "~/.emacs.d/plugins/auto-complete-1.0")))
I rather doubt that's actually an issue, though.
Are your permissions appropriate for those files and directories?
Are you sure that ~ really expands to C:\...Application Data? Do C-x d ~ RET to be sure.