summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/doc/jao-mac.el9
-rw-r--r--lib/net/jao-notmuch-gnus.el2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/doc/jao-mac.el b/lib/doc/jao-mac.el
index 06d6ad3..822cdb0 100644
--- a/lib/doc/jao-mac.el
+++ b/lib/doc/jao-mac.el
@@ -130,6 +130,15 @@
(browse-url url))
(message "No article selected in NetNewsWire")))
+(defvar jao-nnw--label-cmd
+ "lsappinfo info -app NetNewsWire -only StatusLabel")
+
+(defun jao-nnw-unread-count ()
+ "A very hacky, yet efficient, way of getting NNW's badge."
+ (let ((s (shell-command-to-string jao-nnw--label-cmd)))
+ (when (string-match ".*=\"\\([0-9]+\\)\" ." s)
+ (string-to-number (match-string 1 s)))))
+
;;; Safari
(defun jao-safari-current-url ()
(jao-mac-tell-app "Safari" "return URL of current tab of window 1"))
diff --git a/lib/net/jao-notmuch-gnus.el b/lib/net/jao-notmuch-gnus.el
index 5cd42fa..3abfaee 100644
--- a/lib/net/jao-notmuch-gnus.el
+++ b/lib/net/jao-notmuch-gnus.el
@@ -176,7 +176,7 @@ Example:
(msg-id (when msg-id (replace-regexp-in-string "^id:" "" msg-id))))
(if (and group msg-id)
(org-gnus-follow-link group msg-id)
- (message "Couldn't get relevant infos for switching to Gnus."))))
+ (message "Couldn't get relevant info for switching to Gnus."))))
(defun jao-notmuch-gnus-engine (prefix config)
(let ((prefix (file-name-as-directory (expand-file-name prefix "~")))