PICTURE yourself as a historian in 2035, trying to make sense of this year's American election campaign. Many of the websites and blogs now abuzz with news and comment will have long since perished. Data stored electronically decays. Many floppy disks from the early digital age are already unreadable. If you are lucky, copies of campaign material, and of e-mails and other materials (including declassified official documents), will be available in public libraries.

But will you be able to read them? Already, NASA has lost data from some of its earliest missions to the moon because the machines used to read the tapes were scrapped and cannot be rebuilt. A wise librarian will wish to keep in working order a few antique computers that can read such ancient technologies as CDs and USB thumb-drives. But even that may not be enough. Computer files are not worth anything without software to open them.

One way round that is to print everything out. If you use durable acid-free paper, this will reach at least the level of accessibility of medieval manuscripts, handwritten on vellum. But printouts of digital material are a second-best solution. They risk losing the metadata that make documents interesting: e-mails make most sense as threads, not as stacks of paper. Only in digitised form can data be sifted and crunched.

Conscientious institutions already make copies of some web pages, e-books and other digital material, and shift the data to new hardware every five years (see article). As software becomes obsolete, libraries and companies can create emulators—old operating systems working inside newer ones.

But that effort is hampered by regulation that makes archiving digital artefacts even more difficult than it already is. In America, for instance, circumventing the anti-piracy digital rights management software (DRM) that publishers attach to their products is a criminal offence. If that software disappears, the material will no longer be accessible. In 2010 the United States Copyright Office exempted publishers of online-only works from the duty of depositing a copy with the Library of Congress unless specifically requested. National libraries have the right to demand a copy of every printed book published on their territory (and they also get huge quantities of other documents too). But they have no mandate to collect the software or smartphone apps without which much electronic data remains encrypted gibberish.

Regulators are pondering the problem. In early May America's Copyright Office will hold public hearings to discuss exemptions to the ban on circumventing DRM. In Britain the government wants to make it compulsory for publishers, including software-makers, to provide the British Library with a copy of the finished version of everything they produce within a month of publication. The proposed law will allow the library to harvest web pages and material hidden behind paywalls or login requirements. The sole exceptions are social networks and sites comprising only video or music.

Copy me in on the costs

Publishers complain that this will be costly, at a time when the industry is struggling to stay afloat. They fear that library access will compete with commercial sales and that providing copiable versions of their products will encourage piracy.

These complaints look a bit overblown. Libraries would not make digital material available to everyone, but only to users actually in the library building. The proposed British regulation even allows publishers to request that their materials be kept under wraps for three years—a concession rarely granted for print works. For centuries libraries have provided public access to even the most expensive books and journals. The principle is worth maintaining in the digital age, too.

The stakes are high. Mistakes 30 years ago mean that much of the early digital age is already a closed book (or no book at all) to historians. Without a wider mandate for libraries, giving them the right to store both digital materials and the tools to open it, historians of the future will be unable to reconstruct our times. They may not even know what they have lost.