* bug#5692: rfc822-addresses returns a string on occasion
@ 2010-03-07 15:24 Uday S Reddy
2010-03-07 17:37 ` Andreas Schwab
0 siblings, 1 reply; 4+ messages in thread
From: Uday S Reddy @ 2010-03-07 15:24 UTC (permalink / raw
To: 5692; +Cc: U.S.Reddy
A change made to rfc822.el in Emacs 23.1 seems to have introduced a
bug. As the following calls illustrate, the function rfc822-addresses
normally returns a list of strings, but in the last case it is
returning a string. This problem was not present in 22.3.
(rfc822-addresses "foo@bar")
("foo@bar")
(rfc822-addresses "foo:@bar")
("(Unparsable address -- Gubbish in middle of :...; group: \"foo:_^_@bar\")")
(rfc822-addresses "foo:;@bar")
"(Unparsable address -- Strange character \\@ found: \"@_^_bar\")"
------
More generally, it is not clear to me why rfc822-addresses is
returning strings instead of throwing errors when it finds bad address
strings. From the code in VM, it appears that it was originally
expected to throw errors. But that has changed sometime in the course
of revisions.
Cheers,
Uday
---------
In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: VM Presentation
Minor modes in effect:
shell-dirtrack-mode: t
savehist-mode: t
encoded-kbd-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> <wheel-up> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-movement> <mouse-1> <down-mouse-1>
<mouse-1> <switch-frame> <down-mouse-1> <mouse-movement>
<mouse-1> <switch-frame> <down-mouse-1> <mouse-movement>
<mouse-1> C-x b <return> <escape> C-a C-v C-v C-v C-v
C-s a d d r e s s e s C-s C-a <escape> C-x C-x C-g
M-x d e b u g e e <backspace> <backspace> g e r - e
s SPC <return> <switch-frame> <down-mouse-1> <mouse-movement>
<mouse-1> C-x c C-g q M-x f o l d e r <return> <return>
c c c c V C r e c i SPC <return> f o o <return> c c
d d c d d c d d d c d c d c d c c c c <switch-frame>
<down-mouse-1> <mouse-movement> <mouse-1> <wheel-down>
<double-wheel-down> <wheel-down> <wheel-down> <wheel-down>
<wheel-down> <wheel-up> <switch-frame> <down-mouse-1>
<mouse-movement> <mouse-1> q V C r e c i SPC <return>
f o o <return> c c d d c d d c d d d c d c d c d c
d c d d c d d c d d c d d c d c d d d c d d c d c d
c c c d d d d d c d c d c <switch-frame> <down-mouse-1>
<mouse-movement> <mouse-1> <wheel-down> <down-mouse-1>
<mouse-1> <switch-frame> <down-mouse-1> <mouse-movement>
<mouse-1> d d c d c d d d c d c c d d d c d c d d c
c c c c c c c c c c c c <switch-frame> <down-mouse-1>
<mouse-movement> <mouse-1> SPC SPC SPC <backspace>
C-x o C-n C-n C-p C-p C-p C-p C-p C-p C-n C-SPC C-n
C-n C-n C-n C-n C-n C-n C-n C-x C-k M-x r e p o SPC
r t - e m a c s SPC SPC <return>
Recent messages:
Continuing.
Entering debugger...
Continuing.
Entering debugger...
Continuing.
No messages. [3 times]
Decoding MIME message... done
Mark set
Making completion list...
Loading emacsbug...done
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5692: rfc822-addresses returns a string on occasion
2010-03-07 15:24 bug#5692: rfc822-addresses returns a string on occasion Uday S Reddy
@ 2010-03-07 17:37 ` Andreas Schwab
2010-03-07 23:51 ` Stephen Berman
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2010-03-07 17:37 UTC (permalink / raw
To: Uday S Reddy; +Cc: 5692-done
Uday S Reddy <u.s.reddy@cs.bham.ac.uk> writes:
> (rfc822-addresses "foo:;@bar")
> "(Unparsable address -- Strange character \\@ found: \"@_^_bar\")"
Thanks, I've checked in a fix.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5692: rfc822-addresses returns a string on occasion
2010-03-07 17:37 ` Andreas Schwab
@ 2010-03-07 23:51 ` Stephen Berman
2010-03-08 16:18 ` Chong Yidong
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2010-03-07 23:51 UTC (permalink / raw
To: 5692; +Cc: Andreas Schwab
On Sun, 07 Mar 2010 18:37:16 +0100 Andreas Schwab <schwab@linux-m68k.org> wrote:
> Uday S Reddy <u.s.reddy@cs.bham.ac.uk> writes:
>
>> (rfc822-addresses "foo:;@bar")
>> "(Unparsable address -- Strange character \\@ found: \"@_^_bar\")"
>
> Thanks, I've checked in a fix.
>
> Andreas.
Your fix in effect reverts a change I submitted to deal with bug#453. I
wrote in that thread: "I'm not even sure what TRT is here: as I wrote in
my OP, my patch returns an error string as specified by
rfc822-bad-address, but the caller bbdb-rfc822-addresses expects a list,
so it still raises a wrong-type error. This happens when the relocated
catch sexp has scope to the end of the let that immediately encloses it
(patch (i) below). But [if] I leave the catch in its existing position
and move rfc822-nuke-whitespace to within it (patch (ii) below), then no
error is raised, but also there's no indication of a bad address; yet
stepping through the code with edebug does pass through
rfc822-bad-address. So where should the catch be located? Hopefully
someone familiar (unlike me) with RFC 822 and rfc822.el, and ideally
also bbdb-rfc822-addresses, can answer that question and say whether
either of these patches is suitable, or provide a better one." Chong
Yidong decided that giving the catch wide scope was the correct fix and
installed it. Your patch undoes that (even moves the catch lower than
it was before my patch), making it possible for bug#453 to occur again.
But again, I don't know what the best fix is.
Steve Berman
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5692: rfc822-addresses returns a string on occasion
2010-03-07 23:51 ` Stephen Berman
@ 2010-03-08 16:18 ` Chong Yidong
0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2010-03-08 16:18 UTC (permalink / raw
To: Stephen Berman; +Cc: 5692, Andreas Schwab
Stephen Berman <stephen.berman@gmx.net> writes:
>> Thanks, I've checked in a fix.
>
> Your fix in effect reverts a change I submitted to deal with bug#453.
I've tweaked the code some more to ensure that the bug#453 case remains
fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-08 16:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-07 15:24 bug#5692: rfc822-addresses returns a string on occasion Uday S Reddy
2010-03-07 17:37 ` Andreas Schwab
2010-03-07 23:51 ` Stephen Berman
2010-03-08 16:18 ` Chong Yidong
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.