[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix bbdb-mua-edit-field-sender for action=query
From: |
Sam Steingold |
Subject: |
Re: [PATCH] Fix bbdb-mua-edit-field-sender for action=query |
Date: |
Wed, 23 Feb 2022 11:26:48 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) |
> * Roland Winkler <jvaxyre@tah.bet> [2022-02-22 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?
this will probably work too
> 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.
>
--
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2113
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
https://thereligionofpeace.com https://ffii.org https://jihadwatch.org
UNIX, car: hard to learn/easy to use; Windows, bike: hard to learn/hard to use.