* Help on mail-abbrev-insert-alias and quotation marks
@ 2012-09-14 18:24 Harri Kiiskinen
2012-10-19 2:51 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Harri Kiiskinen @ 2012-09-14 18:24 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
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 – it is perfectly able to handle those non-ascii
characters. I.e., what comes out is:
To: "Jani Jämsä" <jjamsa@email.addr>, Lari Laine <llaine@email.addr>
when what should come out is
To: Jani Jämsä <jjamsa@email.addr>, Lari Laine <llainen@email.addr>
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?
Best,
Harri Kiiskinen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Help on mail-abbrev-insert-alias and quotation marks
2012-09-14 18:24 Help on mail-abbrev-insert-alias and quotation marks Harri Kiiskinen
@ 2012-10-19 2:51 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2012-10-19 2:51 UTC (permalink / raw)
To: help-gnu-emacs
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ä"<jjamsa@email.addr>, Lari Laine<llaine@email.addr>
>
> when what should come out is
>
> To: Jani Jämsä<jjamsa@email.addr>, Lari Laine<llainen@email.addr>
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-19 2:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-14 18:24 Help on mail-abbrev-insert-alias and quotation marks Harri Kiiskinen
2012-10-19 2:51 ` Kevin Rodgers
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).