From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Winston Newsgroups: gmane.emacs.help Subject: Re: How does one disable (UTF-8?) input "fixup"? Date: Tue, 12 Jan 2016 02:51:30 -0500 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1452585342 6572 80.91.229.3 (12 Jan 2016 07:55:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jan 2016 07:55:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 12 08:55:27 2016 Return-path: Envelope-to: geh-help-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 1aItnV-0007eD-8C for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jan 2016 08:55:21 +0100 Original-Received: from localhost ([::1]:58699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aItnR-0005wJ-Dg for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jan 2016 02:55:17 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: HiP9CM4zZKmgWNAsVK99/w.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) Mail-Copies-To: never X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:13HxABamLUrbUcMYVy3xYfxE5Ag= Original-Xref: usenet.stanford.edu gnu.emacs.help:216411 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108701 Archived-At: I originally asked: >> What mode/variable controls text conversion/fixup when reading a file? >> I have a mostly ASCII text file that contains a few stray non-ASCII >> characters. Eli Zaretskii kindly replied: > You need to prefix "C-x C-f" with "C-x RET c us-ascii RET". See the > node "Text Coding" in the Emacs manual. > Or use "M-x find-file-literally" to disable any conversions. Ah. OK. Thanks! >> However, if I rename the file "foo.exe", do "emacs foo.exe" and >> search, I see the original characters (no change). > Emacs by default visits binary files without any conversions. ...which is what I expected and had been used to, and why I tried renaming the file "foo.exe" as a work-around to prevent the conversions. :-) >> Curiously, after "emacs foo.exe", I did find-file-other-window to >> read in "foo", and the characters were NOT altered. > Because the file is already in an Emacs buffer, so Emacs doesn't > re-read it, it just reuses that buffer's contents. You appear to be referring to this feature of find-file-literally: "You cannot absolutely rely on this function to result in visiting the file literally. If Emacs already has a buffer which is visiting the file, you get the existing buffer, regardless of whether it was created literally or not." However, that wasn't the case I described. I had identical content in two separate disk files ("foo" and "foo.exe"). The files were not linked (hard or symbolic). [Think "bar" instead of "foo" if that helps.] I started emacs with "emacs foo.exe". "foo" was not in any Emacs buffer at that point. I then used find-file-other-window to read "foo". That created a second buffer to hold "foo". Although the contents happened to be identical, from Emacs's standpoint, they were two separate files in two separate buffers. I was surprised that character conversions upon reading "foo" as the second file into a second buffer were in any way affected by having read some other file into another buffer before it. No matter... You answered my question about how to prevent the conversions without having to rename the file. Thanks! -WBE