]> code.delx.au - gnu-emacs-elpa/commitdiff
Merge commit '37c46180280f10fa5120a017acd04f7022d124e4'
authorEric Abrahamsen <eric@ericabrahamsen.net>
Tue, 5 Jan 2016 09:35:41 +0000 (17:35 +0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Tue, 5 Jan 2016 09:35:41 +0000 (17:35 +0800)
1  2 
packages/gnorb/gnorb-bbdb.el
packages/gnorb/gnorb-org.el
packages/gnorb/gnorb-registry.el
packages/gnorb/gnorb-utils.el
packages/gnorb/nngnorb.el

index eb2f6eb02511f615aa662c7ebcceb647a2a37d3c,306ea01521f11b308a97a5f2560df2690bfba552..306ea01521f11b308a97a5f2560df2690bfba552
@@@ -255,24 -255,34 +255,34 @@@ is non-nil (as in interactive calls) b
        (unless (fboundp field)
          ;; what's the record's existing value for this field?
          (setq rec-val (bbdb-record-field r field)))
-       (when (cond
-              ((eq field 'address)
-               (dolist (a rec-val)
-                 (unless (and label
-                              (not (string-match label (car a))))
-                   (string-match val (bbdb-format-address-default a)))))
-              ((eq field 'phone)
-               (dolist (p rec-val)
-                 (unless (and label
-                              (not (string-match label (car p))))
-                   (string-match val (bbdb-phone-string p)))))
-              ((consp rec-val)
-               (dolist (f rec-val)
-                 (string-match val f)))
-              ((fboundp field)
-               (funcall field r))
-              ((stringp rec-val)
-               (string-match val rec-val)))
+       (when (catch 'match
+               (cond
+                ((eq field 'address)
+                 (dolist (a rec-val)
+                   (unless (and label
+                                (not (string-match label (car a))))
+                     (when
+                         (string-match-p
+                          val
+                          (bbdb-format-address-default a))
+                       (throw 'match t)))))
+                ((eq field 'phone)
+                 (dolist (p rec-val)
+                   (unless (and label
+                                (not (string-match label (car p))))
+                     (when
+                         (string-match-p val (bbdb-phone-string p))
+                       (throw 'match t)))))
+                ((consp rec-val)
+                 (dolist (f rec-val)
+                   (when (string-match-p val f)
+                     (throw 'match t))))
+                ((fboundp field)
+                 (when (string-match-p (funcall field r))
+                   (throw 'match t)))
+                ((stringp rec-val)
+                 (when (string-match-p val rec-val)
+                   (throw 'match t)))))
          ;; there are matches, run through the field setters in last
          ;; element of the sexp
          (dolist (attribute style)
index 78d636bc6c0c20204e8333737cfb7c8037d7df73,34cd8033c1bdf6a4f1da487314016c4f317a0a68..34cd8033c1bdf6a4f1da487314016c4f317a0a68
@@@ -177,9 -177,10 +177,10 @@@ we came from.
                   strings)
                  ((numberp gnorb-org-mail-scan-scope)
                   (cl-subseq
-                   strings 0 (min
-                              (length strings)
-                              (1+ gnorb-org-mail-scan-scope))))
+                   (nreverse strings)
+                   0 (min
+                      (length strings)
+                      (1+ gnorb-org-mail-scan-scope))))
                  ;; We could provide more options here. 'tree vs
                  ;; 'subtree, for instance.
                  (t
@@@ -302,7 -303,7 +303,7 @@@ headings.
    ;; insert text, if any
    (when text
      (message-goto-body)
-     (insert"\n")
+     (insert "\n")
      (if (bufferp text)
        (insert-buffer-substring text)
        (insert text)))
@@@ -502,13 -503,17 +503,17 @@@ default set of parameters.
    ;; got too much hard-coded stuff.
    (interactive "P")
    (org-back-to-heading t)
-   (let* ((backend-string
+   (let* ((bkend-var
+         (if (boundp 'org-export--registered-backends)
+             org-export--registered-backends
+           org-export-registered-backends))
+        (backend-string
          (org-completing-read
           "Export backend: "
           (mapcar (lambda (b)
                     (symbol-name (org-export-backend-name b)))
-                  org-export--registered-backends)
-            nil t))
+                  bkend-var)
+          nil t))
         (backend-symbol (intern backend-string))
         (f-or-t (org-completing-read "Export as file or text? "
                                      '("file" "text") nil t))
                     ,@opts
                     ,gnorb-org-email-subtree-file-parameters))))
         text file)
-     (setq gnorb-window-conf (current-window-configuration))
-     (move-marker gnorb-return-marker (point))
      (if (bufferp result)
        (setq text result)
        (setq file result))
index bcd5adc2c999369ec070abba9693c4a70ad4e9f1,92205653c7dd48a1db3a26a470b7b1ddaccd67a9..92205653c7dd48a1db3a26a470b7b1ddaccd67a9
@@@ -235,7 -235,9 +235,9 @@@ number of tracked messages, the number 
    (let ((messages (length (gnorb-registry-tracked-messages)))
        (headings (length (gnorb-registry-tracked-headings)))
        (reg-size (registry-size gnus-registry-db))
-       (reg-max-size (oref gnus-registry-db max-size)))
+       (reg-max-size (if (slot-exists-p gnus-registry-db 'max-size)
+                         (oref gnus-registry-db max-size)
+                       (oref gnus-registry-db max-hard))))
      (with-current-buffer "*Gnorb Usage*"
        (let ((inhibit-read-only t))
         (erase-buffer)
index d7f5e8651f28a73cbb2dc6277b0716e5cea8a92f,4d473f17f0c7ea31b9bdc48678b630ac5816692b..4d473f17f0c7ea31b9bdc48678b630ac5816692b
@@@ -334,24 -334,27 +334,27 @@@ agenda. Then let the user choose an act
    "Return pretty outline path of the Org heading indicated by ID.
  
  If the KW argument is true, add the TODO keyword into the path."
-   (org-with-point-at (org-id-find id t)
-     (let ((el (org-element-at-point)))
-       (concat
-        (if kw
-          (format "(%s): "
-                  (org-element-property :todo-keyword el))
-        "")
-        (org-format-outline-path
-       (append
-        (list
-         (file-name-nondirectory
-          (buffer-file-name
-           (org-base-buffer (current-buffer)))))
-        (org-get-outline-path)
-        (list
-         (replace-regexp-in-string
-          org-bracket-link-regexp
-          "\\3" (org-element-property :raw-value el)))))))))
+   (let ((pt (org-id-find id t)))
+     (if pt
+       (org-with-point-at pt
+         (let ((el (org-element-at-point)))
+           (concat
+            (if kw
+                (format "(%s): "
+                        (org-element-property :todo-keyword el))
+              "")
+            (org-format-outline-path
+             (append
+              (list
+               (file-name-nondirectory
+                (buffer-file-name
+                 (org-base-buffer (current-buffer)))))
+              (org-get-outline-path)
+              (list
+               (replace-regexp-in-string
+                org-bracket-link-regexp
+                "\\3" (org-element-property :raw-value el))))))))
+       "[none]")))
  
  (defun gnorb-scan-links (bound &rest types)
    "Scan from point to BOUND looking for links of type in TYPES.
index 9d03e14ad33d6cf7a571cad366dc1de06ac75d6e,bb0ddfdcdfe917ab1e2110ab8e641760e40475a5..bb0ddfdcdfe917ab1e2110ab8e641760e40475a5
@@@ -183,7 -183,7 +183,7 @@@ continue to provide tracking of sent me
        ;; this summary buffer.
        (buffer-local-value
         'nngnorb-attachment-file-list
-         (get-buffer nnir-tmp-buffer))))
+         (get-buffer-create nnir-tmp-buffer))))
  
  (define-key gnorb-summary-minor-mode-map
    [remap gnus-summary-exit]