Created
March 14, 2011 15:55
-
-
Save krl/869356 to your computer and use it in GitHub Desktop.
notmuch copy custom header (hack)
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 characters
(defun ks-notmuch-show-copy-entry-url () | |
(interactive) | |
(let ((raw (shell-command-to-string | |
(concat notmuch-command | |
" show --format=raw " | |
(notmuch-show-get-message-id))))) | |
(if (string-match "X-Entry-URL: \\(.*\\)" raw) | |
(let ((url (match-string 1 raw))) | |
(kill-new url) | |
(message "Killed url: %s" url)) | |
(error "No X-Entry-URL header present")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment