Gnus development mailing list
 help / color / mirror / Atom feed
From: TSUCHIYA Masatoshi <tsuchiya@namazu.org>
To: ding@gnus.org
Subject: Make ietf-drums-remove-comments() robust against broken header
Date: Thu, 30 Oct 2008 16:11:36 +0900	[thread overview]
Message-ID: <87wsfqsgk7.fsf@tsuchiya.vaj.namazu.org> (raw)

Hi,

I have just met a message including a broken references header, like:

  References: <200810150047.AA17342@mailhost.example.net>
        <7B77911B-167E-47BF-A826-1C4396FEF000@foo.example.net>
        <7B77911B-167E-47BF-A826-1C4396FEF000@foo.example.net>
        (=?iso-2022-jp?B?IhskQj0pTVUbKEIgGyRCTSdOSRsoQg==?= "'s message of "Fri, 17 Oct 2008 04:32:17 +0900")

It forces ietf-drums-remove-comments() to say:

  Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 157 258)
    scan-sexps(157 1)
    forward-sexp(1)

In order to avoid this error, I'd like to install the attached change.
Do you have any objections or better solutions?

Regards,

-- 
TSUCHIYA Masatoshi
--- ietf-drums.el	19 May 2008 08:47:42 -0000	7.16
+++ ietf-drums.el	30 Oct 2008 07:11:01 -0000
@@ -125,7 +125,10 @@
 	 ((eq c ?\")
 	  (forward-sexp 1))
 	 ((eq c ?\()
-	  (delete-region (point) (progn (forward-sexp 1) (point))))
+	  (delete-region (point)
+			 (condition-case nil
+			     (progn (forward-sexp 1) (point))
+			   (error (point-max)))))
 	 (t
 	  (forward-char 1))))
       (buffer-string))))



             reply	other threads:[~2008-10-30  7:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30  7:11 TSUCHIYA Masatoshi [this message]
2008-10-30  8:54 ` Katsumi Yamaoka
2008-10-30  9:07 ` Bjørn Mork
2008-10-30  9:25   ` Katsumi Yamaoka
2008-10-30 14:27     ` Bjørn Mork
2008-10-30 14:38       ` TSUCHIYA Masatoshi
2008-10-30 23:33         ` Katsumi Yamaoka
2008-10-31  0:35           ` TSUCHIYA Masatoshi
2008-10-31  1:21             ` Katsumi Yamaoka
2008-10-31  3:19               ` Ted Zlatanov
2008-10-31  7:26                 ` Katsumi Yamaoka
2008-10-31  9:06                   ` Katsumi Yamaoka
2008-10-31 17:34                     ` Ted Zlatanov

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=87wsfqsgk7.fsf@tsuchiya.vaj.namazu.org \
    --to=tsuchiya@namazu.org \
    --cc=ding@gnus.org \
    /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).