X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fnotmuch-pick%2Fnotmuch-pick.el;h=04e37ee59a1e5a15abbdba152909aabadcff0962;hb=1716edff9d18baf1f2eb7cff1c62d373592a967c;hp=7f5f729a55aee73f5d352c538c291d405ac2f830;hpb=8c6b2e7e9d30bb3a9ef4fd8632cbf6d8d0673bb7;p=obsolete%2Fnotmuch-old diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el index 7f5f729a..04e37ee5 100644 --- a/contrib/notmuch-pick/notmuch-pick.el +++ b/contrib/notmuch-pick/notmuch-pick.el @@ -238,6 +238,22 @@ Some useful entries are: (beginning-of-line) (get-text-property (point) :notmuch-message-properties))) +;; XXX This should really be a lib function but we are trying to +;; reduce impact on the code base. +(defun notmuch-show-get-prop (prop &optional props) + "This is a pick overridden version of notmuch-show-get-prop + +It gets property PROP from PROPS or, if PROPS is nil, the current +message in either pick or show. This means that several functions +in notmuch-show now work unchanged in pick as they just need the +correct message properties." + (let ((props (or props + (cond ((eq major-mode 'notmuch-show-mode) + (notmuch-show-get-message-properties)) + ((eq major-mode 'notmuch-pick-mode) + (notmuch-pick-get-message-properties)))))) + (plist-get props prop))) + (defun notmuch-pick-set-message-properties (props) (save-excursion (beginning-of-line)