Jupyter is great. Yet, I find myself missing all the little tweaks I made to Emacs whenever I have Jupyter open in a browser. The obvious solution is to have Jupyter in Emacs. One solution is EIN, the Emacs IPython Notebook. However, I had a mixed experience with it: it would often hang and eat up memory (I never bothered to try to debug this behaviour). A neat alternative, for me, is emacs-jupyter. Here’s my setup.
Category: emacs
Handling Email with Emacs
Like many other people, I write, receive and loath a lot of email. Writing it goes something like this:
- Create a new draft,
- figure out the right address to put into the
To:
field, - write “Hi <first name>”,
- write the actual message,
- attach the correct file (if any),
- append “Cheers, Martin”.
Also, a lot of email is repetitive and boring but necessary, such as asking seminar speakers for their titles and abstracts, giving people advise on how to claim reimbursement when they visit Royal Holloway, responding to requests of people who’d like to pursue a PhD.
Here is my attempt to semi-automate some of the boring steps in Emacs.
Sage Development with Emacs
A while back I described my (then current) setup to develop C code with Emacs. The other programming language I tend to spend a lot of time with is Python, specifically Sage’s Python. Here’s my Emacs setup for writing Sage code. For starters, it makes sense to highlight indentation in Python.
(use-package highlight-indentation :ensure t)
I use anaconda-mode for auto-completion and stuff, it runs jedi for me. In particular it offers:
- M-. Goto definition for thing at point.
- M-, Switch to buffer of most recent marker.
- M-? Show documentation for context at point.
- M-r Show usage for thing at point.
(use-package anaconda-mode :ensure t :diminish anaconda-mode :config (bind-key "M-," #'anaconda-nav-pop-marker anaconda-mode-map))
C Development with Emacs
Recently I spent some time customising my Emacs config again. Playing around with different ways of improving your productivity by adjusting Emacs is a great way of loosing any and all productivity you might have had. It is such a fun way of wasting your time, there’s even a little scene around just that activity. This can take quite elaborate forms with people posting their Emacs init.el
configuration files in literal programming style based on org-mode‘s org-babel. This is more useful than it might sound, e.g. I stole a lot from Sacha’s config.
I also recently spent a bit more time again writing C99 code making many calls to FLINT – Fast Library for Number Theory. The FLINT coding style requires that pretty much each function should have its own file which I am sure is great for something. However, for me it means that have I have to open a lot of files all over the FLINT library when I care about implementation details and not just definitions. Also, your vanilla Emacs setup won’t display those signatures when you try to write a call to those functions from your code or give you auto-completion for all functions starting with, say, fmpz_poly_set_
.
Alas, here is my current setup which rectifies most of my grievances.