I've finally had time to the `:default-description' parameter in `org-link-parameters'. Ihor Radchenko writes: > I recommend writing tests for org-insert-link in > testing/lisp/test-ol.el and testing expected behaviour for various > values of :default-description. Good advice! I haven't written many tests before, so this was a challenge. I've attached a patch with some tests for the expected behaviour. These include a couple of macros and a function, to stop the definitions being too huge and unwieldy. All the tests pass on my machine. They're very nearly just right, but for some reason `test-ol-with-link-parameters-as' doesn't always reset the parameters correctly for me. However I have them set to originally, it sets `:default-description' to a lambda. This might be a quirk at my end though -- if someone else could have a look I'd be very grateful. The tests showed that my previous approach doesn't work generally enough. I've moved where `type' is defined in the code, to cover all cases. > Firstly, def will be undefined inside the error clause. I've defined def a bit further up in a `let', and run the error clause inside this. > Secondly, when :default-description is a lambda expression and that > expression fails, your code will fail with "wrong-type-argument > symbolp" when executing (symbol-name def). Please consider cases > when `def' is not a string and not a function symbol. Dealt with this by just using `message " %S: "', since %S will print a symbol, a string or a lambda correctly. Hope this is a bit better! Best, Hugo