From: Eric Abrahamsen Date: Tue, 5 Jan 2016 09:35:41 +0000 (+0800) Subject: Merge commit '37c46180280f10fa5120a017acd04f7022d124e4' X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/4b07f2cf9a93f14a7a322c7624f17ab5dbeaf6e2?hp=017f355b8a377d192fdf1a5151f70b691c1e9efb Merge commit '37c46180280f10fa5120a017acd04f7022d124e4' --- diff --git a/packages/gnorb/gnorb-bbdb.el b/packages/gnorb/gnorb-bbdb.el index eb2f6eb02..306ea0152 100644 --- a/packages/gnorb/gnorb-bbdb.el +++ b/packages/gnorb/gnorb-bbdb.el @@ -255,24 +255,34 @@ is non-nil (as in interactive calls) be verbose." (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) diff --git a/packages/gnorb/gnorb-org.el b/packages/gnorb/gnorb-org.el index 78d636bc6..34cd8033c 100644 --- a/packages/gnorb/gnorb-org.el +++ b/packages/gnorb/gnorb-org.el @@ -177,9 +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 @@ 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 @@ 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)) @@ -531,8 +536,6 @@ default set of parameters." ,@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)) diff --git a/packages/gnorb/gnorb-registry.el b/packages/gnorb/gnorb-registry.el index bcd5adc2c..92205653c 100644 --- a/packages/gnorb/gnorb-registry.el +++ b/packages/gnorb/gnorb-registry.el @@ -235,7 +235,9 @@ number of tracked messages, the number of tracked headings, and how much of the (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) diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el index d7f5e8651..4d473f17f 100644 --- a/packages/gnorb/gnorb-utils.el +++ b/packages/gnorb/gnorb-utils.el @@ -334,24 +334,27 @@ agenda. Then let the user choose an action from the value of "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. diff --git a/packages/gnorb/nngnorb.el b/packages/gnorb/nngnorb.el index 9d03e14ad..bb0ddfdcd 100644 --- a/packages/gnorb/nngnorb.el +++ b/packages/gnorb/nngnorb.el @@ -183,7 +183,7 @@ continue to provide tracking of sent messages." ;; 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]