10. Distribution

To distribute your application there are different options.

  • MELPA: It is the official package manager of Emacs. You can see it as an index, since they only store the name of the package and the address of the repository. It has its own rules, linter and procedures. Among them, you must send a Pull Request to their GitHub repository following the instructions they themselves provide. It is a slow and tedious process because of the different reviews, but it is the most accessible way for any user to install your package.
  • Self-managed packages: You can manage the packages, and their repositories, using some external software such as straight. This lets you install packages from any Git repository, you being the ultimate responsible party when it comes to evaluating the code and possible conflicts. It is a good option to distribute your package if you do not want to go through the MELPA review process. In exchange, you set the quality filter.
  • Manually: If you do not want to go through the MELPA review process and you also do not want to force your users to have an external package manager, you can ask them to install your package manually. It is not a complex process. You just have to ask them to download the code of your package somewhere on their computer and add the following code to init.el:
(add-to-list 'load-path "/path/to/your/package/")
(require 'tu-paquete)

Unfortunately it loses the ability to update automatically.

To finish there is one last option: compiling the source code of Emacs including your package. This way you will be able to distribute a binary with your software included. If on top of that you add a configuration that hides interface elements that are not going to be used (such as toolbars, menu, scroll), and make the first task of Emacs be to run your package, you will achieve a classic desktop application. This process is complex and we are not going to see it in this course, but if you are interested you can read Creating desktop applications using the Emacs core.

In conclusion we have the following options.

Option Difficulty for you Difficulty for users Pros Cons
MELPA High Low Any user can install your package with a simple command. You will have to learn how to include it, pass the reviews of the administrators and maybe it will be rejected.
Self-managed packages Medium Medium Any user can install your package and keep it updated. Users will have to install an external package manager, if they do not have one already.
Manual Low High It requires neither filters nor external software. Users will have to install it manually and will not be able to keep it updated.
Binary High Low Download and open. It cannot be easier. They will not be able to keep it updated. It is not integrated with the user's Emacs. It takes up a lot of space.

There is no ideal solution, and each piece of code will have its place. For example, if we are talking about a very elaborate package, maybe MELPA is the best option. If we are talking about a very simple package, you could prepare it for self-managed packages.

Activity 1

Install the game of chess via MELPA. The package is called chess.

Activity 2

Install straight.el following its instructions. Then install the package scroll-page-without-moving-point.el.

This work is under a Attribution-NonCommercial-NoDerivatives 4.0 International license.

Desafíos de programación atemporales y multiparadigmáticos

Desafíos de programación atemporales y multiparadigmáticos

Te encuentras ante un librillo de actividades, divididas en 2 niveles de dificultad. Te enfrentarás a los casos más comunes que te puedes encontrar en pruebas técnicas o aprender conceptos elementales de programación.

Buy the book

Will you buy me a coffee?

This is how I keep writing without ads or paywalls.

Comments

There are no comments yet.