I have one more question about customizing emacs for use with an R session. I like to use the backward kill function, but this deletes the command prompt in the R session. I have tried modifying the function
;; Kill to the start of the command line for R
(defun backward-kill-r ()
"Kill chars backward until encountering the end of a line."
(interactive)
(delete-region (point-at-bol) (point)))
But I get the same prompt-deleting behavior. I’m guessing that I can change point-at-bol to correct this, but what do I need to change it to? Thanks!
C-c C-udoes what you want already. I findC-a C-kto be the easiest way to do this though, as I useC-a(move to the beginning of the line, which does the right thing in iESS mode) andC-k(kill line) are part of my emacs ‘muscle-memory’.FYI, instead of
point-at-bolyou wantcomint-bol, which will give you the behaviour you’re after, if you don’t want to use either of the suggestions above.