Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Created July 13, 2020 14:55
Show Gist options
  • Save JohnL4/0f5298069f8c173607962188a486b8f0 to your computer and use it in GitHub Desktop.
Save JohnL4/0f5298069f8c173607962188a486b8f0 to your computer and use it in GitHub Desktop.
Insert current line number at a place in a file (emacs lisp)
; For use in editing files of programming languages that don't have "current line number" functions.
; Looking at you, k6.io.
; Include in macro or defun, obviously.
(insert (format "%d" (line-number-at-pos)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment