A new technique that combines electron microscopy and laser technology enables programmable, arbitrary shaping of electron beams. It can potentially be used for optimizing electron optics and for adaptive electron microscopy, maximizing sensitivity while minimizing beam-induced damage. This fundamental and disruptive technology has now been demonstrated by researchers at the University of Vienna, and the University of Siegen. The results are published in Physical Review X.