Is there a better way to write this macro?

It does that already, I only unwrap QuoteNode in the head, because a) need to for keywords and b) they aren’t valid there so it’s harmless.

julia> @sexpr (call, q, 1, :symbol)
:(q(1, :symbol))

julia> @sexpr (call, q, 1, symbol)
:(q(1, symbol))

Using Expr needs the extra level of quote:

julia> Expr(:call, :q, 1, :(:symbol))
:(q(1, :symbol))

It’s a tradeoff, but I reckon most Exprs I’d write would be a bit cleaner with the macro, and Expr is always there as an option. Most interpolation would just be @sexpr (foo, "bar", $baz), a full expression needs the parens, but I don’t mind.

I don’t think it should be added to the library for the next release or anything, probably won’t even make a package out of it. Just a fun exercise at this point.