May Emacs Carnival
May I recommend… / En mayo recomiendo…
Nota: Este post tiene una versión en inglés para participar en el Emacs Carnival. La versión en castellano está tras la inglesa.
May I recommend
For this month Emacs Carnival I've thought of two types of recommendations. First some amusements inside Emacs, and then some things I liked when skimming through the Emacs 31 NEWS file.
- Amusements
I think nowadays some extra features of Emacs like the games are considered "bloat", but for me these types of things are the ones that make me happy.
I recommend to evaluate
(info "(emacs) Amusements")inside Emacs and take a look at the amusements section. It has a lot of games to play with. I have yet to find out how to finish the text-adventure game Dunnet. There is also the classic Conway's Game of Life, pong, snake…And of course we have
M-x tetris, which being inside Emacs is deeply customizable. In fact, I even implemented a very primitive way of holding pieces the way the modern version of Tetris does. - Emacs 31 NEWS
First of all, I recommend using
C-h nto see the latest news for your Emacs version. It's really incredible the vast amount of improvements each new release brings. I am not a very advanced Emacs user but still I always find a couple of things that help me improve my workflow.In this occasion I have found
(setq elisp-fontify-semantically t), which analyses your Elisp code and highlight some definitions and variables. For example, I can write in the scratch buffer the name of some function of mine, and it would let me see the definition by simply hovering the mouse over the name.
En mayo recomiendo
Para el Emacs Carnival de este mes he pensado en dos tipos de recomendaciones. Primero algunas para pasatiempos dentro de Emacs y luego otras relacionadas con el archivo NEWS de Emacs 31.
- Pasatiempos
Hoy en día quizás se considera un desperdicio de espacio los juegos que trae Emacs integrados, pero a mi me encantan estos detalles que se incluían antiguamente en los programas.
Para empezar, recomiendo evaluar
(info "(emacs) Amusements")dentro de Emacs para leer el manual de los pasatiempos. Ahí vienen detallados todos los juegos que trae Emacs, que son un montón. Todavía no he conseguido pasarme la aventura gráfica Dunnet. Además está el clásico Juego de la vida de Conway, el pong, el snake etc.Y por supuesto tenemos el
M-x tetris, que como todo lo que está dentro de Emacs es altamente personalizable. Yo incluso implementé hace unos años el modo para guardar piezas típico de los tetrises modernos. - Noticias de Emacs 31
Para empezar, recomiendo usar
C-h npara ver las últimas noticias para tu versión de Emacs. Es apabullante la cantidad de mejores que introducen en cada versión. Yo no soy un usuario demasiado avanzado de Emacs, pero aún así siempre encuentro un par de cosas que me ayudan a mejorar mi flujo de trabajo.En esta ocasión he encontrado
(setq elisp-fontify-semantically t), que analiza el código de Elisp que escribes y te resalta funciones o variables. Además, pasando el ratón por encima puedes ver la definición de tus propias funciones, y te dice dónde están definidas por si no te acuerdas.
Starter kits (kits de inicio)
Nota: Este post tiene una versión en inglés para participar en el Emacs Carnival. La versión en castellano está tras la inglesa.
Starter kits
Emacs Prelude
I started my Emacs config file from scratch because I didn't know that starter kits existed. But a couple of years after using Emacs I found Emacs Prelude and migrated my configuration to use Prelude.
With Prelude I learnt a lot of things (avy, completion frameworks, flymake…). Emacs Prelude was like a different editor compared to my orginal configuration.
Eventually, I stopped using Prelude because there were a lot of things I didn't understand at the moment (like the whitespace-mode or flymake) and wanted to learn using them one by one in my own configuration. But it was wonderful to rediscover Emacs through Prelude, and it improved my Emacs knowledge a lot.
Kits de inicio
Emacs Prelude
Cuando empecé a usar Emacs, partí de un fichero de configuración vacío, porque no sabía ni que existían distintas "distros" de Emacs preconfiguradas.
Pero tras unos dos años de usar Emacs descubrí Emacs Prelude, y migré mi configuración para usarlo. Gracias a Prelude descubrí un montón de cosas que desconocía (como avy, los motores de búsqueda, flymake etc.). Con Prelude, Emacs parecía un editor completamente distinto al Emacs que tenía con mi propia configuración.
Con el paso del tiempo dejé de usar Prelude porque había demasiadas cosas que no entendía (como los colores de whitespace-mode o flymake), y prefería ir probándolas poco a poco en mi propia configuración para entederlas mejor. Pero fue realmente increíble redescubrir Emacs gracias a Prelude. Gracias a eso conseguí pasar de ser un novato a ser un usuario con bastante conocimiento de Emacs.
Hola mundo en Emacs Lisp
Llevo mucho tiempo queriendo mejorar mi conocimiento de Emacs Lisp, pero al final nunca tengo hueco para aprenderlo en profundidad.
De momento he hecho una especie de "Hola mundo" un poco más complejo,
usando la función let de Elisp para declarar variables.
Es una función muy sencilla, que pide al usuario el nombre, y luego le
da los buenos días y la fecha. Con esta función he usado por primera
vez let, y además he descubierto la distintas formas en las que se
puede conseguir una fecha con la función format-time-string.
A continuación dejo el código y un ejemplo de uso cuando el usuario introduce la cadena "Carlos" por teclado.
(defun holamundo() (interactive) "Hola mundo interactivo que pide el nombre del usuario y dice la fecha de hoy." (let ((nombre (read-string "Introduce tu nombre: ")) (diasem (format-time-string "%A")) (dia (format-time-string "%d")) (mes (format-time-string "%B"))) (message "Buenos días %s, hoy es %s %s de %s" nombre diasem dia mes))) (holamundo) "Buenos días Carlos, hoy es domingo 22 de marzo"
LLM
Inspirado por el post de Derek Sivers he decidido crear una entrada sobre cómo uso los modelos de lenguaje en este blog y en general.
En los posts que tengo en español que yo recuerde no los he usado para nada, y en los que tengo en inglés alguna vez le he pasado alguna frase para que me revisara la gramática.
Aparte de eso, igual en el futuro hago algún experimento con Gemini, ChatGPT, Grok o el modelo que sea, pero en principio no me apoyo en LLMs para escribir.
En mi día a día a veces uso Gemini sobre todo si veo que me puede ahorrar tiempo para buscar algo, o para preguntar alguna curiosidad que me surja.
También he probado algunos modelos locales con ollama, pero como no tengo mucha potencia de cálculo local eran modelos muy sencillos.
The people of Emacs
The philosophy behind Emacs fosters a really wonderful community. There are tons of people that have helped me learn and improve my Emacs configuration and knowledge, but in order to write this post I've chosen three.
Mickey Petersen
When I finished the Emacs tutorial, I was wondering how I could improve my skills. I knew about Planet Emacs, but I didn't have the knowledge to understand the majority of the posts written there. Although I knew the basics of Emacs, I wanted to advance to the next level.
Then I discovered "Mastering Emacs". It was through reading that book that I really went from noob to grasping the more advanced capabilities of the text editor. I became able to skim through other people's posts in Planet Emacs and test their Elisp snippets, programs or configurations.
I have to thank Mickey because it was a really enjoyable read. I could understand every bit of the book without making any effort at all, which finally helped me to learn to use M-x, install and configure packages and evaluate Elisp code.
Sacha Chua
I think it was after reading "Mastering Emacs" that I started looking at Sacha Chua's posts. Sacha Chua is, of course, one of the main pillars of the Emacs community, and in fact Planet Emacs is run by her.
The first configuration that I cloned with git was Sacha's. I learnt a lot by skimming through her quasi-infinite Sacha.org. I started to discover a lot of Emacs packages that I have used every day since.
And of course there is the Emacs News and the Emacs Conf. Sacha is the one who gathers a lot of people around Emacs.
Protesilaos Stavrou
My next step in the Emacs Way is to properly learn Elisp. Here I think Prot is the king, with his affordable coaching lessons. I can't think of a better way to learn. He is patient, knows how to adapt to every person and is a very good teacher. With his help, you can start to craft your very own Emacs configuration including macros and other advanced Elisp stuff.
Then of course there are the Modus themes, which are now part of Emacs itself. There are also a lot of packages written by Prot, accompanied by top-notch documentation. His code is also very clear and easy to read. Perfect for learning.
Prot has also his fantastic "Prot Asks" series of videos, in which he talks with people about a lot of different topics. I was lucky to inaugurate the series of videos and it was a pleasure to chat for one hour with him. Of course, the common denominator of all the people around Prot is the love for Emacs and in general libre software.
Conclusion
Emacs is more than the flagship of the libre software movement. It is a way of life. I think the best way to conclude this post is with a quote from Prot himself:
"Choosing Emacs is not just a matter of deciding how to edit text. It largely is about what kind of person one wants to be."
