I can't install org-checklist - emacs

I'm trying to install org-checklist for spacemacs but I'm having some difficulties. On the project documentation (https://orgmode.org/worg/org-contrib/org-checklist.html) it says enable the org contrib directory but when I run M-x find-library RET org-contribdir it says the contrib directory is deprecated. When I try installing org-plus-contrib with package-list-packages, nothing happens.
How to untick checkboxes in org-mode for the next cyclic/repetitive task - This stack overflow question says I should download the org-checklist.el file but I can't find it anywhere. If anyone knows how to set up org-checklist or a viable alternative, I'd be really grateful

org-checklist.el is part of org-plus-contrib. You should be able to install it with package-manager: it is available from orgmode.org, so you have to add (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) to your list of archives.
Starting from emacs -q I was able to install it after evaluating these lines:
(require 'package)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
in the *scratch* buffer. Invoking package-list-packages showed org-plus-conrib as an available package and ix installed it (after I confirmed that I wanted to install it).
I was then able to load org-checklist with M-x load-library RET org-checklist RET.
Alternatively, you can just download the file from here and save it in some place that is found in your emacs's load-path, then say (require 'org-checklist).
Hope this helps.

Related

R-mode is named r-mode and causing issues

I'm trying to get polymode to work with .Rnw files, but it assumes that R-mode is named R-mode and on my system, ESS installed it as r-mode. How can I tell it that this is the same thing? I have this in my .emacs file:
;;; R modes
(add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
Strangely, if I open up a .Rmd file, it recognizes everything properly.
I was able to solve this by installing ESS via sudo apt-get install ess rather than from MELPA. I don't really understand why this would make a difference, but it fixed the problem for me!

Built-in Evil mode for Emacs 24

I've read in a lot of places such as the WikEmacs (http://wikemacs.org/wiki/Evil) that Emacs24 already came with support for Evil mode, no need to install it via el-get. But I can't seem to understand how do I activate it.
I tried just adding the
(require 'evil)
(evil-mode 1)
lines to my .emacs but it can't seem to work, how do you guys use the built-in evil mode on emacs24? without cloning git repositories, etc.
The statement on WikEmacs is false; evil-mode is not included in Emacs 24. (As it's a wiki, I just edited the page and removed that text.)
There are many ways to install evil-mode. I'd suggest activating the MELPA package repository by adding the following to your .emacs file:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
Then type M-x list-packages, find evil in the list, and install it.

Slime mode error

I was following the guide and information from A gentle tutorial to Emacs/Swank/Paredit for Clojure
However after opening elpa and installing clojure-mode, slime and paredit. I restarted emacs and then attempted to use M-x slime however it continually says no match . What am I doing wrong?
I then tried to install clojure-mode from marmalade http://marmalade-repo.org/packages I byte-compiled package el and then added
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) to my.emacs. However marmalade errors with
Symbol's value as variable is void: package-archives .
Unsure exactly what I am doing wrong I am on windows7 using emacs 23.3. I have clojure installed to c:/clojure.
Any help appreciated.
My init.el has both (require 'package) and (package-initialize). It's not very big, it looks like this:
(require 'package)
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives
'("elpa" . "http://tromey.com/elpa/"))
;; Add the user-contributed repository
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
I'm on emacs 24 (a development build) on Windows 7. I had trouble getting emacs 23 to work with packages too, it was easier for me to just upgrade.
By the way, I noticed that if I set a HOME environment variable, emacs looks there for the .emacs.d directory (instead of in %USER_PROFILE%\AppData\Roaming).
Download package.el (don't follow the instructions on the ELPA site, just download the package.el provided on marmalade's site).
Put package.el in your .emacs.d directory (~/.emacs.d/).
Add the following to your .emacs file (~/.emacs):
;;Load path to my packages
(add-to-list 'load-path "~/.emacs.d/")
;;Load ELPA (the package.el you downloaded from marmalade)
(require 'package)
;;Load Marmalade (the code found on marmalade's welcome page)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
That's it! I really hope this helps.
EDIT: Sorry, I forgot to mention that you need to add (package-initialize) at the end of the code I provided. If you don't add this line, the packages will install, but won't load.
I think, that you need to put
(require 'package)
before 'add-to-list'
P.S. and add following call after 'add-to-list'
(package-initialize)
this command will load installed packages and activate them
P.P.S. '(require 'package)' maybe not needed, but I'm personally not using 'package.el'
It seems to me you're missing either (require 'package) or (package-initialize). You can check out my setup here - I'm using both marmalade and clojure-mode on Windows 7 and it works like a charm.
Do not know it is same problem, I faced when I were trying to use quicklisp's swank/slime
Finally I found that few /contrib/*.el packages were dependent on each other
if A's dependency package is B, if B is not byte-compiled than A will not compile
when you do
(require 'A)
it will throw
Symbol's variable value is void: A
So ensure you compile each package than try require.

Emacs (Cocoa Emacs) vs Aquamacs for running Clojure on Mac OS X

I used Aquamacs so far, and I need to install and run Clojure using SLIME. I googled to get some way to use Clojure on SLIME of Aquamacs, but without success.
Questions
Is it possible to install Clojure on Aquamacs? Or, can you guess why Clojure on Aquamacs doesn't work?
Is it normal that Emacs and Aquamacs can't share the same ELPA?
Is it possible to use ELPA to install Conjure on Emacs/Aquamacs?
I was told that one can use 'lein swank' to run as a server, do you know how to do that?
Sequences that I tried (and half succeeded)
I tried with Mac OS X Emacs, and by following the steps I could make it work. I mean, I could run Clojure with SLIME.
Emacs for Mac OS X
Step 1) Install ESK.
Git clone and copy all the files into the .emacs.d directory
Add the following code to .emacs and relaunch
(when
(load
(expand-file-name "~/.emacs.d/package.el"))
(package-initialize))
Step2) Install using ELPA
M-x package-list-packages to select packages
Install
clojure-mode, clojure-test-mode
slime, slime-repl
swank-clojure
M-x slime to install the clojure
Add the following code to .emacs and relaunch
;; clojure mode
(add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/clojure-mode-1.7.1")
(require 'clojure-mode-autoloads)
(add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/clojure-test-mode-1.4")
(require 'clojure-test-mode-autoloads)
;; slime
;(setq inferior-lisp-program "/Users/smcho/bin/clojure")
(add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/slime-20100404")
(require 'slime-autoloads)
(add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/slime-repl-20100404")
(require 'slime-repl-autoloads)
;; swank-clojure
(add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/swank-clojure-1.1.0")
(require 'slime-repl-autoloads)
Aquamacs
Now I could use Clojure on Emacs, I tried the same(or very similar) method to run Clojure on Aquamacs once more.
Step 1) Install ESK for Aquamacs
Copy the files to ~/Library/Preference/Aquamacs Emacs
Modify "~/Library/Preferences/Aquamacs Emacs/Preferences.el" to add the following
(setq kitfiles-dir (concat (file-name-directory
(or (buffer-file-name) load-file-name)) "/aquamacs-emacs-starter-kit"))
; set up our various directories to load
(add-to-list 'load-path kitfiles-dir)
(require 'init)
Step2)
* Follow the same step as before to install all the (same) packages, but "M-x slime" gives me the following error message. "Symbol's function definition is void: define-slime-contrib"
ELPA
I tried to combine the packages from Emacs and Aquamacs, but they don't combine. I thought I could use the ELPA itself, not from the ESK to make it shared.
The result was not good, as ELPA couldn't download the swank-conjure package.
Success - Running Aquamacs/Clojure with 'lein swank'.
Please refer to this.
Aquamacs most definitely works with Clojure, since the author of Clojure uses it. However, I use Emacs, and after you perform the steps above in the Emacs section, I recommend checking out labrepl,
http://github.com/relevance/labrepl
If you don't have leiningen, the link to get and install it is in the instructions of the labrepl readme file. I found it extremely helpful when first learning how to set up an environment for Clojure programming. You can take apart the project.clj file in labrepl and piece together how it works pretty easily. Not to mention the lessons and training in the built in web application that comes with labrepl.
If you want to use lein swank instead:
Make sure you have leiningen installed. In your project.clj dev dependencies you want to have an entry like this:
[leiningen/lein-swank "1.1.0"]
http://clojars.org/leiningen/lein-swank
Then after you've done lein deps you should be able to run lein swank and then from within Emacs run M-x slime-connect and just press enter through the defaults.
If you're going to go this route, here is the link directly to leiningen so you can skip the labrepl repository: http://github.com/technomancy/leiningen
I found this the easiest setup for the latest version of everything. Here's a quick summary where I"m assuming you have leiningen installed.
Install the swank-clojure plugin
$ lein plugin install swank-clojure 1.3.2
Create your clojure project
$ lein new test-project
$ cd test-project
$ lein deps
Then open one of the clojure files from your project in emacs and run clojure-jack-in
M-x clojure-jack-in
You are now in a slime buffer with clojure and the dependencies for your project loaded.
Paul Barry gives an lecture how to use Aquamacs and Clojure.
It's simple as you can add this code to the .emacs file,
(add-to-list 'load-path "~/clojure/clojure-mode")
(setq inferior-lisp-program "/Users/smcho/bin/clj")
(require 'clojure-mode)
(setq auto-mode-alist
(cons '("\\.clj\\'" . clojure-mode)
auto-mode-alist))
(add-hook 'clojure-mode-hook
(lambda ()
(define-key clojure-mode-map "\C-c\C-e" 'lisp-eval-last-sexp)))
I could run 'M-x clojure-mode', and C-c C-z for REPL.
And as is asked and answered in Running Clojure and other Lisp at the same time on Emacs, I could use both Clojure/Lisp on Aquamacs.

How do I set up Aquamacs for Clojure development?

I've tried to migrate to Emacs several times for Clojure development, following a variety of blogposts, screencast and tutorials, but somewhere along the way something always went wrong - keybindings that didn't work, incompatible versions, etc, and I found myself scrambling back to Vim. But I know I want Paredit and SLIME.
So, I'm going to try again, this time backed by the powerful Stack Overflowâ„¢ community.
I hope that the answer to this question will remain up-to-date, and can serve as a reference for tentative converts like me.
What I'd like is:
The latest stable release of Clojure
Aquamacs (if it's good enough for Rich Hickey, it's good enough for me), a recent version
Clojure Mode
SLIME/SWANK
Paredit
Anything else that's indispensible?
Step-by-step instructions to install the above would be excellent - preferably in shell script format. I'd also like some hints on how to get started with the most common Clojure-related actions (including key-bindings), including links to documentation and cheatsheets.
These are the steps I took to set them up without using ELPA. Hope this helps.
Get SLIME using MacPorts
sudo port -v install slime
Get paredit
curl -O http://mumble.net/~campbell/emacs/paredit.el
Get clojure & clojure-contrib
Either using MacPorts
sudo port -v install clojure clojure-contrib
Or downloading directly
curl -O http://build.clojure.org/snapshots/org/clojure/clojure/1.1.0-master-SNAPSHOT/clojure-1.1.0-master-20091202.150145-1.jar
curl -O http://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.1.0-master-SNAPSHOT/clojure-contrib-1.1.0-master-20091212.205045-1.jar
Get clojure-mode and swank-clojure (Emacs side)
git clone http://github.com/technomancy/clojure-mode.git
git clone http://github.com/technomancy/swank-clojure.git
Get swank-clojure (Clojure side)
Either downloading pre-built jar file
curl -O http://repo.technomancy.us/swank-clojure-1.1.0.jar
Or building from source (assuming lein is installed)
cd path/to/dir/swank-clojure
lein jar
Put clojure, clojure-contrib and swank-clojure .jar files in ~/.swank-clojure or ~/.clojure (the default places where swank-clojure.el searches for them).
Add to either ~/.emacs or ~/Library/Preferences/Aquamacs Emacs/customization.el (change paths to match your own settings)
(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime/")
(add-to-list 'load-path "/opt/local/share/emacs/site-lisp/slime/contrib/")
;; Change these paths to match your settings
(add-to-list 'load-path "path/to/dir/clojure-mode/")
(add-to-list 'load-path "path/to/dir/swank-clojure/")
(add-to-list 'load-path "path/to/dir/paredit/")
;; Customize swank-clojure start-up to reflect possible classpath changes
;; M-x ielm `slime-lisp-implementations RET or see `swank-clojure.el' for more info
(defadvice slime-read-interactive-args (before add-clojure)
(require 'assoc)
(aput 'slime-lisp-implementations 'clojure
(list (swank-clojure-cmd) :init 'swank-clojure-init)))
(require 'slime)
(require 'paredit)
(require 'clojure-mode)
(require 'swank-clojure)
(eval-after-load "slime"
'(progn
;; "Extra" features (contrib)
(slime-setup
'(slime-repl slime-banner slime-highlight-edits slime-fuzzy))
(setq
;; Use UTF-8 coding
slime-net-coding-system 'utf-8-unix
;; Use fuzzy completion (M-Tab)
slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
;; Use parentheses editting mode paredit
(defun paredit-mode-enable () (paredit-mode 1))
(add-hook 'slime-mode-hook 'paredit-mode-enable)
(add-hook 'slime-repl-mode-hook 'paredit-mode-enable)))
;; By default inputs and results have the same color
;; Customize result color to differentiate them
;; Look for `defface' in `slime-repl.el' if you want to further customize
(custom-set-faces
'(slime-repl-result-face ((t (:foreground "LightGreen")))))
(eval-after-load "swank-clojure"
'(progn
;; Make REPL more friendly to Clojure (ELPA does not include this?)
;; The function is defined in swank-clojure.el but not used?!?
(add-hook 'slime-repl-mode-hook
'swank-clojure-slime-repl-modify-syntax t)
;; Add classpath for Incanter (just an example)
;; The preferred way to set classpath is to use swank-clojure-project
(add-to-list 'swank-clojure-classpath
"path/to/incanter/modules/incanter-app/target/*")))
Download and install Aquamacs.
Download and install ELPA (http://tromey.com/elpa/install.html)
Do M-x package-list-packages
Mark the lines called "clojure-mode" and "swank-clojure" with "I" then press "X".
Done.
Here's a blog post that mentions Aquamacs: Setting up Clojure, Incanter, Emacs, Slime, Swank, and Paredit
There seems to be a fairly easy way to set up Aquamacs 2.4 and SLIME for clojure:
Install Clojure
Install Aquamacs 2.4 from here "http://aquamacs.org/"
Install the Aquamacs SLIME package from here "http://aquamacs.org/download.shtml"
This will not work so...
Get the latest version of SLIME from here "http://common-lisp.net/project/slime/#downloading" - you want the CVS snapshot tar file
Unpack the SLIME tar file and copy it into
/Library/Application Support/Aquamacs Emacs/SLIME
Seems to work OK for me...
I know the OP wants to use Emacs for Clojure dev. I'm an emacs fan myself, but I found using Enclojure (http://www.enclojure.org/home) to be a great way to get started quickly with hacking Clojure.
Today I would head for https://github.com/tehcurtis/aquamacs-emacs-starter-kit/network
this is for ruby and wont work at first but anyway. git clone and copy things to Preferences.el according to readme. Fix the brokenness by edit the ~/Library/Preferences/Aquamacs Emacs/ and comment out almost everything in modes.el (I have only (setq-default indent-tabs-mode nil) left in the file)
The good part: you have installed elpa-package-manager with less hassle
now: use
M-x package-list-packages
go to
clojure-mode (press I)
slime (press I)
slime-repl (press I)
Press X to install
done.
Caveat: clojure-jack-in wont work so you have to
M-x slime-connect
and press enter twice and y to start.