* superfluous(?) quotes in mail alias expansion
@ 2023-03-21 13:58 Gregor Zattler
2023-03-21 14:24 ` Emanuel Berg
0 siblings, 1 reply; 4+ messages in thread
From: Gregor Zattler @ 2023-03-21 13:58 UTC (permalink / raw)
To: help-gnu-emacs
Dear Emacs users and developers,
the fine manual has this to say regarding mail aliases:
If an address contains a space, quote the whole
address with a pair of double quotes, like this:
alias jsmith "John Q. Smith <none@example.com>"
Note that you need not include double quotes around
individual parts of the address, such as the
person’s full name. Emacs puts them in if they are
needed. For instance, it inserts the above address
as ‘"John Q. Smith" <none@example.com>’.
This describes correctly how this mechanism works,
regarding it's outcome, but not why.
I understand it's necessary to somehow mark in the
alias definition where an address starts and ends,
since there can be several.
But I don't know why it's "needed" to put quotes around
the
John Q. Smith
part of the address. Actually they seem to be
superfluous and aesthetically not pleasing. To me it
seems as quotes would be only needed if the string
contained `@' or `,'!?
Are the quotes really necessary (for what) and if not:
Is it possible to get rid of the Quotes?
Thanks, Gregor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: superfluous(?) quotes in mail alias expansion
2023-03-21 13:58 superfluous(?) quotes in mail alias expansion Gregor Zattler
@ 2023-03-21 14:24 ` Emanuel Berg
2023-03-22 21:13 ` Gregor Zattler
2023-03-24 10:47 ` Byung-Hee HWANG
0 siblings, 2 replies; 4+ messages in thread
From: Emanuel Berg @ 2023-03-21 14:24 UTC (permalink / raw)
To: help-gnu-emacs
Gregor Zattler wrote:
> the fine manual has this to say regarding mail aliases:
>
> If an address contains a space, quote the whole
> address with a pair of double quotes, like this:
>
> alias jsmith "John Q. Smith <none@example.com>"
>
> Note that you need not include double quotes around
> individual parts of the address, such as the
> person’s full name. Emacs puts them in if they are
> needed. For instance, it inserts the above address
> as ‘"John Q. Smith" <none@example.com>’.
>
> This describes correctly how this mechanism works,
> regarding it's outcome, but not why.
In the data file, it's just so it can be parsed. When it gets
inserted, quotes are added if they are needed.
Try putting it like this in ~/.mailrc:
alias jsmith-1 "John Q. Smith <none@example.com>"
alias jsmith-2 "John Q Smith <none@example.com>"
alias jsmith jsmith-1 jsmith-2
then expand both with "jsmith", it will look like this:
To: "John Q. Smith" <none@example.com>,
John Q Smith <none@example.com>
Quotes inserted (because of the dot) in the first case, not in
the second as not needed.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: superfluous(?) quotes in mail alias expansion
2023-03-21 14:24 ` Emanuel Berg
@ 2023-03-22 21:13 ` Gregor Zattler
2023-03-24 10:47 ` Byung-Hee HWANG
1 sibling, 0 replies; 4+ messages in thread
From: Gregor Zattler @ 2023-03-22 21:13 UTC (permalink / raw)
To: help-gnu-emacs
Hi Emanuel,
* Emanuel Berg <incal@dataswamp.org> [2023-03-21; 15:24 +01]:
> Gregor Zattler wrote:
>
>> the fine manual has this to say regarding mail aliases:
>>
>> If an address contains a space, quote the whole
>> address with a pair of double quotes, like this:
>>
>> alias jsmith "John Q. Smith <none@example.com>"
>>
>> Note that you need not include double quotes around
>> individual parts of the address, such as the
>> person’s full name. Emacs puts them in if they are
>> needed. For instance, it inserts the above address
>> as ‘"John Q. Smith" <none@example.com>’.
>>
>> This describes correctly how this mechanism works,
>> regarding it's outcome, but not why.
>
> In the data file, it's just so it can be parsed. When it gets
> inserted, quotes are added if they are needed.
>
> Try putting it like this in ~/.mailrc:
>
> alias jsmith-1 "John Q. Smith <none@example.com>"
> alias jsmith-2 "John Q Smith <none@example.com>"
> alias jsmith jsmith-1 jsmith-2
>
> then expand both with "jsmith", it will look like this:
>
> To: "John Q. Smith" <none@example.com>,
> John Q Smith <none@example.com>
>
> Quotes inserted (because of the dot) in the first case, not in
> the second as not needed.
I see, thanks. But why does the dot need quoting? I
tried to understand RFC 5322 section 3.4, and 4.1 which
if I understand correctly allowed for a dot at this
part of the To: Header, but only so since ~10 years.
OK, I'm convinced that it then is more conservative to
send with the quotes.
Anyway I did a test: An email from one system to
another with
John Q. Smith
unquoted in the To: header arrived. The display-name
part was not quoted in the copy which came through all
the smtp hops. But notmuch as mutt show this message
with quotes around the display-name.
Goodbye, Gregor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: superfluous(?) quotes in mail alias expansion
2023-03-21 14:24 ` Emanuel Berg
2023-03-22 21:13 ` Gregor Zattler
@ 2023-03-24 10:47 ` Byung-Hee HWANG
1 sibling, 0 replies; 4+ messages in thread
From: Byung-Hee HWANG @ 2023-03-24 10:47 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg <incal@dataswamp.org> writes:
> (...)
> Try putting it like this in ~/.mailrc:
>
> alias jsmith-1 "John Q. Smith <none@example.com>"
> alias jsmith-2 "John Q Smith <none@example.com>"
> alias jsmith jsmith-1 jsmith-2
>
> then expand both with "jsmith", it will look like this:
>
> To: "John Q. Smith" <none@example.com>,
> John Q Smith <none@example.com>
>
> (...)
Oh good tutorial! I also like ~/.mailrc ;;;
Sincerely,
--
^고맙습니다 _地平天成_ 감사합니다_^))//
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-24 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21 13:58 superfluous(?) quotes in mail alias expansion Gregor Zattler
2023-03-21 14:24 ` Emanuel Berg
2023-03-22 21:13 ` Gregor Zattler
2023-03-24 10:47 ` Byung-Hee HWANG
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).