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?