* emacs + donation
@ 2018-01-10 14:35 d paddy
2018-01-10 16:00 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: d paddy @ 2018-01-10 14:35 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: d paddy
Greetings...
I was initially pointed to info@fsf.org so as to get help with an emacs
question and donate to fsf.
A consequence of that interaction was my redirection to
help-gnu-emacs@gnu.org...
QUESTION: How do I stop emacs from changing what I type?
EXAMPLE: I type eleven ascii characters into an empty buffer (in
fundamantal mode) and then save the buffer to the file "example"; the hex
values of those characters are
character 1 : 31
character 2 : 32
character 3 : 33
character 4 : 0a
character 5 : 20
character 6 : 20
character 7 : 20
character 8 : 0a
character 9 : 34
character 10: 35
character 11: 36
Moreover those characters above were typed into the buffer by pressing the
following eleven keys on the keyboard
key 1 : 1
key 2 : 2
key 3 : 3
key 4 : enter
key 5 : space
key 6 : space
key 7 : space
key 8 : enter
key 9 : 5
key 10: 6
key 11: 7
The word count utility reports only eight bytes in the file "example" --
even though I typed eleven -- and hexl-mode shows those bytes are
byte 1 : 31
byte 2 : 32
byte 3 : 33
byte 4 : 0a
byte 5 : 0a
byte 6 : 34
byte 7 : 35
byte 8 : 36
Emacs evidently changes my input. How do I cajole emacs into reflecting
exactly what I type?
Many thanks.
P.S. I am not looking for opinions about why I might/should want emacs to
change what I type... I'm looking for the "get-off-my-lawn-mode" wherein
emacs faithfully represents exactly what I type ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs + donation
2018-01-10 14:35 emacs + donation d paddy
@ 2018-01-10 16:00 ` Eli Zaretskii
2018-01-10 16:06 ` Robert Pluim
2018-01-10 16:07 ` tomas
2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-01-10 16:00 UTC (permalink / raw)
To: help-gnu-emacs
> From: d paddy <d0.paddy@gmail.com>
> Date: Wed, 10 Jan 2018 09:35:36 -0500
> Cc: d paddy <d0.paddy@gmail.com>
>
> key 1 : 1
> key 2 : 2
> key 3 : 3
> key 4 : enter
> key 5 : space
> key 6 : space
> key 7 : space
> key 8 : enter
> key 9 : 5
> key 10: 6
> key 11: 7
>
> The word count utility reports only eight bytes in the file "example" --
> even though I typed eleven -- and hexl-mode shows those bytes are
>
> byte 1 : 31
> byte 2 : 32
> byte 3 : 33
> byte 4 : 0a
> byte 5 : 0a
> byte 6 : 34
> byte 7 : 35
> byte 8 : 36
>
> Emacs evidently changes my input. How do I cajole emacs into reflecting
> exactly what I type?
Turn off electric-indent-mode. When that mode is turned on (as it is
by default), typing RET removes trailing whitespace from the previous
line.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs + donation
2018-01-10 14:35 emacs + donation d paddy
2018-01-10 16:00 ` Eli Zaretskii
@ 2018-01-10 16:06 ` Robert Pluim
2018-01-10 16:07 ` tomas
2 siblings, 0 replies; 4+ messages in thread
From: Robert Pluim @ 2018-01-10 16:06 UTC (permalink / raw)
To: help-gnu-emacs
d paddy <d0.paddy@gmail.com> writes:
> Emacs evidently changes my input. How do I cajole emacs into reflecting
> exactly what I type?
Either use C-j instead of enter, or turn off electric-indent-mode
using customize.
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs + donation
2018-01-10 14:35 emacs + donation d paddy
2018-01-10 16:00 ` Eli Zaretskii
2018-01-10 16:06 ` Robert Pluim
@ 2018-01-10 16:07 ` tomas
2 siblings, 0 replies; 4+ messages in thread
From: tomas @ 2018-01-10 16:07 UTC (permalink / raw)
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, Jan 10, 2018 at 09:35:36AM -0500, d paddy wrote:
> Greetings...
>
> I was initially pointed to info@fsf.org so as to get help with an emacs
> question and donate to fsf.
> A consequence of that interaction was my redirection to
> help-gnu-emacs@gnu.org...
>
> QUESTION: How do I stop emacs from changing what I type?
I guess you are falling prey to "electric-indent-mode".
(I assume you are using fundamental-mode, but for most programming
modes this is similar)
To check this, re-run your experiment, but *before*, enter the
following command: "M-x electric-indent-mode" (M-x is the META
key, typically Alt on a PC keyboard). You should see the message
"Electric-Indent mode disabled" in the mode line (otherwise my
hunch is incorrect and you may stop reading here :)
Now retry.
You see, electric indent mode inserts spaces to indent a newly
entered line to match the insertion of the line above. To not
let lots of lines with just whitespaces in it, it helpfully
removes trailing whitespace when you leave the line with RET.
Possibly it was this humble minor mode who was stealing the
whitespace you entered.
If you *really* want to have control over non-visible stuff in
your buffer, you might enjoy whitespace-mode, which highlights
(among other things) those otherwise invisible critters.
And now keep those donations coming :-)
Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlpWOl8ACgkQBcgs9XrR2kafhwCfY9F4EiGSUY8FaluzeMhPLEJ8
4CcAnixLCjB4/odrVf20anfs5KKCqtZQ
=PNUb
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-10 16:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10 14:35 emacs + donation d paddy
2018-01-10 16:00 ` Eli Zaretskii
2018-01-10 16:06 ` Robert Pluim
2018-01-10 16:07 ` tomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).