Hot answers tagged

8

Note that the following answer is mostly a citation of two answers in the corresponding reddit article. They changed the template system in orgmode 9.2. You get the old easy-template system back by adding (require 'org-tempo) to your init file or by adding org-tempo to the list org-modules. You can do that by customizing org-modules. Alternatively you ...


7

set package-check-signature to nil download the package gnu-elpa-keyring-update and run the function with the same name. reset package-check-signature to the default value 'allow-unsigned` This worked for me.


6

The julia-mode package is in MELPA, but not in MELPA Stable, so you have to add another repository. (require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (package-initialize) If you prefer to use packages ...


5

Is there an equivalent of M-x package-list-packages for those libraries? The el-get package manager supports installation from the EmacsWiki; after doing M-x el-get-emacswiki-build-local-recipes, M-x el-get-list-packages will show packages from EmacsWiki as well. Is there an equivalent of (use-package foo), which I could put in my init file? (el-get-...


4

Adding following hack, which temporarily inhibits read-only-mode, is working for me: (advice-add 'package-install-from-archive :around (lambda (orig-fun &rest args) (let ((inhibit-read-only t)) (apply orig-fun args)))) The full relevant config looks like: (dir-locals-set-directory-class (concat user-emacs-directory "elpa") '...


4

Elpa seems to be having issues again. (Reddit discussion.) Maybe try adding (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") to your config as mentioned here.


3

Add the following before package-initialize: (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") This is apparently a bug in Emacs 26.2 for MacOS. I found this solution in this reddit thread.


3

There are several: Quelpa Quelpa allows for fetching packages from arbitrary sources and building them into a format that can be installed by package.el Straight Install Emacs packages listed on MELPA, GNU ELPA, or Emacsmirror, or provide your own recipes. Packages are cloned as Git (or other) repositories. Borg Assimilate Emacs packages as Git submodules. ...


3

You can wrap that in ignore-errors, to ignore any error evaluating it might raise: (ignore-errors (require-package 'clips-mode)) If you want to ignore only particular errors then you can instead wrap it with condition-case: condition-case is a special form in C source code. (condition-case VAR BODYFORM &rest HANDLERS) Regain control when ...


3

All packages are in ~/.emacs.d/elpa Package dependencies are listed in files ending with "-pkg.el" in each package directory. To find which packages require some package, find "-pkg.el"'s that contain that package's name. Using M-x rgrep: Example: find all packages that require "popup" package. M-x rgrep prompts: Search for: Each dependency is in a ...


3

I worked around this before by making an exception for autoloads. From my config: (define-derived-mode emacs-lisp-autoloads-mode emacs-lisp-mode "Autoloads" "Marker mode for package autoloads files.") (add-to-list 'auto-mode-alist '("autoloads\\.el\\'" . emacs-lisp-autoloads-mode)) (add-to-list 'auto-mode-alist '("loaddefs\\.el\\'" . emacs-lisp-autoloads-...


3

I found the same thing (not following my styles as defined in a .clang-format file, which happens to be in the parent directory in my case), and I think that the problem is in the way that the assume-file-name argument is defaulted if absent when calling the function clang-format-region from clang-format.el: (unless assume-file-name (setq assume-file-...


2

package.el keeps track of the packages you asked to install (as opposed to those that are auto-installed as dependencies) in the custom variable package-selected-packages. So if you copy your ~/.emacs (in which Custom normally writes settings like that of package-selected-packages) to another system, all you should need to do is M-x package-install-selected-...


2

If you try to install the package gnu-elpa-keyring-update (which seems to have the purpose of updating the keys used by the package manager), you will see in its description that you can do: gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40 on the commandline to get new keys manually. To make sure you are asking for the correct key (...


2

add-function is designed to work with variables holding functions. You probably want advice-add instead. See Advising Functions


2

Noe that the warnings you see are real: your code happens to work because you're lucky enough that it doesn't get byte-compiled, but if for some reason it gets byte-compiled then it won't work any more (unless flycheck was loaded already when the code got byte-compiled). So to fix your code "right", you have two options: add a (eval-when-compile (require '...


2

Thanks to the comment by @wvxvw, this is how I finally ended up solving the problem. Initially, I tried going to package-initialize, and instrumenting it (by pressing C-u C-M-x) which causes it to open the debugger whenever it's called. Unfortunately, evaluating my init file by opening it and running M-x eval-buffer <RET> didn't cause the debugger to ...


2

See electric-operator - minor mode to automatically add spacing around operators


1

First of all run emacs with --debug-init from your terminal and check if complains about being unable to verify the elpa archive due to an invalid key. If that is the case, copy the public key displayed to you. I ran into this problem because the GPG keys used by the ELPA package manager to verify authenticity of packages downloaded from the GNU ELPA ...


1

As @xuchunyang pointed out, package-refresh-contents takes an optional argument which allows it to be called asynchronously. Therefor one can call it programmatically like: (package-refresh-contents t) This works perfectly and unlike a normal call to package-refresh-contents made in your init.el, which would lock up your Emacs, you can continue as normal ...


1

If you update packages in Emacs 26 you can use the same .emacs.d directory from Emacs 27.


1

I was in a similar situation few weeks ago, I wanted to have a fresh emacs instance but still wanted the old emacs around if I needed. I made a folder called ~/newhome and when starting emacs I told emacs the home dir is that, HOME=/Users/administrator/newhome emacs example.txt Remember to create a .emacs.d in the newhmoe directory too.


1

No. As far as I know, there is no equivalent of package-list-packages or use-package for libraries uploaded to the Emacs Wiki Elisp Area. In general, you download the file(s) for a library to a local directory that is in your load-path, and then require the library feature name or main-file name (e.g. (require 'isearch+). Questions about things such as best ...


1

package-autoremove removes packages returned by package--removable-packages: Return a list of names of packages no longer needed. These are packages which are neither contained in package-selected-packages nor a dependency of one that is. Old versions is marked for deletion by invoking package-menu-mark-upgrades: Mark all upgradable packages in ...


1

Adding the following to my .emacs seems to solve the problem: (package-initialize) But I'm a little bit confused, because 41.1 Packaging Basics says that Whenever Emacs starts up, it automatically calls the function package-initialize to load installed packages. Moreover, I had the same version of Emacs on a Linux machine, and I'm using the same ...


1

The code you quote only does what the comment says, i.e. "Bootstrapping use-package". If you want to install the selected packages, you have to do that explicitly by calling package-install-selected-packages.


1

This problem was solved by forcing emacs to use https instead of http. For some reason, emacs is using http as default instead of https. Steps to solve: (customize-variable RET package-archives) changed http to https in url fields I wonder why emacs would use http as a default?...


1

I just had to add (add-hook 'org-mode-hook 'org-bullets-mode) to my init file. Solved.


1

To address the side questions: Did I install Org 9.2 correctly? Yes. Installing org via list-packages will "override" the default version. This can be seen by running org-version. Note that it may be necessary to restart Emacs (or the Emacs server). If this is a bug, how do I submit it? With report-emacs-bug? According to the org-mode homepage (at the ...


1

The documentation about package.el should be improved (see bug #29420). I think list-packages does not list all packages available on the system but only displays manageable packages (c.f. the built-in documentation). The idea behind package.el is to be able to download packages and install them. Packages are vers­ioned and have versioned dependencies....


Only top voted, non community-wiki answers of a minimum length are eligible