From c8e1b0c852f141528173ba8a894631715fe8bd2b Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 30 Jun 2016 14:17:35 +0200 Subject: Simplify opening bugs --- debian.el | 13 +++++++++++++ keybindings.el | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 debian.el diff --git a/debian.el b/debian.el new file mode 100644 index 0000000..85b2505 --- /dev/null +++ b/debian.el @@ -0,0 +1,13 @@ +(defun xcpu-deb-open-bug () + "Open the bug under the cursor in the debian bts" + (interactive) + (let* ( + (bounds (bounds-of-thing-at-point 'symbol)) + (text (if bounds + (buffer-substring (car bounds) (cdr bounds)) + (read-string "Debian Number: "))) + (url (concat "http://bugs.debian.org/" text)) + ) + (browse-url url) + )) + diff --git a/keybindings.el b/keybindings.el index 2cafa3b..446ea72 100644 --- a/keybindings.el +++ b/keybindings.el @@ -15,3 +15,5 @@ (global-set-key (kbd "C-, c") 'xcpu-commit-current-file) (global-set-key (kbd "C-, C") 'blog-insert-cve-markdown-link) (global-set-key (kbd "C-, D") 'blog-insert-debian-bts-markdown-link) +(global-set-key (kbd "C-, g") 'vc-git-grep) +(global-set-key (kbd "C-, b") 'xcpu-deb-open-bug) -- cgit v1.2.3