1

I have the following as a member of auto-insert-alist:

(("/home/robin/.local/bin/.*[^/]\\'" . "Shell-Script mode magic number")
  lambda nil
  (if
      (eq major-mode
          (default-value 'major-mode))
      (progn 
        (sh-mode)
        (insert "#! /bin/bash -peux
# "))))

The mode is set correctly, but the text is not inserted. And it doesn't seem to have been inserted into the wrong buffer, either, because C-x s says "(No files need saving)".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.