From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21780: 25.0.50; Saving *Help* results in bad encoding because of curly quotes Date: Fri, 30 Oct 2015 22:50:57 +0200 Message-ID: <83eggcytam.fsf@gnu.org> References: <48a87436-595a-4f65-9e3c-094f6d77ee96@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446238287 19092 80.91.229.3 (30 Oct 2015 20:51:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Oct 2015 20:51:27 +0000 (UTC) Cc: 21780@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 30 21:51:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZsGdl-0002NH-0q for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2015 21:51:13 +0100 Original-Received: from localhost ([::1]:53030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGdk-0007n6-9l for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2015 16:51:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGdf-0007kk-9m for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsGdb-0005en-6j for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsGdb-0005ec-41 for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZsGdb-0002wL-1P for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2015 16:51:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Oct 2015 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21780-submit@debbugs.gnu.org id=B21780.144623825611282 (code B ref 21780); Fri, 30 Oct 2015 20:51:02 +0000 Original-Received: (at 21780) by debbugs.gnu.org; 30 Oct 2015 20:50:56 +0000 Original-Received: from localhost ([127.0.0.1]:46573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsGdU-0002vu-4F for submit@debbugs.gnu.org; Fri, 30 Oct 2015 16:50:56 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:65158) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsGdR-0002vl-N5 for 21780@debbugs.gnu.org; Fri, 30 Oct 2015 16:50:54 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NX100600W54PY00@a-mtaout20.012.net.il> for 21780@debbugs.gnu.org; Fri, 30 Oct 2015 22:50:52 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NX1006LKWKRJS70@a-mtaout20.012.net.il>; Fri, 30 Oct 2015 22:50:52 +0200 (IST) In-reply-to: <48a87436-595a-4f65-9e3c-094f6d77ee96@default> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108212 Archived-At: > Date: Fri, 30 Oct 2015 09:02:15 -0700 (PDT) > From: Drew Adams > Cc: 21780@debbugs.gnu.org > > > > (setq-default buffer-file-coding-system 'undecided-unix) > > > > That's your problem, mot probably. Can you try again after removing > > it? If that solves the problem, I can then tell you how to do what > > you want without disrupting encoding/decoding defaults. > > > > > And I do this: > > > (setq process-coding-system-alist > > > (cons '("bash" . (raw-text-dos . raw-text-unix)) > > > process-coding-system-alist)) > > > > This is not related, but it is also wrong. Why do you do that? > > Why are these things "wrong"? Because they defeat some of the heuristics that decoding and encoding needs to silently DTRT. Whoever wrote them didn't understand what she was doing, and most probably didn't understand what is the problem that needed to be solved. If you want to have Unix EOLs by default, the correct customization is this: (setq-default buffer-file-coding-system (coding-system-change-eol-conversion buffer-file-coding-system 'unix)) This modifies just the EOL type of the default encoding, leaving the rest intact. The other customization, for process-coding-system-alist, is a very bad idea, if your Bash can sometimes report non-ASCII strings. AFAIK, Cygwin nowadays uses UTF-8 as its encoding, so the correct customization would be to use utf-8 instead of raw-text there. > I do them as part of the setup to use Cygwin. I do them in > `setup-cygwin.el', which is, incidentally, used by quite a few > people AFAIK. > http://www.emacswiki.org/emacs/download/setup-cygwin.el That file needs this fixed ASAP. > Anyway, I tried commenting out the first of those. That did > change the text of the *Warning* buffer, so that it mentioned > utf-8 as one of the possibilities. (Unfortunately, I still > cannot get the file saved, because Emacs crashes. Again, the > autosave file looks fine in a new session, and shows U(Unix) > in the mode line.) The crash is some separate problem, it doesn't crash for me. Anyway, this is all tangential to the problem. After the file is saved as UTF-8, does visiting it display it correctly, after you correct your customizations as indicated above? If not, you will have to use "C-x RET c" or "C-x RET r", as I mentioned earlier.