End Your List Items with a Period

Grant Rettke over at Wisdom and Wonder has helped me resolve a long standing conundrum. When I have a list

  • like
  • this

I can never decide whether or not to end each list item with a period. I can adduce compelling arguments for both choices so I’m always conflicted. Rettke says to always end a list item with a period. The reason, he says, is so that text-to-speech software will pause at the end of each list item rather than running them on.

I never use text-to-speech but I’m willing to concede that someone else reading my writing might want to for various reasons so my new rule is to end the list items with a period. Thanks for clearing that up, Grant.

Posted in General | Tagged , | 4 Comments

Four LaTeX Mistakes

From the excellent TeX Tips twitter feed I got a pointer to a useful article from John Cook. The article is about the top 4 LaTeX mistakes that Cook, a practicing mathematician, sees in books and articles. You might think that these would be esoteric fine points about typesetting but they’re actually elementary things that every \(\TeX\) and \(\LaTeX\) user should know.

The one I liked the most was the second that concerns adding a thin space before a differential. I always do this because it does look better but it never occurred to me why that is. Cook explains it simply in an “aha! moment” for me: the differential, \(dx\) say, is a single unit so you want to set it apart a bit so it doesn’t look like the product, in this case, of \(d\) and \(x\). Notice how much better

\(\int x \, dx\) looks than \(\int x dx\) does. This is actually the most technical of the errors Cook describes. The others are really elementary.

If you’re a \(\TeX\) or \(\LaTeX\) user, even if you’re merely embedding it in an Org file, be sure to give Cook’s article a read. You definitely don’t want to be making any of the mistakes he describes.

Posted in General | Tagged , | Leave a comment

Followup on the Momento Database App

If you enjoyed yesterday’s post on Sacha Chua’s “external brains” workflow, you’ll want to take a look at her followup post on her Momento-centered workflow for dealing with her daily, weekly, and monthly journals.

If you’re like me, the technical details won’t be too useful because

  1. You don’t use an Android phone and thus can’t use Momento Database.
  2. You make a point of not entrusting your data to any Google apps.

Nonetheless, her basic workflow is worth studying and adapting to whatever Apps you do use. Chua has put considerable time and effort in evolving her workflow so this post, like the one I mentioned yesterday, is worth reading for the ideas you can adapt to your situation.

Posted in General | Leave a comment

Sacha on External Brains

Back in September, I wrote about Jeff Terrell’s excellent video on using Emacs and Org Mode as an exocortex. “Exocortex” for these purposes means an “external brain” of some sort that is used for off-loading thoughts and plans that aren’t pertinent to whatever you’re working on or thinking about at the moment.

Sacha Chua has an excellent post on the same ideas. As the busy Mom of a toddler, she needs to keep track of lots of things such as tasks that need doing, child development milestones, activities and the time spent on them, notes, and finances. Like me, she is inveterate record keeper and has developed strategies for easing the collection and recording of all that data.

Her on-the-go note collector is Momento Database on her Android phone. It’s a very nice app that allows her to record timestamped entries of notes for later inclusion in other applications. I have the same needs but my solution is not nearly as nice. I use the Notes app on my iPhone to maintain a “memo book” in which I record my current activities and notes. I have a bit of Elisp that reformats the data and imports it into an Org mode table. I run that every month. That’s pretty easy because the Notes are automatically synced across all my Apple devices.

There are a couple of problems with this scheme. First, I have to manually enter the timestamp for each entry because Notes just records free-form text1. Second, I want to add some of those entries to my Journal, which means I have to copy (and reformat) the data into my journal. Chua has inspired me to look into better solutions. There’s an iPhone app called Momento that doesn’t appear to be related to Momento Database but does the same sort of thing. I haven’t had a chance to investigate it in detail yet but perhaps it will offer a better platform for my memo book.

My data collection and storage routine is like a Japanese garden: it’s an ongoing project that is never complete. I’m always evolving and tweaking it.

In the mean time, if you’re a data junkie like me or just want to get your life better organized, be sure to read Chua’s post. There’s a lot more in it than just Momento Database. It’s full of good ideas.

Footnotes:

1

That’s not quite true. It has other capabilities but none that help with my memo book needs.

Posted in General | Tagged , | 2 Comments

Org 9.1.4

Bastien tweets to let us know there’s a new Org out:

It’s not in Melpa as of [2017-12-05 Tue 13:08] but will doubtless appear in the next build.

