GNU bug report logs - #42194
27.0.91; shr and rowspan

Previous Next

Package: emacs;

Reported by: Mike Kupfer <mkupfer <at> alum.berkeley.edu>

Date: Sat, 4 Jul 2020 18:56:02 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 27.0.91

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42194 in the body.
You can then email your comments to 42194 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Sat, 04 Jul 2020 18:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Kupfer <mkupfer <at> alum.berkeley.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Jul 2020 18:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.91; shr and rowspan
Date: Sat, 04 Jul 2020 11:55:45 -0700
Reproducer: save this sample HTML to a file and view it with eww:

-----8<-----8<-----
<html>
  <body>
    <table>
      <tr><td rowspan="3">text along left side of table</td></tr>
      <tr><td>row 1</td></tr>
      <tr><td>row 2</td></tr>
    </table>
  </body>
</html>
----->8----->8-----

I'm not terribly concerned about the exact formatting of the table, but
I do expect to see the "row 1" and "row 2" text somewhere.  Instead, all
I see is

-----8<-----8<-----
 text along left side of table  
----->8----->8-----

The test case is abstracted from some HTML-only notification emails that
I have started receiving.  With the "row 1" and "row 2" text missing,
the emails are close to useless.

I can't tell if I should expect shr to handle rowspan correctly.  (Is
there somewhere that documents known restrictions on the HTML that shr
can handle?)  If I shouldn't expect rowspan to be handled correctly (I
can imagine it's hard to get right), please treat this as a wishlist
(feature request) report.

I have verified that the problem also occurs with 26.1 and 26.3, and
I've reproduced it with "emacs -Q".

In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2020-06-06 built on alto
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
Mark activated
Mark set [5 times]
Auto-saving...done
Auto-saving...done
Mark set [3 times]
Saving file /home/kupfer/Desktop/sample.html...
Wrote /home/kupfer/Desktop/sample.html
You can run the command ‘eww’ with G
Saving file /home/kupfer/Mail/drafts/1...
Wrote /home/kupfer/Mail/drafts/1

Configured using:
 'configure --prefix=/usr/local'

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX
GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11
XDBE XIM MODULES THREADS PDUMPER GMP

Important settings:
  value of $LC_TIME: C
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  delete-selection-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug mh-identity mh-comp tabify man compile jka-compr info
eieio-opt speedbar sb-image ezimage dframe find-func help-fns radix-tree
url-file url-dired skeleton mh-letter mh-mime mh-gnus mh-show goto-addr
pp mule-util sort gnus-cite shr-color mail-extr gnus-async gnus-bcklg
gnus-kill mhtml-mode css-mode smie eww thingatpt url-queue color js
sgml-mode gnus-dup qp cl-extra help-mode gnus-ml disp-table misearch
multi-isearch mm-archive url-http url-gw url-cache url-auth url-handlers
gnutls nnrss mm-url nndoc nndraft nnmh network-stream nsm gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum url
url-proxy url-privacy url-expand url-methods url-history mailcap shr
url-cookie url-domsuf url-util url-parse url-vars svg xml dom browse-url
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source
utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range
gnus-win gnus nnheader wid-edit mh-thread mh-inc hl-line mh-tool-bar
mh-seq mh-xface mh-utils mh-folder which-func imenu mh-scan mh-e
mh-compat mh-buffers mh-loaddefs mdk-mail smtpmail auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs json map sendmail message rmc
puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache
epa derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date subr-x seq gv mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr mailabbrev mail-utils gmm-utils mailheader server noutline
outline easy-mmode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs byte-opt bytecomp byte-compile cconv
shell pcomplete comint ansi-color ring xcscope easymenu advice delsel vc
vc-dispatcher timeclock cl-loaddefs cl-lib mdk-hacks tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads inotify dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 370501 40212)
 (symbols 48 27130 2)
 (strings 32 97049 6801)
 (string-bytes 1 3044610)
 (vectors 16 37863)
 (vector-slots 8 680245 49762)
 (floats 8 452 367)
 (intervals 56 35265 0)
 (buffers 1000 37))




Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 17 Jul 2020 00:17:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Fri, 17 Jul 2020 00:19:01 GMT) Full text and rfc822 format available.

Message #10 received at 42194 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Cc: 42194 <at> debbugs.gnu.org
Subject: Re: bug#42194: 27.0.91; shr and rowspan
Date: Fri, 17 Jul 2020 02:18:36 +0200
Mike Kupfer <mkupfer <at> alum.berkeley.edu> writes:

> I'm not terribly concerned about the exact formatting of the table, but
> I do expect to see the "row 1" and "row 2" text somewhere.  Instead, all
> I see is
>
> -----8<-----8<-----
>  text along left side of table  
> ----->8----->8-----

Yeah, I can reproduce this, and I see what the problem is.  The way shr
computes rowspan layouts is by adding "dummy" TD elements in the rows
that the spanning element should cover, but this messes up the
calculation of how many columns there really are.  So it's basically a
off-by-one error, but I'm not quite sure what the best way to fix this
is...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Fri, 17 Jul 2020 01:16:01 GMT) Full text and rfc822 format available.

Message #13 received at 42194 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
Cc: eli Eli Zaretskii <eliz <at> gnu.org>, 42194 <at> debbugs.gnu.org
Subject: Re: bug#42194: 27.0.91; shr and rowspan
Date: Fri, 17 Jul 2020 03:14:59 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mike Kupfer <mkupfer <at> alum.berkeley.edu> writes:
>
>> I'm not terribly concerned about the exact formatting of the table, but
>> I do expect to see the "row 1" and "row 2" text somewhere.  Instead, all
>> I see is
>>
>> -----8<-----8<-----
>>  text along left side of table  
>> ----->8----->8-----

This is now fixed in Emacs 28.1.

Eli, I think the fix should be safe for Emacs 27.1, too, but I've been
out of the loop and I'm not sure what the status is at the moment.  This
isn't exactly a critical bug -- rowspan isn't used that much these days,
and it's a very old bug.

On the other hand, I think it's a pretty safe fix to add, so should I
cherry-pick it for Emacs 27.1?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Fri, 17 Jul 2020 03:56:01 GMT) Full text and rfc822 format available.

Message #16 received at 42194 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 42194 <at> debbugs.gnu.org, mkupfer <at> alum.berkeley.edu
Subject: Re: bug#42194: 27.0.91; shr and rowspan
Date: Fri, 17 Jul 2020 06:55:28 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 42194 <at> debbugs.gnu.org, eli Eli Zaretskii <eliz <at> gnu.org>
> Date: Fri, 17 Jul 2020 03:14:59 +0200
> 
> Eli, I think the fix should be safe for Emacs 27.1, too, but I've been
> out of the loop and I'm not sure what the status is at the moment.  This
> isn't exactly a critical bug -- rowspan isn't used that much these days,
> and it's a very old bug.
> 
> On the other hand, I think it's a pretty safe fix to add, so should I
> cherry-pick it for Emacs 27.1?

The above generally translates into "don't put this on emacs-27".  But
maybe if you tell more details about how it is safe, I will change my
mind about this.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Fri, 17 Jul 2020 13:01:02 GMT) Full text and rfc822 format available.

Message #19 received at 42194 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 42194 <at> debbugs.gnu.org, mkupfer <at> alum.berkeley.edu
Subject: Re: bug#42194: 27.0.91; shr and rowspan
Date: Fri, 17 Jul 2020 15:00:32 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> The above generally translates into "don't put this on emacs-27".  But
> maybe if you tell more details about how it is safe, I will change my
> mind about this.

So does this mean that Emacs 27 is in the "critical bug fixes only"
state?

This is certainly not a critical bug (or a regression), so I'm not
backporting the fix, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 17 Jul 2020 13:02:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 42194 <at> debbugs.gnu.org and Mike Kupfer <mkupfer <at> alum.berkeley.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 17 Jul 2020 13:02:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Fri, 17 Jul 2020 13:53:01 GMT) Full text and rfc822 format available.

Message #26 received at 42194 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 42194 <at> debbugs.gnu.org, mkupfer <at> alum.berkeley.edu
Subject: Re: bug#42194: 27.0.91; shr and rowspan
Date: Fri, 17 Jul 2020 16:52:35 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: mkupfer <at> alum.berkeley.edu,  42194 <at> debbugs.gnu.org
> Date: Fri, 17 Jul 2020 15:00:32 +0200
> 
> So does this mean that Emacs 27 is in the "critical bug fixes only"
> state?

I hope to have RC1 soon.  So yes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42194; Package emacs. (Sun, 19 Jul 2020 18:56:01 GMT) Full text and rfc822 format available.

Message #29 received at 42194 <at> debbugs.gnu.org (full text, mbox):

From: Mike Kupfer <mkupfer <at> alum.berkeley.edu>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 42194 <at> debbugs.gnu.org
Subject: Re: bug#42194: 27.0.91; shr and rowspan
Date: Sun, 19 Jul 2020 11:55:01 -0700
Lars Ingebrigtsen wrote:

> This is now fixed in Emacs 28.1.

Thanks!

I applied 510da73b4a to my copy of 27.0.91, and it works there, too.  (I
understand about it being too late for 27.1.  I just wanted to note it
in the bug report in case someone else hits this issue and wants to
manually apply the fix.)

cheers,
mike




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Aug 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.