REPL for Emacs Lisp – Dev

The best answers to the question “REPL for Emacs Lisp” in the category Dev. QUESTION: What are some REPLs for Emacs Lisp? Is there only one that is within Emacs? Are there some that run inside terminal outside Emacs? ANSWER: There is a (work in progress) REPL for Emacs for use from the command line. … Read more

How to live with Emacs Lisp dynamic scoping? – Dev

The best answers to the question “How to live with Emacs Lisp dynamic scoping?” in the category Dev. QUESTION: I’ve learned Clojure previously and really like the language. I also love Emacs and have hacked some simple stuff with Emacs Lisp. There is one thing which prevents me mentally from doing anything more substantial with … Read more

How to debug elisp? – Dev

The best answers to the question “How to debug elisp?” in the category Dev. QUESTION: Normally the easiest way to debug is using printf. What can I do to debug emacs-lisp? How can I print something to emacs editor from elisp? Or is there any way to debug elisp code? For example, how can I … Read more

How do I create an empty file in emacs? – Dev

The best answers to the question “How do I create an empty file in emacs?” in the category Dev. QUESTION: How can I create an empty file from emacs, ideally from within a dired buffer? For example, I’ve just opened a Python module in dired mode, created a new directory, opened that in dired, and … Read more

How can you write multiple statements in elisp 'if' statement? – Dev

The best answers to the question “How can you write multiple statements in elisp 'if' statement?” in the category Dev. QUESTION: In elisp, there is an ‘if’ case where I would like to perform many different things: (if condition (do-something) (do-something-else) …) However, (do-something-else) is executed in the else-case only. How can you specify a … Read more

How can I check if a file exists using Emacs Lisp? – Dev

The best answers to the question “How can I check if a file exists using Emacs Lisp?” in the category Dev. QUESTION: I would like emacs to mark files that are generated as read-only when they’re opened. The part of the puzzle that I’m missing is how to check if a file “exists”. I currently … Read more