[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix bbdb-mua-edit-field-sender for action=query
From: |
Roland Winkler |
Subject: |
Re: [PATCH] Fix bbdb-mua-edit-field-sender for action=query |
Date: |
Tue, 22 Feb 2022 23:06:25 -0600 |
On Tue, Feb 22 2022, Sam Steingold wrote:
> Right now ";" does not let me edit the notes for the current sender record.
> This patch fixes the issue.
Thanks! Can you please test the following slightly different patch?
diff --git a/lisp/bbdb-mua.el b/lisp/bbdb-mua.el
index 2117e98..2511f4b 100644
--- a/lisp/bbdb-mua.el
+++ b/lisp/bbdb-mua.el
@@ -274,33 +274,31 @@ Usually this function is called by the wrapper
`bbdb-mua-update-records'."
(setq records-alist (funcall bbdb-record-address-alist-function
records-alist)))
- (let (task)
- (while (setq elt (pop records-alist))
- (let* ((record (nth 0 elt))
- (address (nth 0 (nth 1 elt)))
- (mail (or (nth 0 address) (nth 1 address))))
- (when (and (not record) mail (eq action 'query) (not bbdb-read-only))
- (setq task (bbdb-query-create mail))
- (if (memq task '(search create update))
- (setq action task)))
- (cond ((eq task 'quit)
- (setq records-alist nil))
- ((eq task 'next)) ; do nothing
- ((not (or record mail))) ; do nothing
- ((or bbdb-read-only (eq action 'search))
- (if record (push record records)))
- (t
- (if (or (eq action 'create)
- (eq task 'create-current) ; and (eq action 'query)
- (and record (eq action 'update)))
- ;; If we have more than one record, all but the first
- ;; one are new. So no need to worry about duplicates.
- (setq records
- (nconc (bbdb-annotate-message record
- (nth 1 elt) action)
- records))))))
- (if (and records (not bbdb-message-all-addresses))
- (setq records-alist nil))))
+ (while (setq elt (pop records-alist))
+ (let* ((record (nth 0 elt))
+ (address (nth 0 (nth 1 elt)))
+ (mail (or (nth 0 address) (nth 1 address)))
+ task)
+ (when (and (not record) mail (eq action 'query) (not bbdb-read-only))
+ (setq task (bbdb-query-create mail))
+ (if (memq task '(search create update))
+ (setq action task)))
+ (cond ((eq task 'quit)
+ (setq records-alist nil))
+ ((eq task 'next)) ; do nothing
+ ((not (or record mail))) ; do nothing
+ ((or bbdb-read-only (eq action 'search))
+ (if record (push record records)))
+ ((or (eq action 'create)
+ (eq task 'create-current) ; and (eq action 'query)
+ (and record (memq action '(query update))))
+ ;; If we have more than one record, all but the first
+ ;; one are new. So no need to worry about duplicates.
+ (setq records
+ (nconc (bbdb-annotate-message record (nth 1 elt) action)
+ records)))))
+ (if (and records (not bbdb-message-all-addresses))
+ (setq records-alist nil)))
(setq records
;; Sorting RECORDS is useful when RECORDS are displayed.