Autopickup
When autopickup is active, your character will automatically pick up any useful items in a tile you've entered so long as there are no monsters within your line of sight. You can see the list of items set to autopickup by pressing the \ button (backslash), and can adjust which items will be affected by scrolling through the list and pressing the corresponding letters.
Bear in mind that autopickup does not reduce the amount of time it takes to pick up items, and it has no beneficial effect on turncount; the game simply assumes you wish to pick up all items on the list that it comes across. In fact, leaving useless items active on your autopickup list may negatively affect your turncount, as your character will go out of its way to grab junk items during autoexplore. As such, you should deactivate any items you will not need any more.
You can toggle autopickup on or off by pressing CTRL + A. Each time you encounter an invisible monster, autopickup will immediately toggle off until you either reactivate it manually or you defeat the threat; merely escaping to another floor does not reactivate it.
Editing your default autopickup list
To add an item to the autopickup list, add an autopickup_exceptions line to your init.txt. For example:
autopickup_exceptions = <stone, <artefact
The < character specifies an "inclusion" (matching objects should be picked up). Besides object names, you can also match against a number of prefixes, such as "artefact" (seen above), "emergency_item", and "unidentified".
The default configuration includes a number of such autopickup exceptions in the file autopickup_exceptions.txt. Note that exclusions override inclusions, so if your exception doesn't work make sure the object isn't matched by an exclusion in that file (useless_item is a likely culprit).
See the Picking up and Dropping section of the options guide for more details.