help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to view raw text in Emacs?


From: Will Parsons
Subject: Re: How to view raw text in Emacs?
Date: Thu, 5 Apr 2018 22:57:44 -0400
User-agent: slrn/1.0.3 (FreeBSD)

On Thursday,  5 Apr 2018  5:18 PM -0400, Ben Bacarisse wrote:
> Alex Kost <address@hidden> writes:
>
>> N. Jackson (2018-04-05 14:56 -0400) wrote:
>>
>>> Sometimes when I'm using Emacs I want to see "what's really there"
>>> rather than the view of the text that Emacs is showing me. So far, I
>>> have not figured out how to do this. Usually after casting about in
>>> Emacs for a solution, the frustration builds sufficiently that I switch
>>> to Kate of Gedit to see what I want to see. I would like to learn how to
>>> do this in Emacs.
>>>
>>> For example, I open etc/enriched.txt. I realise that there is more there
>>> than I'm seeing and am curious to see what is actually in the file. I
>>> try `M-x fundamental-mode RET' which changes nothing. (I don't know why
>>> I think it should, but that always seems to be what I try first.) Then I
>>> see in the mode line that I'm in "Enriched" mode, so I try `M-x
>>> enriched-mode RET' to turn it off, which does seem to turn it off (it's
>>> nice that it's intuitive that way), but the view in the buffer doesn't
>>> change. I try `M-x set-buffer-coding-system RET raw-text RET', but that
>>> doesn't help either. I try `M-x set-buffer-coding-system RET
>>> no-conversion RET', but again there is no apparent change.
>>>
>>> Clearly I'm missing something here, but I'm not sure what it is. Any
>>> pointers would be welcome.
>>
>> Perhaps "M-x find-file-literally" is what you are looking for.
>
> A word of caution from this function's description
>
>   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.
>
> And another option...  Sometimes I find hexl-mode the right thing,
> though it involves more learning because it's such a different kind of
> view of the buffer.

But, yes, if you *really* want to know what's in the buffer, then
hexl-mode will give you that information.

-- 
Will


reply via email to

[Prev in Thread] Current Thread [Next in Thread]