d754d2f Fixing `gnorb-bbdb-postings-styles'
eaaea81 Link extraction should return links in same order
894b96c Additional guard for non-existent headings
2660934 gnorb-bbdb.el: Use the right catch tag name
b632038 gnorb-registry.el: Check for old version of registry
86f288a Fix matching of posting styles, pt 2
87137be gnorb-bbdb.el: Fix matching of posting styles
8c2fb15 nngnorb.el: Handle non-existent nnir-tmp-buffer
7fcde77 Handle renaming of Org variable
6722839 Formatting improvements
d72fee7 Redundant setting of window configuration
git-subtree-dir: packages/gnorb
git-subtree-split:
d754d2f220815a804aabe4707835a7bdbef14e77
(unless (fboundp field)
;; what's the record's existing value for this field?
(setq rec-val (bbdb-record-field r field)))
(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)
;; there are matches, run through the field setters in last
;; element of the sexp
(dolist (attribute style)
strings)
((numberp gnorb-org-mail-scan-scope)
(cl-subseq
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
;; We could provide more options here. 'tree vs
;; 'subtree, for instance.
(t
;; insert text, if any
(when text
(message-goto-body)
;; insert text, if any
(when text
(message-goto-body)
(if (bufferp text)
(insert-buffer-substring text)
(insert text)))
(if (bufferp text)
(insert-buffer-substring text)
(insert text)))
;; got too much hard-coded stuff.
(interactive "P")
(org-back-to-heading t)
;; got too much hard-coded stuff.
(interactive "P")
(org-back-to-heading t)
+ (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-completing-read
"Export backend: "
(mapcar (lambda (b)
(symbol-name (org-export-backend-name b)))
- org-export--registered-backends) nil t))
(backend-symbol (intern backend-string))
(f-or-t (org-completing-read "Export as file or text? "
'("file" "text") 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)
,@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))
(if (bufferp result)
(setq text result)
(setq file result))
(let ((messages (length (gnorb-registry-tracked-messages)))
(headings (length (gnorb-registry-tracked-headings)))
(reg-size (registry-size gnus-registry-db))
(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)
(with-current-buffer "*Gnorb Usage*"
(let ((inhibit-read-only t))
(erase-buffer)
"Return pretty outline path of the Org heading indicated by ID.
If the KW argument is true, add the TODO keyword into the path."
"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.
(defun gnorb-scan-links (bound &rest types)
"Scan from point to BOUND looking for links of type in TYPES.
;; this summary buffer.
(buffer-local-value
'nngnorb-attachment-file-list
;; 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]
(define-key gnorb-summary-minor-mode-map
[remap gnus-summary-exit]