diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-23 10:52:03 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-23 10:52:03 -0700 |
commit | 28b889404a73093ace55868e28fa41cdb5d4a3fb (patch) | |
tree | 627d2b82a22914ca96a19f22796fa2ad1f10e12e | |
parent | ab4acbc313dc1a20e166045e61c603053c4f00dc (diff) | |
download | mailscripts-28b889404a73093ace55868e28fa41cdb5d4a3fb.tar.gz |
add notmuch-slurp-debbug-at-point
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | mailscripts.el | 15 |
2 files changed, 20 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 11aa2dc..6565a39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mailscripts (0.20-2) UNRELEASED; urgency=medium + + * mailscripts.el: + - new command: notmuch-slurp-debbug-at-point + + -- Sean Whitton <spwhitton@spwhitton.name> Sat, 23 May 2020 10:49:57 -0700 + mailscripts (0.20-1) unstable; urgency=medium * imap-dl: Fix failure when python3-gssapi isn't installed (Closes: #955011). diff --git a/mailscripts.el b/mailscripts.el index 2280f5a..3e5b3b5 100644 --- a/mailscripts.el +++ b/mailscripts.el @@ -1,10 +1,10 @@ ;;; mailscripts.el --- functions to access tools in the mailscripts package ;; Author: Sean Whitton <spwhitton@spwhitton.name> -;; Version: 0.20 +;; Version: 0.21 ;; Package-Requires: (notmuch projectile) -;; Copyright (C) 2018, 2019 Sean Whitton +;; Copyright (C) 2018, 2019, 2020 Sean Whitton ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ (require 'notmuch) (require 'projectile) +(require 'thingatpt) (defgroup mailscripts nil "Customisation of functions in the mailscripts package.") @@ -56,6 +57,16 @@ If NO-OPEN, don't open the thread." (notmuch-show (concat "Bug#" bug)))) ;;;###autoload +(defun notmuch-slurp-debbug-at-point () + "Slurp Debian bug with bug number at point and open the thread in notmuch." + (interactive) + (save-excursion + ;; the bug number might be prefixed with a # or 'Bug#'; try + ;; skipping over those to see if there's a number afterwards + (skip-chars-forward "#bBug" (+ 4 (point))) + (notmuch-slurp-debbug (number-to-string (number-at-point))))) + +;;;###autoload (defun notmuch-slurp-this-debbug () "When viewing a Debian bug in notmuch, download any missing messages." (interactive) |