pattern selecting switch and thereby selecting the stitch desired the stitch type is then registered in the control circuit the pattern indicating lamp is then lighted and a suitable control output is finally produced subsequently the stitch control pulse motors and a machine drive motor are temporarily driven to prepare the related mechanisms for the stitching type selected and are stopped after the sewing machine has finally been set for producing the stitch type in this invention if the presser foot 2 for straight and chain stitching is attached to the presser bar 5 the embedded magnet 25 is detected by the flux detector 1 the detector 1 provides a signal to the control circuit 10 which treats the signal and deenergizes the needle swing control pulse motor 13 and solenoid 15 is energized to turn a switching lever 74 counterclockwise to thereby turn a lever 72 clockwise via an intermediate lever 73 against the pull of tension spring 75 as a result a slide element 71 which is secured to the end of the operation lever 72 and has a small circular hole 70 for straight stitching is advanced to close off the laterally elongated zigzag stitching hole 31 in the needle plate 3 and to substitute the small circular hole 70 when the presser foot 2 is detached the solenoid 15 is deenergized the slide element 71 is returned to the initial retired position by the action of the spring 75 and the needle hole 70 withdrawn to reinstate the laterally elongated hole 31 if the embroidery stitching presser foot 9 is attached the flux detector 1a detects the magnet 95 and provides a signal to control circuit 10 which treats the signal and deenergizes.