R-mode is named r-mode and causing issues - emacs

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!

Related

I can't install org-checklist

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.

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.

cannot open load file: /yasnippet

I receive this message every time I start emacs
Emacs 24.2
Win7 64 and Ubuntu 12.10
yasnippet 0.8.0 installed with package-list
If there is a way to fix it ?
yasnippet doesn't get initialised automatically when installed with elpa, which I find unconventional. You still need to add the yasnippet directory into your load-path.
Here is my set up in my .emacs
;; yasnippet
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet-0.8.0")
(require 'yasnippet)
(setq yas-snippet-dirs '("~/.emacs.d/elpa/yasnippet-0.8.0/snippets" "~/Dropbox/Applications/Customise/emacs/myyassnipets"))
(yas-global-mode 1)
This is the sort of message I would expect to see if you're calling load or load-file in your init.el with a bad path. Look for any uses of those functions and correct the path if you can.
If this is in code you control, you probably want to call (require 'yasnippet) instead of directly loading the file.

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 and slime stopped cooperating for me

I'm trying to use slime from CVS (2009-01-05) but keep getting this error:
LOAD: A file with name
/usr/share/common-lisp/source/slime/swank-loader.lisp does not exist
I've stripped my .emacs down to just:
(setq inferior-lisp-program "/usr/bin/clisp")
(add-to-list 'load-path "/home/ssm/lisp/slime/")
(require 'slime)
(slime-setup)
I've deleted my ~/.slime directory, started with 'emacs -q' and eval'd the above code but I keep getting the LOAD error when I run slime (via M-x slime). Any ideas on how to fix this error?
FWIW, I've tried to install slime via apt-get but I keep getting errors there too about cl-swank being broken. That's a whole different story.
Have you purged the slime pkg you installed via apt-get? It looks like emacs is still reading the old site-specific configuration setup by apt-get. Try starting emacs with the -Q option, which prevents loading of site-specific (as well as user specific) customization, and see if the problem still occur.
I agree with huaiyuan that older files may be being picked up.
Try (load-file "/path/to/slime.el") instead of require. (You did remove the .elc files from your old versions, right? emacs will load from .elc files in preference to .el files, even when the .el is newer.)
The next thing to try is M-x customize-variable slime-backend and setting that to the absolute path of swank-loader.lisp. I think that will fix it for sure, but I am not sure why it doesn't work to begin with.
Thanks guys, ~/.emacs:
(setq inferior-lisp-program "<path-to-lisp-compiler>/bin/lisp")
(setq slime-backend "<path-to-slime>/swank-loader.lisp")
(add-to-list 'load-path "<path-to-slime>/")
;;(require 'slime)
(load-file "<path-to-slime>/slime.el")
;;(slime-setup)
(slime-setup '(slime-fancy))
works :)