Sec. 7. When the attorney for the state files an answer, motion, or other pleading relating to an application for a writ of habeas corpus or the court issues an order relating to an application for a writ of habeas corpus, the clerk of the court shall mail or deliver to the applicant a copy of the answer, motion, pleading, or order.