Skip to content

Instantly share code, notes, and snippets.

@krl
Created March 14, 2011 15:55
Show Gist options
  • Save krl/869356 to your computer and use it in GitHub Desktop.
Save krl/869356 to your computer and use it in GitHub Desktop.
notmuch copy custom header (hack)
(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