Last active
January 28, 2017 13:36
-
-
Save pogin503/e1b2ad6d920ac831a907dab7d8b68c65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'f) | |
(defun current-line-number () | |
"Print the current line number (in the buffer) of point." | |
(interactive) | |
(save-restriction | |
(widen) | |
(save-excursion | |
(beginning-of-line) | |
(1+ (count-lines 1 (point)))))) | |
(defun my-copy-current-line-info () | |
(interactive) | |
(let ((path (f-this-file))) | |
(when (not (null path)) | |
(kill-new (format "%s L%s" | |
(f-filename (f-this-file)) | |
(current-line-number)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment