https://llvm.org/bugs/show_bug.cgi?id=31092
Bug ID: 31092 Summary: clang-format Emacs integration breaks on Windows Product: clang Version: 3.9 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Formatter Assignee: unassignedclangb...@nondot.org Reporter: rom...@alazartech.com CC: djas...@google.com, kli...@google.com, llvm-bugs@lists.llvm.org Classification: Unclassified Running `clang-format-buffer` from clang-format.el on any file that contains multiple lines under Windows throws an error, even if the file contains only ASCII characters: (clang-format failed with code 1: error: invalid length 34, offset + length (34) is outside the file.) The issues comes from the fact that Emacs uses `undecided-unix` encoding by default to send data to subprocesses, but `undecided-dos` to receive data from them, as shown by calling `describe-coding-system` on any buffer. This problem can be fixed by calling `(setq default-process-coding-system '(undecided-dos . undecided-dos))` in `.emacs`. I am not sure if this issue can or should be solved at clang-format.el level, but I thought it is worth pointing out since it affects every Emacs user on Windows that hasn't fiddled with the `default-process-coding-system` variable. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs