all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Christophe.Troestler@umons.ac.be
Cc: 34387@debbugs.gnu.org
Subject: bug#34387: 26.1; Gnus: handle empty message parts
Date: Wed, 13 Feb 2019 13:53:34 +0900	[thread overview]
Message-ID: <b4mtvh8jnld.fsf@jpl.org> (raw)
In-Reply-To: <87ef8igwdw.fsf@poincare.umons.ac.be>

On Tue, 12 Feb 2019 08:31:39 +0100, Christophe Troestler wrote:
> Here is the debugger trace (message attached) :

> Debugger entered--Lisp error: (args-out-of-range 4409 4410)
>   #f(compiled-function...)(PART1)
>   apply(#f(compiled-function...) PART1)
>   gnus-mime-display-single@fix(#f(compiled-function...) PART1)
>   apply(gnus-mime-display-single@fix #f(compiled-function...) PART1)
>   gnus-mime-display-single(PART1)
>   gnus-mime-display-part(PART1)
>   mapcar(gnus-mime-display-part (PART1 PART2))
>   gnus-mime-display-mixed((PART1 PART2))
>   gnus-mime-display-part((...PART1 PART2))
>   gnus-display-mime()
>   gnus-article-prepare-display()

;; Where PART1 is the html part and PART2 is the pdf part.

If it is (narrow-to-region beg (point)) in gnus-mime-display-single
to issue (args-out-of-range 4409 4410), I guess an html rendering
function deletes buffer's contents so that the buffer's end point
may be 4409.  Here is a model to reproduce the same error:

(with-temp-buffer               ;; article buffer
  (insert-char ?x 4409)
  (let ((beg (point)))          ;; buffer's end point == 4410
    (delete-char -1)            ;; html function does this
    (narrow-to-region beg (point))))
 => (args-out-of-range 4409 4410)

The default html function is mm-shr, that gnus-mime-display-single
calls by way of mm-display-part, mm-display-inline, and
mm-inline-text-html.  At that time, the point is positioned at
the end of the article buffer, where the header lines and a
single empty line are there.

>> Otherwise, could you show me a sample email in question? […]
> Attached.

Thanks.  However, I couldn't reproduce the error with the mail
that I copied to my nnml group.  I tried it using Emacs 26.1
with no ~/.emacs, no ~/.gnus.el, but ~/.newsrc.eld,
(setq gnus-select-method '(nnnil)), and every candidate for
mm-text-html-renderer.  The only thing that reproduces it is:

(defadvice mm-shr (before delete-ceiling-newlines activate)
  "Delete newlines before the point."
  (skip-chars-backward "\n")
  (delete-region (point) (point-max)))

Well, if you have time for analyzing the problem, don't you try
edebug on the functions listed above?

Regards,

;; I'm going to fix the other 2 issues anyway.





  reply	other threads:[~2019-02-13  4:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 14:58 bug#34387: 26.1; Gnus: handle empty message parts Christophe Troestler
     [not found] ` <handler.34387.B.154963794230369.ack@debbugs.gnu.org>
2019-02-08 15:39   ` bug#34387: Acknowledgement (26.1; Gnus: handle empty message parts) Christophe Troestler
2019-02-12  4:34 ` bug#34387: 26.1; Gnus: handle empty message parts Katsumi Yamaoka
2019-02-12  7:31   ` Christophe Troestler
2019-02-13  4:53     ` Katsumi Yamaoka [this message]
2019-02-13 17:26       ` Christophe Troestler
2019-02-13 23:20         ` Katsumi Yamaoka
2019-02-14  2:16           ` Katsumi Yamaoka
2019-02-14 12:30           ` Christophe Troestler
2019-02-14 22:50             ` Katsumi Yamaoka
2019-02-15  8:28               ` Christophe Troestler

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=b4mtvh8jnld.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=34387@debbugs.gnu.org \
    --cc=Christophe.Troestler@umons.ac.be \
    /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 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.