all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Help on mail-abbrev-insert-alias and quotation marks
Date: Thu, 18 Oct 2012 20:51:39 -0600	[thread overview]
Message-ID: <k5qf78$d9p$1@ger.gmane.org> (raw)
In-Reply-To: <20120914.212401.116284496.harkiisk@gmail.com>

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




      reply	other threads:[~2012-10-19  2:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 18:24 Help on mail-abbrev-insert-alias and quotation marks Harri Kiiskinen
2012-10-19  2:51 ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='k5qf78$d9p$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.