In NetHack, magic markers can also be used to write spellbooks when applied to blank spellbooks. Probability of success is significantly higher if the spell is known and if the user is a wizard. A magic marker is a popular item to wish for with a wand of wishing or random wishes granted from thrones, fountains, etc.

To blank a scroll or spellbook, dip it in water. Blessing your magic marker and your media isn't a bad idea either.