I wrote this custom function to copy the entire line, if no mark is set
(defun sk-copy-ops (beg end)
(interactive "r")
(if mark-active
(kill-ring-save beg end)
(kill-ring-save (line-beginning-position) (line-end-position))))
I am seeing two issues,
1) It copies from the current point and not from the beginning of the line
2) And when i keep my point on the last but one line in the above code and do M-x sk-copy-ops, it copies from the Point to the end of the buffer.
Are line-beginning/end-position not the right indicators of the begin/end of lines in buffer?
(point-at-bol)and(point-at-eol). I've been spending a little too much time looking atelisp, because I keep wanting to change the indentation a bit for theif/then/else-- :) – lawlist Aug 13 '15 at 03:34point-at-bolandpoint-at-eolare aliases forline-beginning-positionandline-end-position. – Drew Aug 13 '15 at 04:30