I like generating long LaTeX documents from org-mode because, for one thing, org-mode has nice section folding. But not everyone I work with uses Emacs, so its better to work in LaTeX directly ra...
I’m not sure whether automatic text completion on a mobile device is a net good. It sometimes saves a few taps, but it seems like it’s at least as likely to cause extra work. Although I’m a...
https://www.johndcook.com/blog/2023/01/30/good-autocomplete/
I had some errors in a recent blog post that might have been eliminated if I had programmatically generated the content of the post rather than writing it by hand. I rewrote the example in this p...
https://www.johndcook.com/blog/2022/09/05/literate-programming/
With org-mode you can keep data, code, and documentation in one file. Suppose you have an org-mode file containing the following table. #+NAME: mydata | Drug | Patients | |------+----------| | X ...
Given a random variable X, you often want to compute the probability that X will take on a value less than x or greater than x. Define the functions FX(x) = Prob(X ≤ x) and GX(x) = Prob(X > x) ...
The previous post discussed how to use org-mode as a notebook. You can have blocks of code and blocks of results, analogous to cells in a Jupyter notebook. The code and the results export as obvi...
You can think of org-mode as simply a kind of markdown, a plain text file that can be exported to fancier formats such as HTML or PDF. It’s a lot more than that, but that’s a reasonable place...
https://www.johndcook.com/blog/2022/08/02/org-babel-vs-jupyter/
Imagine you could list the contents of a directory from a command line, and then edit the text output to make things happen. That’s sorta how Emacs dired works. It’s kind of a cross between a...
https://www.johndcook.com/blog/2021/12/12/deleting-files-in-dired/
I often work in a sort of amphibious environment, using Unix software on Windows. As you can well imagine, this causes headaches. But I’ve found such headaches are generally more manageable tha...
https://www.johndcook.com/blog/2020/10/17/windows-files-from-eshell/
This morning I found out that Emacs org-mode has its own markdown entities, analogous to HTML entities or LaTeX commands. Often they’re identical to LaTeX commands. For example, approx is the a...
Emacs has a relatively convenient way to add accents to letters or to insert a Unicode character if you know the code point for the value. See these notes. But usually you don’t know the Unicod...
I didn’t realize until recently that there’s a connection between the control key on a computer keyboard and controlling a mechanical device. Both uses of the word control are related via ASC...
https://www.johndcook.com/blog/2019/09/28/control-characters/
Emacs has been called a text editor with ambitions of being an operating system, and some people semi-seriously refer to it as their operating system. Emacs does not want to be an operating syste...
https://www.johndcook.com/blog/2019/07/03/journalistic-stunt-with-emacs/
The syntax of regular expressions in Emacs is a little disappointing, but the ways you can use regular expressions in Emacs is impressive. I’ve written before about the syntax of Emacs regular...
https://www.johndcook.com/blog/2018/01/27/emacs-features-that-use-regular-expressions/
You can select blocks of text in Emacs just as you would in most other environments. You could, for example, drag your mouse over a region. You could also hold down the Shift key and use arrow ke...
https://www.johndcook.com/blog/2017/08/09/selecting-things-in-emacs/
Here are a few things I’ve had to figure out in the process of setting up Emacs on a Mac, in particular with getting shell-mode to work as I’d like. Maybe this will save someone else some tim...
https://www.johndcook.com/blog/2016/11/30/setting-up-emacs-shell-on-a-mac/
A few days ago I wrote about creating ASCII art in Emacs using ditaa. Out of curiosity, I wanted to try making the Five Lemma diagram. The examples in the ditaa site all have arrows between boxe...
https://www.johndcook.com/blog/2016/06/21/five-lemma-ascii-art-and-unicode/
Yesterday I wrote about ASCII art diagrams and gave four reasons you might want to use this ancient approach to creating simple diagrams: It could be quicker than creating a graphical image . Yo...
https://www.johndcook.com/blog/2016/06/15/ascii-art-diagrams-in-emacs-org-mode/
A bigram is a pair of letters. For various reasons—word games, cryptography, user interface development, etc.—people are interested in knowing which bigrams occur most often, and so such info...
When you have Emacs split into multiple windows, how do you move your cursor between windows? How do you move the windows around? Update (27 Jan 2015): You may want to skip the post below and use...
https://www.johndcook.com/blog/2015/01/26/managing-emacs-windows/
This is the second in my series of posts pointing out resources on my site. This week’s topic is Emacs. Emacs kill (cut) commands Emacs point (cursor) movement Getting started with Emacs on Win...
I spoke with Sacha Chua last week. We talked about entrepreneurship, Emacs, having eclectic interests, delegation, and more. J: I ran into you by searching on Emacs topics. When I look at your bl...
https://www.johndcook.com/blog/2013/03/19/interview-with-sacha-chua/
When I got a new computer a few days ago, I installed the latest version of Emacs, 24.2, and broke my Python environment. I decided to re-evaluate my environment and start over. I asked a questio...
https://www.johndcook.com/blog/2013/01/29/python-emacs-setup/
Vivek Haldar had a nice rant about editors a couple days ago. In response to complaints that some editors are ugly, he writes: The primary factor in looking good should be the choice of a good fo...
The most basic text editor commands operate on lines and characters: move up or down a line, delete the next or previous character, etc. More advanced commands operate on context-specific semanti...
https://www.johndcook.com/blog/2012/07/25/editing-by-semantic-units/
Ruby creator Yukihiro Matsumoto gave a presentation How Emacs changed my Life in which he explains how Emacs influenced him personally and how it influenced the programming language he created. H...
https://www.johndcook.com/blog/2012/03/28/how-emacs-influenced-ruby/
Emacs lets you split your screen into windows, what other applications might call panels. This can be quite handy. However, I often want to move the windows around and I couldn’t find how to do...
https://www.johndcook.com/blog/2012/03/07/shuffling-emacs-windows/
The Windows clipboard only remembers the most recent thing you copied . This can be very disappointing. Maybe you cut a large block of text intending to paste it somewhere, but without thinking y...
https://www.johndcook.com/blog/2012/03/07/clipboard-history/
I’ve been trying out Eshell lately. It’s a shell implemented in Emacs Lisp. Here I’ll mention a few features I’ve found interesting. The command M-x shell lets you run a shell inside Emac...
This is a continuation of my previous post, Running Python and R inside Emacs. That post shows how to execute independent code blocks in Emacs org-mode. This post illustrates calling one code blo...
https://www.johndcook.com/blog/2012/02/09/mixing-r-python-and-perl-in-13-lines-of-code/