unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32047: 26.1; Misleading/confusing text about `C-k' in TUTORIAL
@ 2018-07-04  1:34 N. Jackson
  2018-07-11 16:12 ` Eli Zaretskii
  2018-07-12 20:09 ` N. Jackson
  0 siblings, 2 replies; 9+ messages in thread
From: N. Jackson @ 2018-07-04  1:34 UTC (permalink / raw)
  To: 32047

At around Line 419 of the Emacs tutorial there are two
statements which are not strictly correct, which might
potentially cause confusion.

414 >> Move the cursor to the beginning of a line which is not empty.
415    Then type C-k to kill the text on that line.
416 >> Type C-k a second time.  You'll see that it kills the Newline
417    which follows that line.
418 
419 Note that a single C-k kills the contents of the line, and a second
420 C-k kills the line itself, and makes all the other lines move up.  C-k
421 treats a numeric argument specially: it kills that many lines AND
422 their contents.  This is not mere repetition.  C-u 2 C-k kills two
423 lines and their Newlines; typing C-k twice would not do that.

The example(s) given in Lines 414 to 417 are correct. But the
sentence beginning on Line 419 is misleading. It is only true
when point is at the beginning of the line.

Likewise the sentence beginning in Line 420 and the sentence
beginning in Line 422 ("C-u 2 C-k kills...") about using `C-k'
with a numeric argument are misleading in the same way -- the
writer is assuming that point was at the beginning of a line
without telling the reader of the assumption.

[In my opinion, what gets the text into trouble is that it
starts talking about `C-k' killing lines, when what it really
does (despite its name `kill-line') is kill from point to the
end of a line, except when point is at the end of a line when it
deletes the Newline separating the line from the following line
(if any). This is made clear in the examples in Lines 414 to 417
and then confuddled in the paragraph at Line 419.

To really kill lines one needs `kill-whole-line'. Whereas
`kill-line' is best thought of as "kill to end of line".]


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-05-28 built on moondust.localdomain
Windowing system distributor 'Fedora Project', version 11.0.11906000
System Description:	Fedora release 27 (Twenty Seven)






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-07-13  6:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04  1:34 bug#32047: 26.1; Misleading/confusing text about `C-k' in TUTORIAL N. Jackson
2018-07-11 16:12 ` Eli Zaretskii
2018-07-11 19:14   ` Filipp Gunbin
2018-07-11 20:45     ` N. Jackson
2018-07-12 16:06       ` Filipp Gunbin
2018-07-11 19:46   ` N. Jackson
2018-07-12 14:14     ` Eli Zaretskii
2018-07-12 20:09 ` N. Jackson
2018-07-13  6:19   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).