Gnus development mailing list
 help / color / mirror / Atom feed
* People with From: <mail@domain.com>
@ 2000-04-22  9:55 Pavel.Janik
  2000-04-22 11:09 ` Lars Magne Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Pavel.Janik @ 2000-04-22  9:55 UTC (permalink / raw)


Hi,

when people have 

 From: <mail@domain.com>

in their headers, Gnus reports it as empty sender in summary buffer even if
mail-use-rfc822's value is t. How can I avoid it? I'd like to have at least
mail@domain.com specified as sender. I'm trying to simulate this behaviour
with this email (I have set the From: header by hand to the evil value) :-)
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-22  9:55 People with From: <mail@domain.com> Pavel.Janik
@ 2000-04-22 11:09 ` Lars Magne Ingebrigtsen
  2000-04-23 20:07   ` Pavel.Janik
  2000-04-25  6:42 ` Jaap-Henk Hoepman
  2000-04-26 14:05 ` Erik Toubro Nielsen
  2 siblings, 1 reply; 26+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-04-22 11:09 UTC (permalink / raw)


Pavel.Janik@inet.cz writes:

> when people have 
> 
>  From: <mail@domain.com>
> 
> in their headers, Gnus reports it as empty sender in summary buffer even if
> mail-use-rfc822's value is t.

I don't think that variable is used by Gnus.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-22 11:09 ` Lars Magne Ingebrigtsen
@ 2000-04-23 20:07   ` Pavel.Janik
  2000-04-24 14:31     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 26+ messages in thread
From: Pavel.Janik @ 2000-04-23 20:07 UTC (permalink / raw)


   From: Lars Magne Ingebrigtsen <larsi@gnus.org>
   Date: 22 Apr 2000 13:09:15 +0200

Hi,

   > > when people have 
   > > 
   > >  From: <mail@domain.com>
   > > 
   > > in their headers, Gnus reports it as empty sender in summary buffer even if
   > > mail-use-rfc822's value is t.
   > 
   > I don't think that variable is used by Gnus.  

I know that now, but can I avoid buggy behaviour somehow then?

P.S. Or do you see my name in the summary buffer in this message?
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-23 20:07   ` Pavel.Janik
@ 2000-04-24 14:31     ` Lars Magne Ingebrigtsen
  2000-04-24 17:04       ` Pavel Janik ml.
  0 siblings, 1 reply; 26+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-04-24 14:31 UTC (permalink / raw)


Pavel.Janik@inet.cz writes:

> I know that now, but can I avoid buggy behaviour somehow then?

See the manual on `gnus-extract-address-components'.

> P.S. Or do you see my name in the summary buffer in this message?

Yes, but you didn't use the syntax that shows this flaw.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-24 14:31     ` Lars Magne Ingebrigtsen
@ 2000-04-24 17:04       ` Pavel Janik ml.
  2000-04-24 18:39         ` Kai Großjohann
  0 siblings, 1 reply; 26+ messages in thread
From: Pavel Janik ml. @ 2000-04-24 17:04 UTC (permalink / raw)


   From: Lars Magne Ingebrigtsen <larsi@gnus.org>
   Date: 24 Apr 2000 16:31:45 +0200

Hi,

   > > I know that now, but can I avoid buggy behaviour somehow then?
   > 
   > See the manual on `gnus-extract-address-components'.

yes (customized to mail-extract-...), but mails from Kai are shown as

       [  19: Kai Gro             ] 

in the summary buffer. Sorry Kai :-)) But this is not bug in Gnus, the file
mail-extr which contains this function is from GNU Emacs. Will anyone fix it?
Kai? :-))
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-24 17:04       ` Pavel Janik ml.
@ 2000-04-24 18:39         ` Kai Großjohann
  2000-04-24 18:56           ` Pavel Janík ml.
  2000-04-25 10:45           ` Florian Weimer
  0 siblings, 2 replies; 26+ messages in thread
From: Kai Großjohann @ 2000-04-24 18:39 UTC (permalink / raw)
  Cc: ding

Pavel.Janik@inet.cz (Pavel Janik ml.) writes:

> yes (customized to mail-extract-...), but mails from Kai are shown as
> 
>        [  19: Kai Gro             ] 
> 
> in the summary buffer.

Hm.  This seems to be a different problem, though.

If the From header looks like ``From: <jrl@frob.org>'', Gnus is
wont to show the empty string as the author name in the Summary
buffer.  I'm not sure what to do about that, but maybe setting the
variable gnus-extract-address-components is the right way to go.

But this is not the case in what you describe above.  There, the From
header is ``From: jrl@frob.org (Joe Random Loser)''.  Hm.  I used to
see my full name in the Summary buffer, but now I have told Gnus to
display `-> recipient' in the Summary buffer, instead.

Strange.  Is anybody else seeing a truncated From address for my
messages?

Maybe it only happens for Latin-X users with X not equal to 1?  (My
name has a Latin-1 character in it.)  Pavel, could you try sending a
message with the appropriate Latin-2 characters in your name?

From: Pavel.Janik@inet.cz (Pavel Jan\'ik ml.)

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-24 18:39         ` Kai Großjohann
@ 2000-04-24 18:56           ` Pavel Janík ml.
  2000-04-25 11:04             ` Kai Großjohann
  2000-04-25 10:45           ` Florian Weimer
  1 sibling, 1 reply; 26+ messages in thread
From: Pavel Janík ml. @ 2000-04-24 18:56 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

   From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
   Date: Mon, 24 Apr 2000 20:39:15 +0200

Hi,

   > Hm.  This seems to be a different problem, though.

yes, when you set gnus-extract-address-components to
mail-extract-address-components from mail-extr.el it will correctly display
the sender with

From: <someone@somewhere.com>

but it can fail on some correct From headers like yours. There is probably
some bug in regexp there...

   > If the From header looks like ``From: <jrl@frob.org>'', Gnus is
   > wont to show the empty string as the author name in the Summary
   > buffer.  I'm not sure what to do about that, but maybe setting the
   > variable gnus-extract-address-components is the right way to go.

Yes, it solves my problem. I can customize it to be mail-...

   > see my full name in the Summary buffer, but now I have told Gnus to
   > display `-> recipient' in the Summary buffer, instead.

If I leave gnus-extract-address-components untouched I see your name complete,
but mail-extract-... is buggy for it.

   > Strange.  Is anybody else seeing a truncated From address for my
   > messages?

Maybe some with gnus-extract-... variable customized to mail-... :-)) But it
is NOT your fault. It is Emacs's mail-extr fault.

   > Maybe it only happens for Latin-X users with X not equal to 1?  (My
   > name has a Latin-1 character in it.)  Pavel, could you try sending a
   > message with the appropriate Latin-2 characters in your name?

OK. This message should contain it :-) If I send a test message to myself
which contains


[-- Attachment #2: Type: text/plain, Size: 205 bytes --]

From: "Pavel Janík ml." <Pavel.Janik@inet.cz>

and customize the gnus-extract-... to mail-... it will display only Pavel
Janík even if there is "Pavel Janík ml."...
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-22  9:55 People with From: <mail@domain.com> Pavel.Janik
  2000-04-22 11:09 ` Lars Magne Ingebrigtsen
@ 2000-04-25  6:42 ` Jaap-Henk Hoepman
  2000-04-26 14:05 ` Erik Toubro Nielsen
  2 siblings, 0 replies; 26+ messages in thread
From: Jaap-Henk Hoepman @ 2000-04-25  6:42 UTC (permalink / raw)
  Cc: ding


I received it like this

Received: (from pavel@localhost)
        by SnowWhite.inet.cz (8.8.7/8.8.7) id MAA01985;
        Sat, 22 Apr 2000 12:25:25 +0200
From: Pavel.Janik@inet.cz
X-Authentication-Warning: SnowWhite.inet.cz: pavel set sender to Pavel.Janik@ine
t.cz using -f
To: GNUS mailing list <ding@gnus.org>
Subject: People with From: <mail@domain.com>

so without the <>.

Jaap-Henk

On 22 Apr 2000 11:55:59 +0200 Pavel.Janik@inet.cz writes:
> Hi,
> 
> when people have 
> 
>  From: <mail@domain.com>
> 
> in their headers, Gnus reports it as empty sender in summary buffer even if
> mail-use-rfc822's value is t. How can I avoid it? I'd like to have at least
> mail@domain.com specified as sender. I'm trying to simulate this behaviour
> with this email (I have set the From: header by hand to the evil value) :-)
> -- 
> Pavel Janík ml.
> Pavel.Janik@inet.cz
> 

-- 
Jaap-Henk Hoepman             | Come sail your ships around me
Dept. of Computer Science     | And burn these bridges down
University of Twente          |       Nick Cave - "Ship Song"
Email: hoepman@cs.utwente.nl === WWW: www.cs.utwente.nl/~hoepman
Phone: +31 53 4893795 === Secr: +31 53 4893770 === Fax: +31 53 4894590
PGP ID: 0xF52E26DD  Fingerprint: 1AED DDEB C7F1 DBB3  0556 4732 4217 ABEF



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-24 18:39         ` Kai Großjohann
  2000-04-24 18:56           ` Pavel Janík ml.
@ 2000-04-25 10:45           ` Florian Weimer
  2000-04-25 11:11             ` Kai Großjohann
  1 sibling, 1 reply; 26+ messages in thread
From: Florian Weimer @ 2000-04-25 10:45 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> If the From header looks like ``From: <jrl@frob.org>'', Gnus is
> wont to show the empty string as the author name in the Summary
> buffer.  I'm not sure what to do about that, but maybe setting the
> variable gnus-extract-address-components is the right way to go.

In my eyes, this is perfectly acceptable behavior.  
"From: <jrl@frob.org>" is illegal according to RFC 822. ;)



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-24 18:56           ` Pavel Janík ml.
@ 2000-04-25 11:04             ` Kai Großjohann
  2000-04-25 11:38               ` Lars Magne Ingebrigtsen
  2000-04-25 13:36               ` Pavel Janík ml.
  0 siblings, 2 replies; 26+ messages in thread
From: Kai Großjohann @ 2000-04-25 11:04 UTC (permalink / raw)
  Cc: ding

Pavel.Janik@inet.cz (Pavel Janík ml.) writes:

> yes, when you set gnus-extract-address-components to
> mail-extract-address-components from mail-extr.el it will correctly display
> the sender with
> 
> From: <someone@somewhere.com>
> 
> but it can fail on some correct From headers like yours. There is probably
> some bug in regexp there...

Hm.  When I eval the following code, I get the right thing:

(mail-extract-address-components "Kai.Grossjohann@cs.uni-dortmund.de (Kai Großjohann)")

I get the same thing with gnus-extract-address-components.

Hm.  I just tried the same thing with `emacs-20.6 -q -no-site-file',
then M-x set-language-environment RET Latin-2 RET, then evaling this
in the scratch buffer.  Same thing.

Hm.

I'm confused.

FWIW, I see your name correctly, including the `ml.'.  (What does that
mean, btw?)

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 10:45           ` Florian Weimer
@ 2000-04-25 11:11             ` Kai Großjohann
  0 siblings, 0 replies; 26+ messages in thread
From: Kai Großjohann @ 2000-04-25 11:11 UTC (permalink / raw)
  Cc: ding

Florian Weimer <fw@deneb.cygnus.argh.org> writes:

> In my eyes, this is perfectly acceptable behavior.  
> "From: <jrl@frob.org>" is illegal according to RFC 822. ;)

I know.  But these addresses do exist, and this is surely a borderline
case.  I mean, it is illegal only for obscure technical reasons having
to do with the wording in the RFC...

IMHO, IWBNI Gnus would show useful addresses even for such From
headers.  Be they legal or not.

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 11:38               ` Lars Magne Ingebrigtsen
@ 2000-04-25 11:35                 ` Kai Großjohann
  2000-04-25 20:03                   ` Florian Weimer
  0 siblings, 1 reply; 26+ messages in thread
From: Kai Großjohann @ 2000-04-25 11:35 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> 
> > (mail-extract-address-components "Kai.Grossjohann@cs.uni-dortmund.de (Kai Grojohann)")
> 
> Eek.  That Ã\237 up there doesn't look good...

Oops.  I've got MULE-UCS installed, and it appears that Gnus just
posted as UTF-8 behind my back...  Cool.

I thought that Gnus could read UTF-8 but wouldn't post it?  Hm.
Anyway, doesn't matter; using UTF-8 is the right thing to do anyway.

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 11:04             ` Kai Großjohann
@ 2000-04-25 11:38               ` Lars Magne Ingebrigtsen
  2000-04-25 11:35                 ` Kai Großjohann
  2000-04-25 13:36               ` Pavel Janík ml.
  1 sibling, 1 reply; 26+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-04-25 11:38 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> (mail-extract-address-components "Kai.Grossjohann@cs.uni-dortmund.de (Kai Grojohann)")

Eek.  That Ã\237 up there doesn't look good...

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 11:04             ` Kai Großjohann
  2000-04-25 11:38               ` Lars Magne Ingebrigtsen
@ 2000-04-25 13:36               ` Pavel Janík ml.
  2000-04-25 14:47                 ` Kai Großjohann
  1 sibling, 1 reply; 26+ messages in thread
From: Pavel Janík ml. @ 2000-04-25 13:36 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

   From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
   Date: Tue, 25 Apr 2000 13:04:14 +0200

Hi,

   > Hm.  When I eval the following code, I get the right thing:
   > 
   > (mail-extract-address-components "Kai.Grossjohann@cs.uni-dortmund.de (Kai Großjohann)")
   > 
   > I get the same thing with gnus-extract-address-components.

And if you have

(set-language-environment "czech")

in the .emacs as I have? But in your headers there is:

From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai=?iso-8859-1?q?_Gro=DFjohann?=)

So mail-extr should correctly parse it (because there is a specification of
the charset) and return your address and your name correctly even if I have
different language environment. But it does not for me, cause I have czech
language environment chosen. But how is my language environment connected to
the mail-extract-... function? I do not know. But I think there is an error
somewhere...

If mail-extr is only getting


[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)

ie. without ?iso-8859-1?q? things in it, then the caller is buggy because it
should inform mail-extr of the charset used or if it does, the function does
not use this information and use language-environment.

   > FWIW, I see your name correctly, including the `ml.'.  (What does that
   > mean, btw?)

:-) ml. is like jr. in english. Hmm, I should probably read how to use
personality in Gnus.
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 13:36               ` Pavel Janík ml.
@ 2000-04-25 14:47                 ` Kai Großjohann
  2000-04-25 15:31                   ` Pavel Janík ml.
  0 siblings, 1 reply; 26+ messages in thread
From: Kai Großjohann @ 2000-04-25 14:47 UTC (permalink / raw)
  Cc: ding

Pavel.Janik@inet.cz (Pavel Janík ml.) writes:

> But in your headers there is:
> 
> From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai=?iso-8859-1?q?_Gro=DFjohann?=)

Ah.  There is the problem.  mail-extract-address-components does not
grok the =?iso-8859-1?q?...?= part.  Why didn't I think of this
immediately?

Hm.  Maybe the mail-extr.el authors should be contacted to find out
what their idea of the interface is -- whether it should be passed the
encoding or the decoded string.  Hm.  Where does one address such
questions?  (The file has `Maintainer: FSF' in it.)  To gnu.emacs.help
or to the bug reporting address?

Wait a second.  You say that you are seeing `Kai Gro' as my name,
right?  When I pass the From address you gave to
mail-extract-address-components, it returns `nil' as the full name
part, regardless of the language environment, which is different from
what you are seeing.

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 14:47                 ` Kai Großjohann
@ 2000-04-25 15:31                   ` Pavel Janík ml.
  2000-04-25 17:10                     ` Kai Großjohann
  0 siblings, 1 reply; 26+ messages in thread
From: Pavel Janík ml. @ 2000-04-25 15:31 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

   From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
   Date: Tue, 25 Apr 2000 16:47:27 +0200

Hi,

   > Ah.  There is the problem.  mail-extract-address-components does not
   > grok the =?iso-8859-1?q?...?= part.  Why didn't I think of this
   > immediately?

I did not tell that there is a problem with mail-extr.el. I think there is a
problem somewhere in Gnus, Gnus's passing of From: header or mail-extr.el.

   > Wait a second.  You say that you are seeing `Kai Gro' as my name,
   > right?

Yes, when I have gnus-extract-... set to mail-extract-... and czech language
environment I see Kai Gro as your name in Summary buffer.

   > When I pass the From address you gave to mail-extract-address-components,
   > it returns `nil' as the full name part, regardless of the language
   > environment, which is different from what you are seeing.

So mail-extr.el is not getting the From: header but something that Gnus parse
before and do not pass the correct From: header to mail-extract-... from
mail-extr.el. Am I right?
-- 

[-- Attachment #2: Type: text/plain, Size: 36 bytes --]

Pavel Janík ml.
Pavel.Janik@inet.cz

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 15:31                   ` Pavel Janík ml.
@ 2000-04-25 17:10                     ` Kai Großjohann
  0 siblings, 0 replies; 26+ messages in thread
From: Kai Großjohann @ 2000-04-25 17:10 UTC (permalink / raw)
  Cc: ding

Pavel.Janik@inet.cz (Pavel Janík ml.) writes:

> I did not tell that there is a problem with mail-extr.el. I think there is a
> problem somewhere in Gnus, Gnus's passing of From: header or mail-extr.el.

Hm.  You're right.  Hm.

I have posted a question in gnu.emacs.gnus, and Lars says that
mail-extract-address-components doesn't try to be very RFC-compatible,
but that there is a function mail-header-parse-address which gives
better results.

I think you can't just use that function instead of
mail-extract-address-components, though, since the return values are
not compatible.

You may wish to follow the discussion in gnu.emacs.gnus...

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 11:35                 ` Kai Großjohann
@ 2000-04-25 20:03                   ` Florian Weimer
  2000-04-25 20:15                     ` Kai Großjohann
  0 siblings, 1 reply; 26+ messages in thread
From: Florian Weimer @ 2000-04-25 20:03 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Oops.  I've got MULE-UCS installed, and it appears that Gnus just
> posted as UTF-8 behind my back...  Cool.

And it certainly was the right thing to do: Your message contained
characters from both ISO-8859-1 and ISO-8859-2.  In such cases, Gnus
uses UTF-8 if it's available.  (If UTF-8 can't be used, Gnus falls
back to the old way: one MIME part for each charset.)

Perhaps I should add something to the manual which explains that?
Which section would be appropriate?

> I thought that Gnus could read UTF-8 but wouldn't post it?  Hm.
> Anyway, doesn't matter; using UTF-8 is the right thing to do anyway.

A few days ago, I've made a trivial change to support sending in UTF-8
if MULE-UCS is installed.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 20:03                   ` Florian Weimer
@ 2000-04-25 20:15                     ` Kai Großjohann
  2000-04-26 17:14                       ` Florian Weimer
  0 siblings, 1 reply; 26+ messages in thread
From: Kai Großjohann @ 2000-04-25 20:15 UTC (permalink / raw)
  Cc: ding

Florian Weimer <fw@deneb.cygnus.argh.org> writes:

> Perhaps I should add something to the manual which explains that?
> Which section would be appropriate?

Yes, an explanation in the manual would be good.  I've done some
cursory browsing of message.info and emacs-mime.info, and I couldn't
find anything about the auto-choose mechanism.  Hm.  I think there
should be a section somewhere which says that Gnus (or message, or
mml) looks at the message to automatically find a way to encode it
before sending.  Sometimes, the message is split into several parts,
and the right charset is chosen, stuff like that.

Or did I miss it somehow?

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-22  9:55 People with From: <mail@domain.com> Pavel.Janik
  2000-04-22 11:09 ` Lars Magne Ingebrigtsen
  2000-04-25  6:42 ` Jaap-Henk Hoepman
@ 2000-04-26 14:05 ` Erik Toubro Nielsen
  2000-04-26 20:59   ` Pavel Janík ml.
  2000-04-28  2:00   ` Shenghuo ZHU
  2 siblings, 2 replies; 26+ messages in thread
From: Erik Toubro Nielsen @ 2000-04-26 14:05 UTC (permalink / raw)


Pavel.Janik@inet.cz writes:

> Hi,
> 
> when people have 
> 
>  From: <mail@domain.com>
> 
> in their headers, Gnus reports it as empty sender in summary buffer even if
> mail-use-rfc822's value is t. How can I avoid it? I'd like to have at least
> mail@domain.com specified as sender. I'm trying to simulate this behaviour
> with this email (I have set the From: header by hand to the evil value) :-)
> -- 
> Pavel Janík ml.
> Pavel.Janik@inet.cz
> 
> 

Please try this patch I have used for some time. It works by returning
the same list as mail-extract-address-components, the other suggested
value of the variable gnus-extract-address-components. The problem is
that name is never false in the (or name from) test, so name is always
returned even when being an empty string. 

--- gnus-util.el.~1~	Thu Feb 17 16:14:45 2000
+++ gnus-util.el	Wed Apr 26 15:49:33 2000
@@ -164,8 +164,8 @@
 	(and (string-match "(.*" from)
 	     (setq name (substring from (1+ (match-beginning 0))
 				   (match-end 0)))))
-    ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
-    (list (or name from) (or address from))))
+    (list (if (string= name "") nil name) (or address from))))
+
 
 (defun gnus-fetch-field (field)
   "Return the value of the header FIELD of current article."

-- 
Erik Toubro Nielsen, <erik@ifad.dk>



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-25 20:15                     ` Kai Großjohann
@ 2000-04-26 17:14                       ` Florian Weimer
  2000-04-26 17:29                         ` Shenghuo ZHU
  0 siblings, 1 reply; 26+ messages in thread
From: Florian Weimer @ 2000-04-26 17:14 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Florian Weimer <fw@deneb.cygnus.argh.org> writes:
> 
> > Perhaps I should add something to the manual which explains that?
> > Which section would be appropriate?
> 
> Yes, an explanation in the manual would be good.  I've done some
> cursory browsing of message.info and emacs-mime.info, and I couldn't
> find anything about the auto-choose mechanism.  Hm.  I think there
> should be a section somewhere which says that Gnus (or message, or
> mml) looks at the message to automatically find a way to encode it
> before sending.  Sometimes, the message is split into several parts,
> and the right charset is chosen, stuff like that.

I'm going add it to emacs-mime.texi, somewhere around the description
of MML.  After all, charset translation from MULE to MIME takes place
during MML-to-MIME translation.

BTW: I've browsed some source code and discovered a code/comment
discrepancy in "mm-encode-body", non-MULE case:

  (if (not (featurep 'mule))
      ;; In the non-Mule case, we search for non-ASCII chars and
      ;; return the value of `mm-default-charset' if any are found.
      (save-excursion
	(goto-char (point-min))
	(if (re-search-forward "[^\x0-\x7f]" nil t)
	    (or mail-parse-charset
		(mm-read-charset "Charset used in the article: "))
	  ;; The logic in `mml-generate-mime-1' confirms that it's OK
	  ;; to return nil here.
	  nil))

The comment says "mm-default-charset", but actually it's
"mail-parse-charset".  The value that's actually used by Gnus is
"message-default-charset", as it seems (in fact, this is a FAQ ;).
I'll change the comment accordingly.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-26 17:14                       ` Florian Weimer
@ 2000-04-26 17:29                         ` Shenghuo ZHU
  2000-04-26 18:06                           ` Florian Weimer
  0 siblings, 1 reply; 26+ messages in thread
From: Shenghuo ZHU @ 2000-04-26 17:29 UTC (permalink / raw)


>>>>> "Florian" == Florian Weimer <fw@deneb.cygnus.argh.org> writes:

Florian> BTW: I've browsed some source code and discovered a code/comment
Florian> discrepancy in "mm-encode-body", non-MULE case:

Florian>   (if (not (featurep 'mule))
Florian>       ;; In the non-Mule case, we search for non-ASCII chars and
Florian>       ;; return the value of `mm-default-charset' if any are found.
Florian>       (save-excursion
Florian> 	(goto-char (point-min))
Florian> 	(if (re-search-forward "[^\x0-\x7f]" nil t)
Florian> 	    (or mail-parse-charset
Florian> 		(mm-read-charset "Charset used in the article: "))
Florian> 	  ;; The logic in `mml-generate-mime-1' confirms that it's OK
Florian> 	  ;; to return nil here.
Florian> 	  nil))

Florian> The comment says "mm-default-charset", but actually it's
Florian> "mail-parse-charset".  The value that's actually used by Gnus
Florian> is "message-default-charset", as it seems (in fact, this is a
Florian> FAQ ;).  I'll change the comment accordingly.

No, you should not. mail-parse-charset is dynamically bound. It is
only used in lower level functions. User should not use it at all.

-- 
Shenghuo



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-26 17:29                         ` Shenghuo ZHU
@ 2000-04-26 18:06                           ` Florian Weimer
  2000-04-26 18:15                             ` Shenghuo ZHU
  0 siblings, 1 reply; 26+ messages in thread
From: Florian Weimer @ 2000-04-26 18:06 UTC (permalink / raw)


Shenghuo ZHU <zsh@cs.rochester.edu> writes:

> Florian> The comment says "mm-default-charset", but actually it's
> Florian> "mail-parse-charset".  The value that's actually used by Gnus
> Florian> is "message-default-charset", as it seems (in fact, this is a
> Florian> FAQ ;).  I'll change the comment accordingly.
> 
> No, you should not. mail-parse-charset is dynamically bound. It is
> only used in lower level functions. User should not use it at all.

Eh, sorry, could you have a look at situation again?  IMHO, the
comment should really change.  Of course, I'm NOT going to tell people
to put "(setq mail-parse-charset 'foo)" into their ~/.emacs file.



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-26 18:06                           ` Florian Weimer
@ 2000-04-26 18:15                             ` Shenghuo ZHU
  0 siblings, 0 replies; 26+ messages in thread
From: Shenghuo ZHU @ 2000-04-26 18:15 UTC (permalink / raw)


>>>>> "Florian" == Florian Weimer <fw@deneb.cygnus.argh.org> writes:

Florian> Shenghuo ZHU <zsh@cs.rochester.edu> writes:
Florian> The comment says "mm-default-charset", but actually it's
Florian> "mail-parse-charset".  The value that's actually used by Gnus
Florian> is "message-default-charset", as it seems (in fact, this is a
Florian> FAQ ;).  I'll change the comment accordingly.
>> 
>> No, you should not. mail-parse-charset is dynamically bound. It is
>> only used in lower level functions. User should not use it at all.

Florian> Eh, sorry, could you have a look at situation again?  IMHO,
Florian> the comment should really change.  Of course, I'm NOT going
Florian> to tell people to put "(setq mail-parse-charset 'foo)" into
Florian> their ~/.emacs file.

I am sorry.  I misunderstood.  You are right.  Actually,
mm-default-charset no longer exists.

-- 
Shenghuo



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-26 14:05 ` Erik Toubro Nielsen
@ 2000-04-26 20:59   ` Pavel Janík ml.
  2000-04-28  2:00   ` Shenghuo ZHU
  1 sibling, 0 replies; 26+ messages in thread
From: Pavel Janík ml. @ 2000-04-26 20:59 UTC (permalink / raw)
  Cc: GNUS mailing list

   From: Erik Toubro Nielsen <erik@ifad.dk>
   Date: 26 Apr 2000 16:05:54 +0200

Hi,


[...]

   > Please try this patch I have used for some time. It works by returning
   > the same list as mail-extract-address-components, the other suggested
   > value of the variable gnus-extract-address-components. The problem is
   > that name is never false in the (or name from) test, so name is always
   > returned even when being an empty string. 
   > 
   > --- gnus-util.el.~1~	Thu Feb 17 16:14:45 2000
   > +++ gnus-util.el	Wed Apr 26 15:49:33 2000
   > @@ -164,8 +164,8 @@
   >  	(and (string-match "(.*" from)
   >  	     (setq name (substring from (1+ (match-beginning 0))
   >  				   (match-end 0)))))
   > -    ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
   > -    (list (or name from) (or address from))))
   > +    (list (if (string= name "") nil name) (or address from))))
   > +
   >  
   >  (defun gnus-fetch-field (field)
   >    "Return the value of the header FIELD of current article."
   > 

yes, that works too. Can this be added to CVS?
-- 
Pavel Janík ml.
Pavel.Janik@inet.cz



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: People with From: <mail@domain.com>
  2000-04-26 14:05 ` Erik Toubro Nielsen
  2000-04-26 20:59   ` Pavel Janík ml.
@ 2000-04-28  2:00   ` Shenghuo ZHU
  1 sibling, 0 replies; 26+ messages in thread
From: Shenghuo ZHU @ 2000-04-28  2:00 UTC (permalink / raw)


>>>>> "Erik" == Erik Toubro Nielsen <erik@ifad.dk> writes:

Erik> Please try this patch I have used for some time. It works by returning
Erik> the same list as mail-extract-address-components, the other suggested
Erik> value of the variable gnus-extract-address-components. The problem is
Erik> that name is never false in the (or name from) test, so name is always
Erik> returned even when being an empty string. 

Erik> --- gnus-util.el.~1~	Thu Feb 17 16:14:45 2000
Erik> +++ gnus-util.el	Wed Apr 26 15:49:33 2000
Erik> @@ -164,8 +164,8 @@
Erik>  	(and (string-match "(.*" from)
Erik>  	     (setq name (substring from (1+ (match-beginning 0))
Erik>  				   (match-end 0)))))
Erik> -    ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
Erik> -    (list (or name from) (or address from))))
Erik> +    (list (if (string= name "") nil name) (or address from))))
Erik> +
 
Applied.

-- 
Shenghuo



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2000-04-28  2:00 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-22  9:55 People with From: <mail@domain.com> Pavel.Janik
2000-04-22 11:09 ` Lars Magne Ingebrigtsen
2000-04-23 20:07   ` Pavel.Janik
2000-04-24 14:31     ` Lars Magne Ingebrigtsen
2000-04-24 17:04       ` Pavel Janik ml.
2000-04-24 18:39         ` Kai Großjohann
2000-04-24 18:56           ` Pavel Janík ml.
2000-04-25 11:04             ` Kai Großjohann
2000-04-25 11:38               ` Lars Magne Ingebrigtsen
2000-04-25 11:35                 ` Kai Großjohann
2000-04-25 20:03                   ` Florian Weimer
2000-04-25 20:15                     ` Kai Großjohann
2000-04-26 17:14                       ` Florian Weimer
2000-04-26 17:29                         ` Shenghuo ZHU
2000-04-26 18:06                           ` Florian Weimer
2000-04-26 18:15                             ` Shenghuo ZHU
2000-04-25 13:36               ` Pavel Janík ml.
2000-04-25 14:47                 ` Kai Großjohann
2000-04-25 15:31                   ` Pavel Janík ml.
2000-04-25 17:10                     ` Kai Großjohann
2000-04-25 10:45           ` Florian Weimer
2000-04-25 11:11             ` Kai Großjohann
2000-04-25  6:42 ` Jaap-Henk Hoepman
2000-04-26 14:05 ` Erik Toubro Nielsen
2000-04-26 20:59   ` Pavel Janík ml.
2000-04-28  2:00   ` Shenghuo ZHU

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 NNTP newsgroup(s).