help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help on mail-abbrev-insert-alias and quotation marks


From: Kevin Rodgers
Subject: Re: Help on mail-abbrev-insert-alias and quotation marks
Date: Thu, 18 Oct 2012 20:51:39 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 9/14/12 12:24 PM, Harri Kiiskinen wrote:
I'm using Mew mail on Emacs, with BBDB to manage addresses. The Mew
support for BBDB is not complete, for example there is no way the
mail-alias can be used in address completion.

To circumvent this limitation, it is possible to call directly
'mail-abbrev-insert-alias' on the "To: " header line and have the
mailabbrev fill the addresses that it automagically gets from BBDB
(i.e. I have no idea how it gets them).

The only problem is that if the name of an adressee contains non-ascii
characters, the name is wrapped in quotation marks, which then means
that the message can not be sent, as Mew complains about these
quotation marks

Then that is a bug in Mew.

– it is perfectly able to handle those non-ascii
characters. I.e., what comes out is:

To: "Jani Jämsä"<address@hidden>, Lari Laine<address@hidden>

when what should come out is

To: Jani Jämsä<address@hidden>, Lari Laine<address@hidden>

Now, my question is, is there any way the 'mail-abbrev-insert-alias'
can be made to return the list of addresses matching the alias without
any of the names wrapped in quotation marks?

It is not customizable, you need to remove this part of define-mail-abbrev
in mailabbrev.el:

        ;; If the full name contains a problem character, quote it.
        (and (string-match "\\(.+?\\)[ \t]*\\(<.*>\\)" this-entry)
             (string-match "[^- !#$%&'*+/0-9=?A-Za-z^_`{|}~]"
                           (match-string 1 this-entry))
             (setq this-entry (replace-regexp-in-string
                               "\\(.+?\\)[ \t]*\\(<.*>\\)" "\"\\1\" \\2"
                               this-entry)))

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]