1

I'm editing a file .bashrc-host25 and it's not going into bash editing mode, so I searched for a solution and found it at https://emacs.stackexchange.com/a/52083/16958.

My file now has the following at the bottom of the file:

# Local Variables:
# tab-wdith: 4
# mode: sh
# End:

This works, however, whenever I open the file I'm presented with a warning:

The local variables list in .bashrc-host25
contains values that may not be safe (*).

Do you want to apply it?  You can type
y  -- to apply the local variables list.
n  -- to ignore the local variables list.
!  -- to apply the local variables list, and permanently mark these
      values (*) as safe (in the future, they will be set automatically.)

  * tab-wdith : 4

I've answered y (yes) and the file mode (sh) and tab-width is set, but I'm wondering if I'm doing something wrong.

So I searched for a solution and found the emacs documentation page at https://www.gnu.org/software/emacs/manual/html_node/emacs/Safe-File-Variables.html

I read it but don't understand if I'm doing something wrong or if this is OK and just a warning and I have to answer y (yes) or ! to mark the variable tab-width as safe.

Drew
  • 75,699
  • 9
  • 109
  • 225
PatS
  • 155
  • 6

1 Answers1

1

While posting this question I noticed that the spell checker was complaining about the spelling of tab-width (when spelled as tab-wdith).

The correct configuration block is:

# Local Variables:
# tab-width: 4
# mode: sh
# End:

Once I properly spelled the variable the warning message went away.

I almost deleted the error but figured it might help someone else who sees the Safety of File Variables warning.

PatS
  • 155
  • 6