get an anvil, and a book/diamond/ingot/etc..., and open the anvil gui, and shift-click it and it goes into the first slot instead of the second.
Books/materials are useless in the first anvil slot. Only tools/armor/weapons work in those spots. If you put a book in the first slot and a tool/armor/weapon in the second, it doesn't get an available output.
Books and materials belong in the second slot, so that's where they should be shift-clicked to.
Moved info from environment to description.