* [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist
@ 2017-09-11 4:21 Attic Hermit
2017-09-11 10:14 ` David Bremner
0 siblings, 1 reply; 7+ messages in thread
From: Attic Hermit @ 2017-09-11 4:21 UTC (permalink / raw)
To: notmuch
When I invocate compose-mail or something related with the message-mode
buffer and Notmuch, Notmuch keeps adding a pair like below to
`message-completion-alist`:
("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
. notmuch-address-expand-name)
I think there's bug in `notmuch-address-setup` on `notmuch-address.el`.
It checks that the pair exists in the `message-completion-alist` by
`memq`, but it seems to be amended to `member` instead.
P.S. Because I'm not a programming expert or a student, I don't know how
to send a patch to amend this problem. So I send where the bug was found
and the way how I tinkered it in English. I searched the file where bug
exists in the git repository of Notmuch, and found that there still was
a bug. I hope this will help to fix the bug.
--
Attic Hermit
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist
2017-09-11 4:21 [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist Attic Hermit
@ 2017-09-11 10:14 ` David Bremner
2017-09-11 10:50 ` Attic Hermit
0 siblings, 1 reply; 7+ messages in thread
From: David Bremner @ 2017-09-11 10:14 UTC (permalink / raw)
To: Attic Hermit, notmuch
Attic Hermit <fjdksl@cock.li> writes:
> When I invocate compose-mail or something related with the message-mode
> buffer and Notmuch, Notmuch keeps adding a pair like below to
> `message-completion-alist`:
>
> ("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
> . notmuch-address-expand-name)
>
I don't know much about the cause, but I can confirm that many such
pairs are added to this list.
d
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist
2017-09-11 10:14 ` David Bremner
@ 2017-09-11 10:50 ` Attic Hermit
2017-09-13 1:31 ` [PATCH] emacs/address: use member instead of memq to check for pair David Bremner
0 siblings, 1 reply; 7+ messages in thread
From: Attic Hermit @ 2017-09-11 10:50 UTC (permalink / raw)
To: David Bremner, notmuch
You can get rid of the bug by using `member` instead of `memq` in
`nomtuch-address-setup`:
diff -u a/notmuch-address.el b/notmuch-address.el
--- a/notmuch-address.el 2017-08-05 18:45:40.000000000 +0900
+++ b/notmuch-address.el 2017-09-11 19:40:41.230872915 +0900
@@ -159,7 +159,7 @@
#'notmuch-address-expand-name)))
(when setup-company
(notmuch-company-setup))
- (unless (memq pair message-completion-alist)
+ (unless (member pair message-completion-alist)
(setq message-completion-alist
(push pair message-completion-alist)))))
David Bremner <david@tethera.net> writes:
> Attic Hermit <fjdksl@cock.li> writes:
>
>> When I invocate compose-mail or something related with the message-mode
>> buffer and Notmuch, Notmuch keeps adding a pair like below to
>> `message-completion-alist`:
>>
>> ("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):"
>> . notmuch-address-expand-name)
>>
>
> I don't know much about the cause, but I can confirm that many such
> pairs are added to this list.
>
> d
--
Attic Hermit
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] emacs/address: use member instead of memq to check for pair
2017-09-11 10:50 ` Attic Hermit
@ 2017-09-13 1:31 ` David Bremner
2017-09-13 7:55 ` David Edmondson
2017-09-13 12:07 ` David Bremner
0 siblings, 2 replies; 7+ messages in thread
From: David Bremner @ 2017-09-13 1:31 UTC (permalink / raw)
To: David Bremner, notmuch
Quoting from the elisp reference:
For other types (e.g., lists, vectors, strings), two arguments
with the same contents or elements are not necessarily ‘eq’ to
each other.
Thanks to "Attic Hermit" for the fix.
---
emacs/notmuch-address.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index f937e708..64887a43 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -159,7 +159,7 @@ matching `notmuch-address-completion-headers-regexp'.
#'notmuch-address-expand-name)))
(when setup-company
(notmuch-company-setup))
- (unless (memq pair message-completion-alist)
+ (unless (member pair message-completion-alist)
(setq message-completion-alist
(push pair message-completion-alist)))))
--
2.14.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs/address: use member instead of memq to check for pair
2017-09-13 1:31 ` [PATCH] emacs/address: use member instead of memq to check for pair David Bremner
@ 2017-09-13 7:55 ` David Edmondson
2017-09-13 12:07 ` David Bremner
1 sibling, 0 replies; 7+ messages in thread
From: David Edmondson @ 2017-09-13 7:55 UTC (permalink / raw)
To: David Bremner, David Bremner, notmuch
Looks good.
On Tuesday, 2017-09-12 at 22:31:46 -0300, David Bremner wrote:
> Quoting from the elisp reference:
>
> For other types (e.g., lists, vectors, strings), two arguments
> with the same contents or elements are not necessarily ‘eq’ to
> each other.
>
> Thanks to "Attic Hermit" for the fix.
> ---
> emacs/notmuch-address.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
> index f937e708..64887a43 100644
> --- a/emacs/notmuch-address.el
> +++ b/emacs/notmuch-address.el
> @@ -159,7 +159,7 @@ matching `notmuch-address-completion-headers-regexp'.
> #'notmuch-address-expand-name)))
> (when setup-company
> (notmuch-company-setup))
> - (unless (memq pair message-completion-alist)
> + (unless (member pair message-completion-alist)
> (setq message-completion-alist
> (push pair message-completion-alist)))))
>
> --
> 2.14.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
dme.
--
And the sign said: long haired freaky people need not apply.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs/address: use member instead of memq to check for pair
2017-09-13 1:31 ` [PATCH] emacs/address: use member instead of memq to check for pair David Bremner
2017-09-13 7:55 ` David Edmondson
@ 2017-09-13 12:07 ` David Bremner
2017-09-13 12:48 ` Attic Hermit
1 sibling, 1 reply; 7+ messages in thread
From: David Bremner @ 2017-09-13 12:07 UTC (permalink / raw)
To: notmuch
David Bremner <david@tethera.net> writes:
> Quoting from the elisp reference:
>
> For other types (e.g., lists, vectors, strings), two arguments
> with the same contents or elements are not necessarily ‘eq’ to
> each other.
>
> Thanks to "Attic Hermit" for the fix.
pushed to master
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs/address: use member instead of memq to check for pair
2017-09-13 12:07 ` David Bremner
@ 2017-09-13 12:48 ` Attic Hermit
0 siblings, 0 replies; 7+ messages in thread
From: Attic Hermit @ 2017-09-13 12:48 UTC (permalink / raw)
To: David Bremner, notmuch
Nice. Thank you for your lightning fast fix and push.
David Bremner <david@tethera.net> writes:
> David Bremner <david@tethera.net> writes:
>
>> Quoting from the elisp reference:
>>
>> For other types (e.g., lists, vectors, strings), two arguments
>> with the same contents or elements are not necessarily ‘eq’ to
>> each other.
>>
>> Thanks to "Attic Hermit" for the fix.
>
> pushed to master
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
--
Attic Hermit
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-13 12:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 4:21 [BUG] Notmuch keeps adding notmuch-address-expand-name to message-completion-alist Attic Hermit
2017-09-11 10:14 ` David Bremner
2017-09-11 10:50 ` Attic Hermit
2017-09-13 1:31 ` [PATCH] emacs/address: use member instead of memq to check for pair David Bremner
2017-09-13 7:55 ` David Edmondson
2017-09-13 12:07 ` David Bremner
2017-09-13 12:48 ` Attic Hermit
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).