Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: ding@gnus.org
Subject: Re: BUG: ngnus-0.10 can't send messages
Date: Tue, 24 Jun 2008 19:29:52 +0200	[thread overview]
Message-ID: <v9iqvyyc4v.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87r6anned5.fsf@mat.ucm.es> (Uwe Brauer's message of "Tue, 24 Jun 2008 15:37:10 +0200")

On Tue, Jun 24 2008, Uwe Brauer wrote:

> Still I don't understand why it works in 0.6.

Because there was no call to `mail-extract-address-components' with a
non-nil argument ALL in No Gnus 0.6 in your setup.  Your defadvices
don't handle the ALL argument of `mail-extract-address-components'
correctly:

,----[ <f1> f mail-extract-address-components RET | XEmacs ]
| `mail-extract-address-components' is a compiled Lisp function
|   -- loaded from "mail-extr"
| (mail-extract-address-components ADDRESS &optional ALL)
| 
| Documentation:
| Given an RFC-822 address ADDRESS, extract full name and canonical address.
| Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
| If no name can be extracted, FULL-NAME will be nil.  Also see
| `mail-extr-ignore-single-names'.
| 
| If the optional argument ALL is non-nil, then ADDRESS can contain zero   <--
| or more recipients, separated by commas, and we return a list of         <--
| the form ((FULL-NAME CANONICAL-ADDRESS) ...) with one element for        <--
| each recipient.  If ALL is nil, then if ADDRESS contains more than       <--
| one recipients, all but the first is ignored.                            <--
| 
| [...]
`----

> (defadvice mail-extract-address-components (after capitalize-mc last activate)
>    "Fix capitalization of \"Mc\" names, e.g. \"Mcdonald\" -> \"McDonald\"."
>    (let ((full-name (car ad-return-value))

(mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
--> (("Uwe Brauer" "oub@mat.ucm.es"))

full-name
--> ("Uwe Brauer" "oub@mat.ucm.es")     [a list!]

(string-match "\\<Mc\\([^aeiou]\\)" ("Uwe Brauer" "oub@mat.ucm.es") ...)
==> ERROR.

I wonder why there was no indication in your backtrace that the
function is advised.  In Emacs 22, the backtrace would tell:

,----[ Backtrace with broken advise ]
| Debugger entered--Lisp error: (wrong-type-argument stringp
|    ("Uwe Brauer" "oub@mat.ucm.es"))
|   string-match("\\<Mc\\([^aeiou]\\)" ("Uwe Brauer" "oub@mat.ucm.es") 0)
|   (and full-name (string-match "\\<Mc\\([^aeiou]\\)" full-name start))
|   (while (and full-name (string-match "\\<Mc\\([^aeiou]\\)"
|    full-name start)) (aset full-name (match-beginning 1) (upcase
|    ...)) (setq start (match-end 0)))
|   (let ((full-name ...) (case-fold-search nil) (start 0)) (while
|   (and full-name ...) (aset full-name ... ...) (setq start ...)))
|   (let (ad-return-value) (setq ad-return-value
|    (ad-Orig-mail-extract-address-components address all)) (let
|    (... ... ...) (while ... ... ...)) ad-return-value)
|   mail-extract-address-components("Uwe Brauer <oub@mat.ucm.es>" t)
|   eval((mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t))
|   eval-last-sexp-1(t)
|   eval-last-sexp(t)
|   eval-print-last-sexp()
|   call-interactively(eval-print-last-sexp)
`----

> The most likely culprit seem to me the defadvice things. I will
> comment them out and see what happens, (still insisting that in 0.6 it
> works): ok now gnus-0.10 works. The question is, how could this
> defadvice function work again under 0.10???

Fix it to handle non-nil ALL correctly.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



  reply	other threads:[~2008-06-24 17:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87od60tp06.fsf@mat.ucm.es>
2008-06-18 18:05 ` Reiner Steib
     [not found]   ` <87hcbpkcb7.fsf@mat.ucm.es>
2008-06-23 17:57     ` Reiner Steib
2008-06-24  9:57       ` Uwe Brauer
2008-06-24 11:40         ` Katsumi Yamaoka
2008-06-24 13:37           ` Uwe Brauer
2008-06-24 17:29             ` Reiner Steib [this message]
2008-06-24 23:59               ` Katsumi Yamaoka
2008-06-25 11:33                 ` Uwe Brauer

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=v9iqvyyc4v.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.org \
    --cc=oub@mat.ucm.es \
    /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.
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).