Hello all,

This is a great community to see on Lemmy!

I have a question about the following in the emacs tutorial.

"Each line of text ends with a Newline character, which serves to separate it from the following line. (Normally, the last line in a file will have a Newline at the end, but Emacs does not require it.)

Try to C-b at the beginning of a line. It should move to the end of the previous line. This is because it moves back across the Newline character."

My interpretation after multiple reads; emacs loves newline characters and uses them liberally at the end of each line, unlike files who are more conservative and only require it at the eof. Now, if I type C-b at the beginning of a line I will move to the end of the line, this seems to normal. Why is this important? and how does it "move back across the Newline character.

Any thoughts or discussion from you all would be much appreciated.

@otso
link
32Y

my guess is it moves to the previous line, rather than highlighting it it moves across it

@ksynwa
link
22Y

emacs loves newline characters and uses them liberally at the end of each line

this is not it. in every text file, lines end with the newline character. emacs doesn’t like newline characters anymore than cat.

the point of the tutorial is that if there is a file whose contents are:

a
b

there is a hidden newline character after a. if the emacs cursor is on b and you press C-b, you move to the hidden new line character after a.

@JakePizza
creator
link
22Y

This makes a lot more sense to me. Thank you very much!

Our infinitely powerful editor
!emacs
    • 0 users online
    • 1 user / day
    • 2 users / week
    • 6 users / month
    • 10 users / 6 months
    • 209 subscribers
    • 32 Posts
    • 19 Comments
    • Modlog