`M-x list-packages` not showing available packages - emacs

M-x list-packages is not showing available packages from Melpa and Marmalade. It is only showing built-in and installed packages.
It was working before. I am running emacs-26.3 on Debian Buster.

You may want to make sure that your lines have t at the end.
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) <-- notice t.
I see that your melpa does, but marmalade does not.
I was having a similar issue (lsp-mode wasn't showing up) and I noticed I was missing a t at end. Wrote it in then ran M-x package-refresh-contents and it worked.

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.

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.

Installing ghc-mod from melpa: Error during download request

I am following the instructions here to install ghc-mod in Emacs. I can add the melpa repos and list packages with M-x package-list-packages, then when I go to install the ghc package, this happens:
Debugger entered--Lisp error: (error "Error during download request: Not Found")
signal(error ("Error during download request: Not Found"))
error("Error during download request:%s" " Not Found")
package-handle-response()
package-download-tar(ghc "20141130.1848")
package-download-transaction((ghc))
package-install(ghc)
mapc(package-install (ghc))
package-menu-execute()
call-interactively(package-menu-execute nil nil)
In .emacs I have
(require 'package)
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives
'("elpa" . "http://tromey.com/elpa/"))
; old url for melpa
;(add-to-list 'package-archives
; '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "http://melpa-stable.milkbox.net/packages/"))
;; Add the user-contributed repository
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
I am using emacs 24.3.1 on ubuntu. How to proceed? Thanks.
[EDIT] I installed this package successfully by downloading it myself but I'd still like to know what's wrong here.
It looks like you may have started working with MELPA (not MELPA stable):
You have the MELPA package repository in your .emacs (though commented out), and
The traceback shows that you were trying to install version 20141130.1848, which is a MELPA-style timestamp.
But MELPA is disabled in your init file by the commenting. You also have MELPA stable listed, which uses a different versioning scheme based on Git tags instead of on build timestamps. The latest version of ghc in MELPA Stable is currently 5.2.1.2.
I think you may have made this change without running package-refresh-contents, which updates your local package list. (Note that this is often done automatically, e.g. by loading the package list with package-list-packages).
So when you tried to install ghc, based on the stale package list that Emacs had it looked for version 20141130.1848, but could only find version 5.2.1.2. Try again after running M-x package-refresh-contents.
Note that you also have Marmalade enabled, which also contains ghc (version 1.10.2).
Since there is some package overlap between MELPA and Marmalade, I don't recommend using both concurrently. You can manually pin packages to one repository, but this gets to be a pain. I switched to MELPA Stable exclusively a few months ago, and I've been very happy with 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.