Skip to content

Instantly share code, notes, and snippets.

@zondo
zondo / find-changes.sh
Last active October 19, 2022 16:30
Find changesets added between two releases
# Find changesets added between two releases.
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
# Make sure we're up to date.
git fetch origin
# Last and current release branches.
last_release=hotfix/1.36.2
@zondo
zondo / conditional-tangle.org
Last active August 8, 2025 14:36
Conditional tangling in org mode based on tags

Conditional Tangling based on Tags

I recently came across a little-known (to me, anyway) feature of org mode, thanks to this mailing list reply: conditional tangling. In the :tangle argument, as well as the standard values (yes, no or a filename string), you can also set it dynamically, by specifying an elisp expression which evaluates to the tangle setting.

This is quite useful together with tags. Here’s a function which sets the argument based on which tags are currently set in the file: