From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24741: 25.1.50; Buffer encoding corrupted up by 'make' in shell-mode Date: Sat, 22 Oct 2016 10:17:48 +0300 Message-ID: <83oa2crgwz.fsf@gnu.org> References: <8337jrv6ds.fsf@gnu.org> <83wph2rymu.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477120849 31953 195.159.176.226 (22 Oct 2016 07:20:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 07:20:49 +0000 (UTC) Cc: jwiegley@gmail.com, 24741@debbugs.gnu.org To: Simon Peyton Jones Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 22 09:20:45 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxqbV-0005ui-La for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 09:20:29 +0200 Original-Received: from localhost ([::1]:35850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxqbX-0007p2-W3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Oct 2016 03:20:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxqa9-00078R-Ln for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 03:19:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxqa6-0000rj-Eu for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 03:19:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bxqa6-0000rf-Ba for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 03:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bxqa6-000750-6Y for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2016 03:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Oct 2016 07:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24741 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 24741-submit@debbugs.gnu.org id=B24741.147712068627149 (code B ref 24741); Sat, 22 Oct 2016 07:19:02 +0000 Original-Received: (at 24741) by debbugs.gnu.org; 22 Oct 2016 07:18:06 +0000 Original-Received: from localhost ([127.0.0.1]:45825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxqZC-00073p-0H for submit@debbugs.gnu.org; Sat, 22 Oct 2016 03:18:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxqZA-00073M-CC for 24741@debbugs.gnu.org; Sat, 22 Oct 2016 03:18:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxqZ2-0000gL-3D for 24741@debbugs.gnu.org; Sat, 22 Oct 2016 03:17:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxqZ1-0000gH-Vx; Sat, 22 Oct 2016 03:17:56 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bxqZ1-00074b-2C; Sat, 22 Oct 2016 03:17:55 -0400 In-reply-to: (message from Simon Peyton Jones on Fri, 21 Oct 2016 21:20:34 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124810 Archived-At: > From: Simon Peyton Jones > CC: "24741@debbugs.gnu.org" <24741@debbugs.gnu.org>, Simon Peyton Jones > > Date: Fri, 21 Oct 2016 21:20:34 +0000 > > If you want me to try emacs -Q, just let me know how to do that and what info to collect. I've never done that before. Start Emacs with "emacs -Q", then try reproducing the problem by doing whatever you do when the problem normally happens. If "emacs -Q" lacks some optional features and custom settings of certain variables, load those features and customize those variables as part of the recipe (i.e. record everything you need to do starting from "emacs -Q" until you are able to run the commands that produce the problematic output). Then post here the full recipe for reproducing the problem, including everything you have recorded on the way. > Customisations. In my .emacs I have the following, which John Wiegley gave to me in the first place > > (setq-default locale-coding-system 'utf-8-unix) > (setq-default buffer-file-coding-system 'utf-8-unix) > (set-default-coding-systems 'utf-8-unix) > (set-terminal-coding-system 'utf-8-unix) > (set-keyboard-coding-system 'utf-8-unix) > (set-selection-coding-system 'utf-8-unix) > (prefer-coding-system 'utf-8-unix) > > (defun utf8-shell () > (interactive) > (set-default-coding-systems 'utf-8-unix) > (shell)) This is already dead wrong on Windows, especially setting the default encodings to UTF-8. It cannot possibly work well on Windows. And you shouldn't need this. What happens if you remove these and try again -- does the problem still appear? Where did you get your Bash, your make.exe, and your Python? If they are from the MSYS2 project, the only customization of coding-systems you may need is of process-coding-system-alist. If you do that, make sure the encoding is still your system codepage, and only the decoding part is UTF-8. That's because the encoding is used to encode the command-line arguments, and you certainly don't want them to be encoded in UTF-8 on Windows, because this is unsupported.