From: Rabbi Moshe Sofer
To: Rabbi Naftali
The Chasam Sofer upholds the Rambam's proof that the command to write 'this song' obligates writing an entire Sefer Torah, since the Torah cannot be written in separate sections. He rules that one may not sell a purchased Sefer Torah to commission a new one under the principle of ma'alin bakodesh, as ascending sanctity requires the newly acquired object itself to be of higher sanctity. He also rules that formatting defects in the described Sefer Torah require correction, with paragraph breaks needing to be at least three yudin wide.
Source: Shu"t Chasam Sofer YD §254