unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Jon Fineman <jon@fineman.me>, notmuch@notmuchmail.org
Cc: Jon Fineman <jon@fineman.me>
Subject: Re: Forward email error - forward-sexp: Scan error
Date: Wed, 03 Apr 2024 07:33:12 -0300	[thread overview]
Message-ID: <87o7aqn3br.fsf@tethera.net> (raw)
In-Reply-To: <875xxi5p56.fsf@ryzen.jonjfineman.com>

Jon Fineman <jon@fineman.me> writes:

> Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 22384 32216)
>   scan-sexps(22384 1)
>   forward-sexp()
>   mml-expand-html-into-multipart-related((part (type . "text/html") (charset . "UTF-8") (nofile . "yes") (tag-location . 907) (contents . "<!DOCTYPE html>\n<!--a71f943b-ab8b-549b-4cb2-514a60...")))
>   mml-expand-all-html-into-multipart-related((part (type . "text/html") (charset . "UTF-8") (nofile . "yes") (tag-location . 907) (contents . "<!DOCTYPE html>\n<!--a71f943b-ab8b-549b-4cb2-514a60...")))
>   mml-expand-all-html-into-multipart-related((multipart (type . "mixed") (tag-location . 883) (part (type . "text/html") (charset . "UTF-8") (nofile . "yes") (tag-location . 907) (contents . "<!DOCTYPE html>\n<!--a71f943b-ab8b-549b-4cb2-514a60..."))))
>   mapcar(mml-expand-all-html-into-multipart-related ((part (type . "text/plain") (contents . "\n-------------------- Start of forwarded message -...")) (multipart (type . "mixed") (tag-location . 883) (part (type . "text/html") (charset . "UTF-8") (nofile . "yes") (tag-location . 907) (contents . "<!DOCTYPE html>\n<!--a71f943b-ab8b-549b-4cb2-514a60..."))) (part (type . "text/plain") (contents . "-------------------- End of forwarded message ----..."))))
>   mml-generate-mime(nil nil)

Is that HTML part confidential? My current guess is that it is
triggering a bug in the HTML parsing in GNUs. The call to forward-sexp
which is failing seems to be used (along with a special syntax table)
for selecting the region to be parsed by libxml. I do not see any
handling of malformed HTML in the corresponding function. Perhaps this
happens somewhere else, but another possibility is there isn't any
checks.

If the part is confidential, and you can isolate it, please run it
through some strict syntax checker. It could also be that the
assumptions about <> structure being balanced are violated in various
ways by syntactically correct HTML.

David

      reply	other threads:[~2024-04-03 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 15:21 Forward email error - forward-sexp: Scan error Jon Fineman
2024-03-19 12:17 ` David Bremner
2024-03-19 13:26   ` Jon Fineman
2024-04-03 10:33     ` David Bremner [this message]

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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7aqn3br.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=jon@fineman.me \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).