To help adhere to the style guidelines with regards to spaces vs. tabs in ChangeLogs, the attached patch adds a Local Variables clause at the bottom of each ChangeLog, so that Emacs will automatically convert tabs to spaces. It would be great to get this in, so that developers using Emacs don't have to worry about converting all the time.
Created attachment 17066 [details] Patch to insert Local Variables into ChangeLogs
Comment on attachment 17066 [details] Patch to insert Local Variables into ChangeLogs There are a bunch of problems with doing this. It's editor-specific, it will break as soon as the ChangeLogs are rolled over, and it includes an unrelated change to config.h. We don't include these sorts of editor metadata anywhere else in the source tree either, so I'm not sure that ChangeLogs are special in this regard.
D'oh. I thought I cropped that config.h change out. The ChangeLogs aren't special in this regard. There are a lot more source files, than there are ChangeLogs, and I don't have a patch for all the source files ready yet. :) I believe vim also supports the Local Variables section, and it does support modelines in source files.
Created attachment 17070 [details] Updated patch without extraneous config.h change
(In reply to comment #2) > [...] We don't include these sorts of editor metadata anywhere > else in the source tree either, so I'm not sure that ChangeLogs are special in > this regard. I've seen this kind of metadata removed from source files in the past. Perhaps we should state the policy for editor metadata on the web site (with the coding standards?).
When this was discussed in the past, someone suggested that both Emacs and vi had alternative ways to specify these defaults (with per-directory files IIRC). That would certainly be a nicer solution than uglifying all text files with variables for each editor.
(In reply to comment #6) > When this was discussed in the past, someone suggested that both Emacs and vi > had alternative ways to specify these defaults (with per-directory files IIRC). > That would certainly be a nicer solution than uglifying all text files with > variables for each editor. Do you know what those alternate methods are, or where they are documented?
A Google search suggests that vim reads per-directory .vimrc files. I couldn't quickly find information about Emacs, but it cannot be less configurable than vim, can it?
Ideally, we should mention a way to make this work with Emacs in this bug to finally close it.
Looks like this can be done with Emacs Per-Directory Local Variables feature: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html