There is C-0 C-k or C-u 0 C-k. See section (info "(emacs) Killing by Lines").


I have C-<backspace> bound to the following function: (defun phg/kill-to-bol () "Kill from point to beginning of line." (interactive) (kill-line 0)) Basically just the C-u 0 C-k from the other answer, see kill-line.


I don't know why your kill-ring gets messed up. It might be that it is some inter-program action that modifies the kill-ring. But the right way to implement deleting instead of killing is: (defun delete-word (arg) "Delete characters forward until encountering the end of a word. With argument ARG, do this that many times." (interactive "p") (delete-...


Comments on the question post made me understand that the rect library was missing. I looked into brew and tried a brew upgrade emacs and surprise surprise it told me that emacs was not installed, so it seems that my emacs was a default "build in" prior to me switching to use homebrew and my global brew upgrade command had not actually upgraded emacs ...

Only top voted, non community-wiki answers of a minimum length are eligible