summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/elisp/my-web.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/emacs/elisp/my-web.el b/emacs/elisp/my-web.el
index 12e5c97..75951f4 100644
--- a/emacs/elisp/my-web.el
+++ b/emacs/elisp/my-web.el
@@ -4,7 +4,7 @@
(require 'my-strings)
-(defun fcuny/get-page-title (url)
+(defun my/get-page-title (url)
"Make URL into an 'org-mode' link."
(let ((title))
(with-current-buffer (url-retrieve-synchronously url)
@@ -17,5 +17,16 @@
(decode-coding-string title 'utf-8))
(concat "[[" url "][" title "]]"))))
+(defun my/github-code-search ()
+ "Search code on github for a given language."
+ (interactive)
+ (let ((language (completing-read
+ "Language: "
+ '("Emacs Lisp" "Python" "Go")))
+ (code (read-string "Code: ")))
+ (browse-url
+ (concat "https://github.com/search?l=" language
+ "&type=code&q=" code))))
+
(provide 'my-web)
;;; my-web.el ends here