#Emacs question: How does one load (or include or import or however the proper terminology is) a elisp file relative to the current elisp file? I can only find load and load-file, but these seem to always load stuff relative to the load path or the CWD of Emacs itself, not the file.

Edit: It's solved: (load (expand-file-name "myfoo.el" (file-name-directory (macroexp-file-name))))

#elisp #emacsLisp

[Перевод] Jupyter-Ascending — новый способ работы с Jupyter Ноутбуками в Emacs

Вы обожаете Emacs, но вам необходимо работать с Jupyter ноутбуками? Данная статья расскажет еще об одном способе, как их подружить. Заходите под кат =)

https://habr.com/ru/articles/910812/

#jupyter #emacs #emacs_python #emacslisp #перевод

Jupyter-Ascending — новый способ работы с Jupyter Ноутбуками в Emacs

05 мая 2025 года Duncan Britt публиковал статью о том, как можно работать с Jupyter ноутбуками в Emacs. Он создал пакет Jupyter-Ascending , чтобы упростить редактирование и выполнение Python кода в...

Хабр

What brought you to #Emacs?

@myTerminal I was using Tmux, Vim, Bash, AWK, and FZF, and I kept trying to write scripts for all of these programs that would allow me more coordination between them. For example, I once wanted to launch a process from Vim in a second terminal in a Tmux split-screen, capture it’s output into a temporary file, then when the process exited, use AWK to select symbols from the file that I could later feed into FZF. Or I would write a little wrapper Bash script that would run a build process and send a notification and trigger Tmux to automatically switch to the shell when the process completed.

I was always thinking to myself how I wished all of these separate tools, which were all doing one just thing and doing it well (the Unix philosophy), could be connected together without needing to use pipes or complicated message passing through temporary files or through DBus. And I also wished they were all written in the same programming language, instead of having a different language for Bash, AWK, VimScript, and the config languages for Tmux, or using long chains of CLI options stored into partial script files.

Then it hit me one day that this thing that I was wishing for, which coordinated between the terminal multiplexer, command shell, editor, and auto-completion framework and was all scripted with just one programming language, this thing already existed and it was called Emacs.

Then I finally understood what all the fuss was about, and switched to Emacs forever.

#tech #software #lisp #Emacs #EmacsLisp #UnixPhilosophy #FreeSoftware #FLOSS #FOSS #CLI #CommandLine

Progress on my clone of the Emacs Lisp interpreter

This took me three months (a month longer than I had hoped), but I finally have merged it into the main branch!

This patch rewrites the Emacs Lisp lexer and parser in Scheme using Scheme code that is 100% compliant with the #R7RS standard, so it should now work across all compliant Scheme implementations. Previously the old parser relied on #Guile -specific regular expressions.

This patch also implements a new feature where a stack trace is printed when an error occurs. This of course makes debugging much, much easier. Previously the old parser did not keep track of where code evaluation was happening, it simply produced lists without source location information. The new parser constructs an abstract syntax tree (AST) and source locations are attached to the branches of the tree which can be used in error reporting and stack traces.

Next I will make whatever minor tweaks might be necessary to get my Emacs Lisp interpreter run on other Scheme implementations, in particular MIT Scheme, Gambit, Stklos, and Gauche. I would also like to try to get it running on Chicken and Chez, although these are going to be a bit more tricky.

Then I will continue with the task of implementing a new declarative GUI library.

#tech #software #FOSS #FunctionalProgramming #Lisp #Scheme #SchemeLang #EmacsLisp #Emacs #Schemacs #GuileScheme

Define new monadic lexer library (gypsum lexer)

closes #8 There are two reason to rewrite the reader: 1. The current reader does not track source locations, so error messages do not point you to where they occur 2. The current reader relies on the Guile-specific regular expression library, and this is not portable. This patch defines a ne...

Codeberg.org

TURNS OUT that if you look carefully at the debugger in the *Backtrace* buffer after you make a mistake in Emacs lisp, it TURNS OUT that you can find your dumb mistake where you used the wrong goddam type

#emacs #elisp #emacslisp

@me I guess you could fairly easily write a macro that automatically created a lexical scope and added some prefixes to variable used within its body - Doug Hoyte's "Let over lambda" book has #CommonLisp examples of this kind of approach as way to cut down the syntactic overhead of using gensym in macros. Without much thought, I'd assume something similar could be done in #EmacsLisp

As a sort of codicil to my last "Wall Clock" video, here is one where I demonstrate how to fix two small bugs in the code as it exists on Ramin Honary's github repository:

https://www.youtube.com/watch?v=qYq-mskrKSM

#emacs #emacslisp

How to fix two buglets in Ramin Honary's Emacs analog clock

YouTube

""You don't have to like Emacs to like it" - this seemingly paradoxical statement is the secret of GNU Emacs. The plain, 'out of the box' Emacs is a generic tool. Most people who use it, customize it to suit themselves."

— Robert J. Chassell: Emacs Lisp - An Introduction, p. 185

Ok, I've read all chapters, but I'm not setting this book as read until I finish some exercises (and read appendixes). I'm especially interested in the plain text graphs library since I enjoy data visualization whenever I can work on it.

Another note to myself. I've used yank-pop first time today. I knew of kill-ring but never bothered to delve deeper since no other software I'm using implements it in a way to store more elements on the clipboard.

And I have my eyes on the next goals as well: The Emacs Lisp Elements by Protesilaos Stavrou. I'll try to read it on my e-ink screen, because I'm not utilizing it enough (it would be so nice to have touch screen gestures to scroll working on my #debian with #i3).

And after that, I'll check if there are any simple packages that need co-mainteners. #EmacsLisp

Emacs Lisp - An Introduction - BookWyrm

Social Reading and Reviewing

I'm loving the gentleness of introduction that this book provides. It goes slowly through the code examples and shows you how to read the #EmacsLisp code.

And a spoiler: Here is my attempt for the Chapter 8 exercise: (defun test-search (string) "Search for string and left a point there if it is found." (interactive "sSearch for: ") (let ((found) (current (point)) (len (length string))) (save-excursion (while (and (< (+ len current) (point-max)) (not found)) ;; why complicate? just whole string on each position. (if (string-equal string (buffer-substring-no-properties (point) (+ (point) len))) ;; we found the string (progn (message "Found!") (setq found t) ) (progn ;; else (setq current (+ 1 current)) (forward-char) ) ) ) ) (when found ;; we found the string so we move the point. (goto-char (+ current len)) ) ) )

(comment on Emacs Lisp - An Introduction)

BookWyrm

Social Reading and Reviewing