Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

Subject:Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail

Date:Wed, 10 Feb 2016 10:28:24 +0200

To:David Edmondson ,Daniel Kahn Gillmor ,David Bremner ,Gaudenz Steinlin ,notmuch@notmuchmail.org ,810784@bugs.debian.org

Cc:

From:Tomi Ollila


On Tue, Feb 09 2016, David Edmondson <dme@dme.org> wrote:

> On Mon, Feb 08 2016, David Edmondson wrote:
>> On Mon, Feb 08 2016, David Edmondson wrote:
>>> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
>>>> So where is the case-insensitive lookup happening?  Is this a bug in
>>>> mml-mode, or in notmuch-emacs?
>>>
>>> It's caused by behaviour in mml2015.el (hence upstream).
>>>
>>> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
>>> the composition buffer with the addresses from the matching key.
>>>
>>> The simplest way to get the desired behaviour would be to `downcase'
>>> both strings before comparing.
>>
>> Reported as bug#22603 in emacs.
>
> Fixed in the emacs-25 branch.

We could perhaps add defadvice to **wiki** for those who want to 
do global change in their emacs environment, something like:

(if (< emacs-major-version 25)
  (defadvice mml2015-epg-check-user-id (around downcase activate)
    (ad-set-arg 1 (downcase (ad-get-arg 1)))
    (ad-set-arg 2 (downcase (ad-get-arg 2)))
    ad-do-it))

totally untested -- also now that I finished that 'before might also work.

Thread: