* Re: BUG: ngnus-0.10 can't send messages
[not found] <87od60tp06.fsf@mat.ucm.es>
@ 2008-06-18 18:05 ` Reiner Steib
[not found] ` <87hcbpkcb7.fsf@mat.ucm.es>
0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2008-06-18 18:05 UTC (permalink / raw)
To: bugs, Uwe Brauer; +Cc: ding, bugs
On Tue, Jun 17 2008, Uwe Brauer wrote:
> I am using Xemacs21.4.19 Mule and just switched from ngnus-0.5 to
> ngnus-0.10.
[...]
> I am not sure whether this is caused by bbdb.
I don't think so.
> 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)
> mail-extract-address-components("Uwe Brauer <oub@mat.ucm.es>" t)
> message-bogus-recipient-p("Uwe Brauer <oub@mat.ucm.es>")
> message-check-recipients()
> message-fix-before-sending()
> message-send(nil)
> message-send-and-exit(nil)
I can't reproduce (nor understand) this problem. It seems that
`mail-extract-address-components' returns something unexpected.
Please show us what is returned in your version for the following
expressions (use M-x ielm). The current CVS HEAD code of
`message-bogus-recipient-p' differs to ngnus-0.10, though it doesn't
seem to be relevant. But still, could you also try with current CVS
HEAD?
,----[ M-x ielm RET ]
| ELISP> (require 'mail-extr)
| mail-extr
| ELISP> (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
| (("Uwe Brauer" "oub@mat.ucm.es"))
|
| ELISP> (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t))
| ("Uwe Brauer" "oub@mat.ucm.es")
|
| ELISP> (cadr (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)))
| "oub@mat.ucm.es"
| ELISP> (require 'message)
| message
| ELISP> (message-bogus-recipient-p "Uwe Brauer <oub@mat.ucm.es>")
| nil
| ELISP> emacs-version
| "21.5 (beta27) \"fiddleheads\" (+CVS-20060704) XEmacs Lucid"
| ELISP>
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
[not found] ` <87hcbpkcb7.fsf@mat.ucm.es>
@ 2008-06-23 17:57 ` Reiner Steib
2008-06-24 9:57 ` Uwe Brauer
0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2008-06-23 17:57 UTC (permalink / raw)
To: Uwe Brauer; +Cc: ding, bugs
[ Please send your reply to ding@gnus.org, see Mail-Followup-To. ]
On Thu, Jun 19 2008, Uwe Brauer wrote:
>>>>>> "Reiner" == Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
> > I don't think so.
>
> > I can't reproduce (nor understand) this problem. It seems that
> > `mail-extract-address-components' returns something unexpected.
> > Please show us what is returned in your version for the following
> > expressions (use M-x ielm). The current CVS HEAD code of
> > `message-bogus-recipient-p' differs to ngnus-0.10, though it doesn't
> > seem to be relevant. But still, could you also try with current CVS
> > HEAD?
>
> You mean I should download the current CVS version and not ngnus-0.10?
Yes.
> > ,----[ M-x ielm RET ]
> > | ELISP> (require 'mail-extr)
> here I got already a problem
>
> --8<------------------------schnipp------------------------->8---
> Debugger entered--Lisp error: (void-function shell-directory-tracker)
> shell-directory-tracker("(require 'mail-extr)\n")
> run-hook-with-args(shell-directory-tracker "(require 'mail-extr)\n")
> comint-send-input()
> ielm-send-input()
> ielm-return()
> #<compiled-function nil "...(41)" [last-command-event pabbrev-mode
> #pabbrev-expansion pabbrev-expansion-suggestions last-command
> #prev-binding pabbrev-expand-maybe pabbrev-suggestions-goto-buffer
> #pabbrev-expand nil key-binding char-to-string fboundp] 3
> #("/home/oub/xemacs/site-lisp/versch/pabbrev.elc" . 18473) nil>()
> call-interactively(pabbrev-expand-maybe)
> recursive-edit()
> byte-code("..." [buffer-read-only noninteractive debugger-buffer
> middlestart debugger-args debugger-batch-max-lines pop-to-buffer
> debugger-mode debugger-setup-buffer count-lines 2 "...\n" message
> buffer-string kill-emacs debug backtrace-debug 3 t debugger-reenable
> "" nil recursive-edit standard-output] 3)
> debug(error (buffer-read-only #<buffer "*Article*">))
> call-interactively(delete-blank-lines)
> --8<------------------------schnapp------------------------->8---
>
> > | mail-extr
> > | ELISP> (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
> > | (("Uwe Brauer" "oub@mat.ucm.es"))
> > |
> > | ELISP> (nth 0 (mail-extract-address-components "Uwe Brauer
> > <oub@mat.ucm.es>" t))
> > | ("Uwe Brauer" "oub@mat.ucm.es")
> > |
> > | ELISP> (cadr (nth 0 (mail-extract-address-components "Uwe
> > Brauer <oub@mat.ucm.es>" t)))
> > | "oub@mat.ucm.es"
> > | ELISP> (require 'message)
> > | message
> > | ELISP> (message-bogus-recipient-p "Uwe Brauer <oub@mat.ucm.es>")
> > | nil
> > | ELISP> emacs-version
> > | "21.5 (beta27) \"fiddleheads\" (+CVS-20060704) XEmacs Lucid"
> > | ELISP>
> > `----
> the other call do not work neither; all the time I obtain the same error.
> But now it seems that pabbrev might be the problem, a very nifty
> function which I use frequently
So it seem pabbrev breaks ielm? Please try without pabbrev, starting
from "xemacs -vanilla -f ielm". Replace "~/src/links/plain_No/lisp"
with the directory of No Gnus on your system.
,----[ xemacs -vanilla -f ielm ]
| *** Welcome to IELM *** Type (describe-mode) for help.
| ELISP> (progn
| (push "~/src/links/plain_No/lisp" load-path)
| (car load-path))
| "~/src/links/plain_No/lisp"
| ELISP> (require 'mail-extr)
| mail-extr
| ELISP> (locate-library "mail-extr")
| "/usr/share/xemacs/xemacs-packages/lisp/mail-lib/mail-extr.elc"
| ELISP> (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
| (("Uwe Brauer" "oub@mat.ucm.es"))
|
| ELISP> (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t))
| ("Uwe Brauer" "oub@mat.ucm.es")
|
| ELISP> (cadr (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)))
| "oub@mat.ucm.es"
| ELISP> (require 'message)
| message
| ELISP> (locate-library "message")
| "/home/dept/ste/src/links/plain_No/lisp/message.elc"
| ELISP> (message-bogus-recipient-p "Uwe Brauer <oub@mat.ucm.es>")
| nil
| ELISP> emacs-version
| "21.5 (beta27) \"fiddleheads\" (+CVS-20060704) XEmacs Lucid"
| ELISP>
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
2008-06-23 17:57 ` Reiner Steib
@ 2008-06-24 9:57 ` Uwe Brauer
2008-06-24 11:40 ` Katsumi Yamaoka
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2008-06-24 9:57 UTC (permalink / raw)
To: Uwe Brauer, ding
[-- Attachment #1: Type: text/plain, Size: 4487 bytes --]
Reiner Steib wrote:
> [ Please send your reply to ding@gnus.org, see Mail-Followup-To. ]
>
> On Thu, Jun 19 2008, Uwe Brauer wrote:
>
>>>>>>> "Reiner" == Reiner Steib <reinersteib+gmane@imap.cc> writes:
>> > I don't think so.
>>
>> > I can't reproduce (nor understand) this problem. It seems that
>> > `mail-extract-address-components' returns something unexpected.
>> > Please show us what is returned in your version for the following
>> > expressions (use M-x ielm). The current CVS HEAD code of
>> > `message-bogus-recipient-p' differs to ngnus-0.10, though it doesn't
>> > seem to be relevant. But still, could you also try with current CVS
>> > HEAD?
>>
>> You mean I should download the current CVS version and not ngnus-0.10?
>
> Yes.
>
>> > ,----[ M-x ielm RET ]
>> > | ELISP> (require 'mail-extr)
>> here I got already a problem
>>
>> --8<------------------------schnipp------------------------->8---
>> Debugger entered--Lisp error: (void-function shell-directory-tracker)
>> shell-directory-tracker("(require 'mail-extr)\n")
>> run-hook-with-args(shell-directory-tracker "(require 'mail-extr)\n")
>> comint-send-input()
>> ielm-send-input()
>> ielm-return()
>> #<compiled-function nil "...(41)" [last-command-event pabbrev-mode
>> #pabbrev-expansion pabbrev-expansion-suggestions last-command
>> #prev-binding pabbrev-expand-maybe pabbrev-suggestions-goto-buffer
>> #pabbrev-expand nil key-binding char-to-string fboundp] 3
>> #("/home/oub/xemacs/site-lisp/versch/pabbrev.elc" . 18473) nil>()
>> call-interactively(pabbrev-expand-maybe)
>> recursive-edit()
>> byte-code("..." [buffer-read-only noninteractive debugger-buffer
>> middlestart debugger-args debugger-batch-max-lines pop-to-buffer
>> debugger-mode debugger-setup-buffer count-lines 2 "...\n" message
>> buffer-string kill-emacs debug backtrace-debug 3 t debugger-reenable
>> "" nil recursive-edit standard-output] 3)
>> debug(error (buffer-read-only #<buffer "*Article*">))
>> call-interactively(delete-blank-lines)
>> --8<------------------------schnapp------------------------->8---
>>
>> > | mail-extr
>> > | ELISP> (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
>> > | (("Uwe Brauer" "oub@mat.ucm.es"))
>> > |
>> > | ELISP> (nth 0 (mail-extract-address-components "Uwe Brauer
>> > <oub@mat.ucm.es>" t))
>> > | ("Uwe Brauer" "oub@mat.ucm.es")
>> > |
>> > | ELISP> (cadr (nth 0 (mail-extract-address-components "Uwe
>> > Brauer <oub@mat.ucm.es>" t)))
>> > | "oub@mat.ucm.es"
>> > | ELISP> (require 'message)
>> > | message
>> > | ELISP> (message-bogus-recipient-p "Uwe Brauer <oub@mat.ucm.es>")
>> > | nil
>> > | ELISP> emacs-version
>> > | "21.5 (beta27) \"fiddleheads\" (+CVS-20060704) XEmacs Lucid"
>> > | ELISP>
>> > `----
>> the other call do not work neither; all the time I obtain the same error.
>> But now it seems that pabbrev might be the problem, a very nifty
>> function which I use frequently
>
>
> So it seem pabbrev breaks ielm? Please try without pabbrev, starting
> from "xemacs -vanilla -f ielm". Replace "~/src/links/plain_No/lisp"
> with the directory of No Gnus on your system.
>
>
> ,----[ xemacs -vanilla -f ielm ]
> | *** Welcome to IELM *** Type (describe-mode) for help.
> | ELISP> (progn
> | (push "~/src/links/plain_No/lisp" load-path)
> | (car load-path))
> | "~/src/links/plain_No/lisp"
> | ELISP> (require 'mail-extr)
> | mail-extr
> | ELISP> (locate-library "mail-extr")
> | "/usr/share/xemacs/xemacs-packages/lisp/mail-lib/mail-extr.elc"
> | ELISP> (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
> | (("Uwe Brauer" "oub@mat.ucm.es"))
> |
> | ELISP> (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t))
> | ("Uwe Brauer" "oub@mat.ucm.es")
> |
> | ELISP> (cadr (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)))
> | "oub@mat.ucm.es"
> | ELISP> (require 'message)
> | message
> | ELISP> (locate-library "message")
> | "/home/dept/ste/src/links/plain_No/lisp/message.elc"
> | ELISP> (message-bogus-recipient-p "Uwe Brauer <oub@mat.ucm.es>")
> | nil
> | ELISP> emacs-version
> | "21.5 (beta27) \"fiddleheads\" (+CVS-20060704) XEmacs Lucid"
> | ELISP>
> `----
>
> Bye, Reiner.
Thanks for your answer.
I did all the steps without a problem, I attach the ilm buffer
the question still puzzles me, why does everything work with ngnus-0.6?
Uwe
[-- Attachment #2: ngus-0.10-ilem-21.4 --]
[-- Type: text/plain, Size: 953 bytes --]
*** Welcome to IELM *** Type (describe-mode) for help.
ELISP> (progn
(push "~/xemacs/site-lisp/packages/ngnus-0.10/lisp" load-path)
(car load-path))
"~/xemacs/site-lisp/packages/ngnus-0.10/lisp"
ELISP> (require 'mail-extr)
mail-extr
ELISP> (locate-library "mail-extr")
"/usr/share/xemacs21/xemacs-packages/lisp/mail-lib/mail-extr.elc"
ELISP> (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)
(("Uwe Brauer" "oub@mat.ucm.es"))
ELISP> (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t))
("Uwe Brauer" "oub@mat.ucm.es")
ELISP> (cadr (nth 0 (mail-extract-address-components "Uwe Brauer <oub@mat.ucm.es>" t)))
"oub@mat.ucm.es"
ELISP> (require 'message)
message
ELISP> (locate-library "message")
"/home/oub/xemacs/site-lisp/packages/ngnus-0.10/lisp/message.elc"
ELISP> (message-bogus-recipient-p "Uwe Brauer <oub@mat.ucm.es>")
nil
ELISP> emacs-version
"21.4 (patch 19) \"Constant Variable\" XEmacs Lucid"
ELISP>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
2008-06-24 9:57 ` Uwe Brauer
@ 2008-06-24 11:40 ` Katsumi Yamaoka
2008-06-24 13:37 ` Uwe Brauer
0 siblings, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2008-06-24 11:40 UTC (permalink / raw)
To: Uwe Brauer; +Cc: ding, bugs
>>>>> Uwe Brauer wrote:
> the question still puzzles me, why does everything work with ngnus-0.6?
>>>>> In <87od60tp06.fsf@mat.ucm.es> Uwe Brauer wrote:
> 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)
> mail-extract-address-components("Uwe Brauer <oub@mat.ucm.es>" t)
> message-bogus-recipient-p("Uwe Brauer <oub@mat.ucm.es>")
> message-check-recipients()
> message-fix-before-sending()
> message-send(nil)
> message-send-and-exit(nil)
> call-interactively(message-send-and-exit)
Do you know where the regexp "\\<Mc\\([^aeiou]\\)" comes from?
Isn't it in your XEmacs init file? GREP found no file containing
"aeiou" in my system.
In addition, I found in and around `message-bogus-recipient-p'
and `mail-extract-address-components' no `string-match' form in
which the third argument `0' (or equivalent) is specified. So,
I guess the backtrace might have reported the one caused by the
one other than `mail-extract-address-components'. How about re-
reproducing the problem after loading some doubtful el (not elc)
files? Those will be the ones that the following program reports
(type C-j at the end of the last line in the *scratch* buffer):
(with-temp-buffer
(emacs-lisp-mode)
(let ((cur (current-buffer))
files)
(dolist (dir load-path)
(dolist (file (directory-files dir t "\\.el\\(\\.gz\\)?\\'"))
(message "%s" file)
(condition-case nil
(progn
(insert-file-contents file)
(goto-char (point-min))
(while (re-search-forward "([\t\n\r ]*string-match[\t\n\r ]"
nil t)
(goto-char (match-beginning 0))
(condition-case nil
(when (= (length (read cur)) 4)
(push file files)
(goto-char (point-max)))
(error
(goto-char (match-end 0)))))
(erase-buffer))
(error))))
(nreverse files)))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
2008-06-24 11:40 ` Katsumi Yamaoka
@ 2008-06-24 13:37 ` Uwe Brauer
2008-06-24 17:29 ` Reiner Steib
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2008-06-24 13:37 UTC (permalink / raw)
To: ding
>>>>> "Katsumi" == Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>> Uwe Brauer wrote:
>> the question still puzzles me, why does everything work with
>> ngnus-0.6?
> Do you know where the regexp "\\<Mc\\([^aeiou]\\)" comes from?
> Isn't it in your XEmacs init file? GREP found no file containing
> "aeiou" in my system.
Still I don't understand why it works in 0.6.
But yes there are files with aeiou on my system
To start with my init file, which has
(defadvice mail-extract-address-components (after capitalize first activate)
"Capitalize names extracted from first.last@..., first_last@..., and
\"first last\" <...> addresses."
(let ((case-fold-search nil))
(if (or (string-match "\\`[a-z---]+\\([._][a-z---]+\\)+@"
(ad-get-arg 0)) ; ADDRESS
(string-match "\\`\"[a-z---]+\\( [a-z---]+\\)+\" <"
(ad-get-arg 0))) ; ADDRESS
(setcar ad-return-value
(capitalize (car ad-return-value))))))
(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))
(case-fold-search nil)
(start 0))
(while (and full-name (string-match "\\<Mc\\([^aeiou]\\)" full-name start))
(aset full-name (match-beginning 1)
(upcase (aref full-name (match-beginning 1))))
(setq start (match-end 0)))))
It is also in
site-lisp/packages/ngnus-0.10/lisp/gnus-art.el
(defun gnus-button-mid-or-mail-heuristic (mid-or-mail)
In reftex
(defcustom reftex-abbrev-parameters '(4 2 "^aeiou" "aeiou")
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???
> In addition, I found in and around `message-bogus-recipient-p'
> and `mail-extract-address-components' no `string-match' form in
> which the third argument `0' (or equivalent) is specified. So,
> I guess the backtrace might have reported the one caused by the
> one other than `mail-extract-address-components'. How about re-
> reproducing the problem after loading some doubtful el (not elc)
> files? Those will be the ones that the following program reports
> (type C-j at the end of the last line in the *scratch* buffer):
ok I will try that after having tried, that for should me this tricks.
Uwe Brauer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
2008-06-24 13:37 ` Uwe Brauer
@ 2008-06-24 17:29 ` Reiner Steib
2008-06-24 23:59 ` Katsumi Yamaoka
0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2008-06-24 17:29 UTC (permalink / raw)
To: Uwe Brauer; +Cc: ding
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/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
2008-06-24 17:29 ` Reiner Steib
@ 2008-06-24 23:59 ` Katsumi Yamaoka
2008-06-25 11:33 ` Uwe Brauer
0 siblings, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2008-06-24 23:59 UTC (permalink / raw)
To: Uwe Brauer; +Cc: ding
>>>>> Reiner Steib wrote:
> Fix it to handle non-nil ALL correctly.
Yup, it's exactly the solution. Maybe those advices can be
simply replaced with:
(defadvice mail-extract-address-components (after capitalize first activate)
"Capitalize names."
(dolist (adrs (if (ad-get-arg 1)
ad-return-value
(and ad-return-value (list ad-return-value))))
(if (car adrs)
(setcar adrs (capitalize (car adrs))))))
(defadvice mail-extract-address-components (after capitalize-mc last activate)
"Fix capitalization of \"Mc\" names, e.g. \"Mcdonald\" -> \"McDonald\"."
(let ((case-fold-search nil)
full-name start)
(dolist (adrs (if (ad-get-arg 1)
ad-return-value
(and ad-return-value (list ad-return-value))))
(when (setq full-name (car adrs))
(setq start 0)
(while (string-match "\\<Mc\\([^aeiou]\\)" full-name start)
(aset full-name (match-beginning 1)
(upcase (aref full-name (match-beginning 1))))
(setq start (match-end 0)))))))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: BUG: ngnus-0.10 can't send messages
2008-06-24 23:59 ` Katsumi Yamaoka
@ 2008-06-25 11:33 ` Uwe Brauer
0 siblings, 0 replies; 8+ messages in thread
From: Uwe Brauer @ 2008-06-25 11:33 UTC (permalink / raw)
To: ding
>>>>> "Katsumi" == Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>> Reiner Steib wrote:
>> Fix it to handle non-nil ALL correctly.
> Yup, it's exactly the solution. Maybe those advices can be
> simply replaced with:
> (defadvice mail-extract-address-components (after capitalize first activate)
> "Capitalize names."
> (dolist (adrs (if (ad-get-arg 1)
> ad-return-value
> (and ad-return-value (list ad-return-value))))
> (if (car adrs)
> (setcar adrs (capitalize (car adrs))))))
> (defadvice mail-extract-address-components (after capitalize-mc last activate)
> "Fix capitalization of \"Mc\" names, e.g. \"Mcdonald\" -> \"McDonald\"."
> (let ((case-fold-search nil)
> full-name start)
> (dolist (adrs (if (ad-get-arg 1)
> ad-return-value
> (and ad-return-value (list ad-return-value))))
> (when (setq full-name (car adrs))
> (setq start 0)
> (while (string-match "\\<Mc\\([^aeiou]\\)" full-name start)
> (aset full-name (match-beginning 1)
> (upcase (aref full-name (match-beginning 1))))
> (setq start (match-end 0)))))))
Thanks for that code.
Uwe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-25 11:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <87od60tp06.fsf@mat.ucm.es>
2008-06-18 18:05 ` BUG: ngnus-0.10 can't send messages 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
2008-06-24 23:59 ` Katsumi Yamaoka
2008-06-25 11:33 ` Uwe Brauer
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).