↓ Skip to Content Start of content

Filtering the Emacs dashboard agenda

I use emacs-dashboard to show an overview of my work when I start Emacs. It looks a little like this:

Emacs dashboard

The weekly agenda gives me a quick glance of what's scheduled for the week ahead, as well as any upcoming deadlines, but I wanted to tweak it slightly to remove some non-useful information.

I use the WAITING keyword to mark tasks that are waiting on someone else and don't require my attention. I have a separate agenda command to show me all WAITING tasks and there's no need for these to show on my dashboard.

The dashboard package provides a couple of different ways to customize the agenda view. One of those is dashboard-match-agenda-entry, which uses org-mode's tag and property matching to filter tasks.

Limiting the dashboard agenda looks like this:

;; Match just one TODO keyword.
(setq dashboard-match-agenda-entry

;; Match multiple keywords.
(setq dashboard-match-agenda-entry

;; Match everything except WAITING.
(setq dashboard-match-agenda-entry

There is a lot more to org-mode's matching system; I've used it to create custom views for displaying my monthly goals, but it can be used to match tags, categories, and even properties like Effort.

My Emacs Ledger reporting configuration

I've been using Ledger to keep track of my finances for several years, and one feature I really like is the ability to run reports from within Emacs via ledger-mode.

Creating these reports is done by customizing the ledger-reports variable. It's also possible to set them using the ledger-reports-add function, but I prefer to set them all in one go during setup.

My current list of reports looks like this:

(setq ledger-reports
 '(("bal"            "%(binary) -f %(ledger-file) bal")
   ("bal this month" "%(binary) -f %(ledger-file) bal -p %(month) -S amount")
   ("bal this year"  "%(binary) -f %(ledger-file) bal -p 'this year'")
   ("net worth"      "%(binary) -f %(ledger-file) bal Assets Liabilities")
   ("account"        "%(binary) -f %(ledger-file) reg %(account)")))
Shows the balance of all accounts; this also includes individual expenses (such as Expense:Car:Gas) so it's a pretty long report.
bal this month
As above, but only includes transactions from the current month.
bal this year
Same as bal, but limited to the current year.
net worth
A short report that shows what I've got in each account, as well as what I owe on loans and credit cards.
This prompts for an account name and then shows its transactions for the current file. This is useful for quickly seeing how much money has been spent on a specific category during the year.

Emacs reports that have the %(ledger-file) token are run against the current ledger file. I have my Ledger files stored in a projectile project so I can quickly jump to them to run reports or make adjustments.

Copying all Pocket highlights with a bookmarklet

I use Pocket for managing my reading list and make liberal use of its highlighting functionality. Although Pocket has an API - and an Emacs reader that works really well with it - there isn't a way to export highlights. This makes it a pain to process my notes to the point where I just don't do it.

To make things easier I wrote a little bit of JavaScript to export highlights from a Pocket article view. It wraps all highlights in org-mode quote tags, adds a title and "Source" link, and then copies everything to the clipboard.

It's not perfect; it doesn't handle images, and lists end up being copied line-by-line, but it makes the process much, much easier.

Drag the button below to your bookmarks bar, and then click it when viewing any highlighted article in Pocket to copy notes to the clipboard (tested in Firefox):

Copy Pocket Highlights

The un-minified source is below and can be modified to remove org-mode specific formatting if needed:

to_clipboard   = "#+TITLE: " + document.getElementsByTagName('h1')[0].innerHTML + "\n\n";
all_highlights = document.getElementsByClassName('highlight');

for (highlight in all_highlights) {
    highlight_text = all_highlights[highlight].innerHTML;
    if (typeof highlight_text !== 'undefined' && highlight_text.trim() != '') {
	to_clipboard += "#+begin_quote\n";
	to_clipboard += highlight_text.trim() + "\n";
	to_clipboard += "#+end_quote\n\n";

to_clipboard += "*Source*: " + document.getElementById('reader.external-link.view-original').href;


Groundhog Day Resolutions - October 2021

It's been a few months since I wrote a GHD post, and it should come as no surprise that every goal in July was a complete bust.

July's primary goals

1. Complete another secondary goal

2. Complete another session of deliberate practice

3. Write more

Secondary goals for July

1. Release a playable demo of my Atari ST text adventure

2. Release an update to one of my other side projects

Primary goals for October

1. Finish one primary goal

As always I'm trying to cram things into the last 1/4 of the year. There are a couple of things I'm going to miss out on; Ludum Dare just wrapped up and I was running at the time, but there are still other goals I can complete.

2. Finish one secondary goal

There are a couple of easy ones I can cross off the list if I actually put time into them.

The last few months I've been struggling with a nasty case of writer's block. I've also been busy with freelance projects, and as a consequence haven't spent much time on my own personal goals.

I'm deliberately keeping things light for October so I can get back into some kind of rhythm. We'll see how it goes.

Writer's block

This year I set myself the target of writing 100 posts for this blog. So far I'm at 33 posts with nearly 2/3rds of the year gone. Things started well, but lately I've been struggling to write more than one or two posts a month.

So far most advice I've received on helping with writer's block has been "write more". It's difficult to find the motivation to start when all of my ideas suddenly sound terrible.

I've written nearly 100,000 words for this blog (for comparison, "The Great Gatsby" is 47,000 words) but I still don't consider myself to be a writer. Maybe there's some magic number of words where this feeling changes.

I haven't found that number yet. All I can do is write more.