-
-
Save binshengliu/5372467 to your computer and use it in GitHub Desktop.
Revisions
-
kristianhellquist created this gist
Jul 10, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ (defun copy-current-line-position-to-clipboard () "Copy current line in file to clipboard as '</path/to/file>:<line-number>'" (interactive) (let ((path-with-line-number (concat (buffer-file-name) ":" (number-to-string (line-number-at-pos))))) (x-select-text path-with-line-number) (message (concat path-with-line-number " copied to clipboard")))) (define-key global-map (kbd "M-l") 'copy-current-line-position-to-clipboard)