Posted in General | Tagged , | Leave a comment

AUCTeX 11.92

Annnnd we’re back. Occasionally a package update is broken and aborts the Emacs boot process. Normally I just disable the offending package for a day and keep on trucking. However, when use-package breaks, you’re pretty much restricted to an Emacs -q environment. At least you are if, like me, use-package controls the loading of all your other packages. It’s not all that hard to clone the use-package repository and check out a working version but in this case I opted to just wait for MELPA because I knew the problem had already been fixed. It takes a long time to do a MELPA build, though, so I had to wait.

Today’s post is about AUCTeX. A new version has just been released.

It’s not yet in ELPA but will probably appear shortly.

I generally use Org mode to generate my \(\LaTeX\) but sometimes you need fine control and for those cases it’s often easier to just use AUCTeX. If you’re doing heavy duty technical writing, you should probably be using AUCTeX. Besides, they have a new version out.

Update [2017-12-05 Tue 10:55]: ACUTeX → AUCTeX.

Posted in General | Tagged | 2 Comments

Emacs Problems: Can’t Post

My Emacs is temporarily broken because of a Melpa/use-package problem. It looks like the problem will be resolved when the current Melpa build cycle completes and if so, I will deliver today’s wisdom then.

Posted in Administrivia | 10 Comments

Almost Ready

Good news from Eli Zaretskii: Emacs 26 is almost ready. In the last paragraph of this message on the Emacs Development list, Zaretskii says,

Emacs 26 is nearing its release; the stream of serious bugs (or any bugs, actually) seems to have died out. So hopefully one more pretest, and we will be ready to go.

This is one more piece of evidence that Emacs is under active and continuing development and puts the lie to the, sadly, often heard claim that Emacs is moribund old technology that is dying. John, Eli, and the others are working hard to make sure the claim remains nonsense.

Posted in General | Tagged | Leave a comment

Zamansky’s Advent of Code #1

I don’t have anything else interesting to say today so let’s take a look at Mike Zamansky’s post on the Advent of Code 2017 Day 1 problem. Zamansky has a nice discussion of solving this with Python and the steps you might go through to arrive at a clean solution. You should read his post to see the problem statement. When I saw the problem, the first thing I thought of was using one of the Lisp mapping functions to step through the digits. Here’s my solution in Emacs Lisp:

(defun cksum (captcha)
  (interactive)                         ;for interactive testing
  (let ((checksum 0) (digits (mapcar (lambda (a) (- a 48)) captcha)))
    (cl-mapc (lambda (a b) (when (= a b) (cl-incf checksum a)))
             digits (-rotate -1 digits))
    checksum))

(cksum "234445662") → 16

The first thing you notice is that it’s really a Common Lisp solution because it makes use of cl-mapc and cl-incf. You could do without the cl-incf but the Elisp mapc operates on only one sequence. You’ll also need Magnar Sveen’s Dash library but if you have any packages at all installed, it’s probably already been pulled in; otherwise you’ll need a (require dash).

We need two sequences because the logic depends on seq1[i+1] = seq2[i]. Notice that this handles the “wraparound case” as well. The second half of the problem is the same except the two lists should be the first and second half of the digits. One nice thing about the Emacs mapping functions is that they operate on any sequence, not just lists. That’s convenient in this problem.

Posted in General | Tagged , | Leave a comment

Ivy 0.10.0

Abo-abo has released Ivy 0.10.0. It’s the result of 8 months work and has several new features. One that I like, is that you can force acceptance of your input when you’re on the first candidate by scrolling up to the input with Ctrl+p. That’s much nicer than having to use Ctrl+Meta+j (which is still available). You have to enable this feature with

(setq ivy-use-selectable-prompt t)

presumably because it will interfere with the ivy-wrap functionality if you have it enabled.

Another nice feature is being able to use Ctrl+d to delete entries in an occur list. Abo-abo gives an example use case for it in his post.

Finally, there are a bunch of new counsel commands. Most of them are specialized to rare situations (at least for me) but you may find that one or two of them are useful in your work flow.

The post describes the most interesting new features but there’s also a complete changelog that you can browse if you’re interested in all the details. As I’ve said before, the Ivy/Swiper/Counsel suite is my most used and useful package. It’s extraordinary how much friction it removes from my workflow. If you aren’t already using it, I urge you to give it a try.

Posted in General | Tagged | Leave a comment