As a workaround I made a shortcut key for deleting transactions. With GnuCash closed, I modified the accelerator-map file.
In GnuCash 2.6 and older:
C:\Users\username\.gnu-cash\accelerator-map
In GnuCash 3.0 and newer:
C:\Users\username\AppData\Roaming\GnuCash\accelerator-map
Ubuntu (as mentioned in comments):
/home/username/.local/share/gnucash/accelerator-map
I changed the following line (you might need to add the line entirely)
; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/DeleteTransactionAction" "")
To:
(gtk_accel_path "<Actions>/GncPluginPageRegisterActions/DeleteTransactionAction"
"<Primary>Delete")
I removed the semi-colon ;
(which acts as a comment character) at the beginning of the line and I added the text <Primary>Delete
The first time you use the key combination GnuCash will show a pop-up dialog box asking if you want to save the transaction and has check boxes to automatically do this in the future. Pick one of the check boxes. You can undo this choice in the future by going to the menu Actions->Reset Warnings...
(a dialog box appears asking which warnings to reset)
Now I could delete transactions by pressing ctrl+delete (Note: this is the delete key, not the backspace key. But you can pick whichever key combination you want). Pressing and holding this key combination allowed continuous deleting at a predictable rate so it was quite easy to delete a few hundred transactions quickly.
(EDIT: Note in recent version, GnuCash 4.9, although rate of deletion might still be predictable it no longer seems to update the UI as you delete transactions when holding down the key combo, which makes it harder to eyeball the deletion rate. I am now more comfortable repeatedly pressing the key combo rather than holding down)
Might not be the best solution if you have many thousands of transactions that you want to delete but for a few hundred it was quite painless.