minibuffer

How to copy the current line below in Emacs Lisp?

September 10, 2023
(defun copy-current-line-below ()
  "Copy current line and past it below"
  (interactive)
  (let ((line (buffer-substring (point-at-bol) (point-at-eol))))
    (save-excursion
      (forward-line)
      (insert line "\n"))))

You might be interested in: