From unknown Fri Sep 05 11:02:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10714 <10714@debbugs.gnu.org> To: bug#10714 <10714@debbugs.gnu.org> Subject: Status: SHR leaves too much trailing whitespace Reply-To: bug#10714 <10714@debbugs.gnu.org> Date: Fri, 05 Sep 2025 18:02:20 +0000 retitle 10714 SHR leaves too much trailing whitespace reassign 10714 emacs submitter 10714 Stefan Monnier severity 10714 normal tag 10714 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 13:35:34 2012 Received: (at submit) by debbugs.gnu.org; 3 Feb 2012 18:35:34 +0000 Received: from localhost ([127.0.0.1]:52583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtNyv-00009C-G8 for submit@debbugs.gnu.org; Fri, 03 Feb 2012 13:35:34 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52872) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtNyf-00008j-E0 for submit@debbugs.gnu.org; Fri, 03 Feb 2012 13:35:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtNxx-00088d-E6 for submit@debbugs.gnu.org; Fri, 03 Feb 2012 13:34:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:54160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtNxx-00088Q-CY for submit@debbugs.gnu.org; Fri, 03 Feb 2012 13:34:33 -0500 Received: from eggs.gnu.org ([140.186.70.92]:45146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtNxv-0001SC-ND for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 13:34:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtNxq-00085O-Qj for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 13:34:31 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:23569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtNxq-00085G-KM for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 13:34:26 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4GAEMoLE9MCqD0/2dsb2JhbABDnn8BkCaBBoJPEwFLDwQhARwNVaAqoB2MARICAgMGAgQCAQQCAgwGgwMLAgIBBBMLBAZsAQQECgEBAQEBAQIBAQEBAQEBAQEBIYMaBIhEmwCEWg X-IronPort-AV: E=Sophos;i="4.73,352,1325480400"; d="scan'208";a="161097874" Received: from 76-10-160-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.244]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Feb 2012 13:34:25 -0500 Received: by pastel.home (Postfix, from userid 20848) id 24027590EC; Fri, 3 Feb 2012 13:34:25 -0500 (EST) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: SHR leaves too much trailing whitespace Date: Fri, 03 Feb 2012 13:34:25 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Package: Emacs Version: 24.0.92 SHR usually does a pretty good job of showing me the useful content of those obnoxious HTML email, but occasionally the result is hard to read. One fairly common case is that every text line is much longer than my window's with (like twice as long, for instance), although most of it is whitespace (I suspect it's due to some horrendous HTML markup using something like tables to force a particular layout that only works for 1280x800 screens). So I think we should trim all trailing whitespace after rendering, which will solve at least some of those problems. Stefan In GNU Emacs 24.0.92.1 (i686-pc-linux-gnu, GTK+ Version 2.24.8) of 2012-01-17 on pastel Windowing system distributor `The X.Org Foundation', version 11.0.11103901 Configured using: `configure 'CFLAGS=-Wall -Wno-pointer-sign -DUSE_LISP_UNION_TYPE -DSYNC_INPUT -DENABLE_CHECKING -DXASSERTS -DFONTSET_DEBUG -g -O0' '--with-tiff=no'' 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: fr_CH.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: InactiveMinibuffer Minor modes in effect: shell-dirtrack-mode: t diff-auto-refine-mode: t electric-pair-mode: t electric-indent-mode: t url-handler-mode: t global-reveal-mode: t reveal-mode: t auto-insert-mode: t savehist-mode: t minibuffer-electric-default-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-e C-x C-s C-a C-SPC M-; C-x C-s C-c C-c - > SPC C-a C-x C-s C-c C-c f ~ / s / m / r e c C-s s a u c i s s e C-s C-s C-s C-s C-a C-s p o i r e C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a M-x r e p o - e m - b u Recent messages: Warning: isearch-message-state is obsolete! Mark saved where search started Warning: isearch-success-state is obsolete! [2 times] Warning: isearch-error-state is obsolete! Warning: isearch-message-state is obsolete! Warning: isearch-success-state is obsolete! [2 times] Warning: isearch-error-state is obsolete! Warning: isearch-message-state is obsolete! Mark saved where search started Warning: interactive-p is obsolete! [2 times] Load-path shadows: None found. Features: (typer-mode epa-file epa epg epg-config vc-dir descr-text informat texinfo vc-sccs vc-svn vc-cvs vc-rcs cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs cal-french diary-lib diary-loaddefs cal-move cal-menu calendar cal-loaddefs sort mail-extr message sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mail-utils mailheader emacsbug sh-script conf-mode hideif cpp cmacexp cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode format-spec reftex-vcr reftex-dcr reftex reftex-vars tex-mode latexenc bbdb-com mailabbrev bbdb timezone whitespace autorevert doc-view jka-compr image-mode dired cl-specs xscheme trace testcover scheme unsafep re-builder shadow inf-lisp ielm pp gmm-utils ert find-func ewoc elp edebug cust-print repeat debug quail rect multi-isearch dabbrev shell pcomplete vc ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff vc-dispatcher executable copyright cus-edit cus-start cus-load wid-edit smerge-mode newcomment diff-mode vc-bzr filecache mule-util caml tuareg speedbar sb-image ezimage dframe skeleton compile comint ring derived smie caml-help caml-types caml-emacs server noutline outline easy-mmode flyspell ispell eldoc checkdoc regexp-opt thingatpt help-mode view prog-mode load-dir electric url-handlers url-parse auth-source warnings eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util password-cache url-vars mm-util mail-prsvr reveal autoinsert uniquify advice help-fns advice-preload time-date savehist minibuf-eldef disp-table cl cl-loaddefs all-autoloads company-autoloads debbugs-autoloads epoch-view-autoloads jgraph-mode-autoloads js2-mode-autoloads lmc-autoloads load-dir-autoloads markchars-autoloads minimap-autoloads muse-autoloads info easymenu oauth2-autoloads quarter-plane-autoloads rainbow-mode-autoloads register-list-autoloads sisu-mode-autoloads svg-clock-autoloads undo-tree-autoloads uni-confusables-autoloads windresize-autoloads package tabulated-list proof-site proof-autoloads pg-vars bbdb-autoloads agda2 tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 05 13:40:52 2012 Received: (at 10714) by debbugs.gnu.org; 5 Feb 2012 18:40:52 +0000 Received: from localhost ([127.0.0.1]:55820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru719-0004aT-FT for submit@debbugs.gnu.org; Sun, 05 Feb 2012 13:40:52 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:42922) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru716-0004aK-FC for 10714@debbugs.gnu.org; Sun, 05 Feb 2012 13:40:50 -0500 Received: from 93-41-188-50.ip82.fastwebnet.it ([93.41.188.50] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Ru70F-0004hX-Fp; Sun, 05 Feb 2012 19:39:55 +0100 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#10714: SHR leaves too much trailing whitespace References: Date: Sun, 05 Feb 2012 19:39:52 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 03 Feb 2012 13:34:25 -0500") Message-ID: <8739apnmyv.fsf@gnus.org> User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1Ru70F-0004hX-Fp X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1329071996.14225@o8rFPA1PG7cdrgth0bETwQ X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10714 Cc: 10714@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: > So I think we should trim all trailing whitespace after rendering, > which will solve at least some of those problems. I think that's a very good idea. The final stage in the rendering process would be just to delete all trailing whitespace. It seems intuitive to me that this would create a better result than the current rendering, but right now I'm now able to find any HTML emails here that renders badly in this manner. (And I'd like to test it to see if there are any unforeseen negative effects.) Do you happen to have such an email handy that you could forward to me? If not, I can search around my spam mailbox some more... -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 06 19:17:09 2012 Received: (at control) by debbugs.gnu.org; 7 Feb 2012 00:17:09 +0000 Received: from localhost ([127.0.0.1]:57802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuYk8-0006qg-EM for submit@debbugs.gnu.org; Mon, 06 Feb 2012 19:17:08 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:41308) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuYk3-0006qS-DD for control@debbugs.gnu.org; Mon, 06 Feb 2012 19:17:06 -0500 Received: from 93-41-188-50.ip82.fastwebnet.it ([93.41.188.50] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RuYj5-0002lI-TW for control@debbugs.gnu.org; Tue, 07 Feb 2012 01:16:04 +0100 Date: Tue, 07 Feb 2012 01:15:58 +0100 Message-Id: <87ipjjqz0h.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #10714 X-MailScanner-ID: 1RuYj5-0002lI-TW X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1329178564.80746@UrfXwpLrva4M4s7wtMPMsg X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 10714 fixed close 10714 24.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 06 19:18:36 2012 Received: (at 10714) by debbugs.gnu.org; 7 Feb 2012 00:18:36 +0000 Received: from localhost ([127.0.0.1]:57808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuYlY-0006sy-FV for submit@debbugs.gnu.org; Mon, 06 Feb 2012 19:18:36 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:41321) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuYlV-0006so-9e for 10714@debbugs.gnu.org; Mon, 06 Feb 2012 19:18:34 -0500 Received: from 93-41-188-50.ip82.fastwebnet.it ([93.41.188.50] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RuYkX-0002mx-Np; Tue, 07 Feb 2012 01:17:34 +0100 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#10714: SHR leaves too much trailing whitespace References: Date: Tue, 07 Feb 2012 01:17:28 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 06 Feb 2012 10:56:56 -0500") Message-ID: <87ehu7qyxz.fsf@gnus.org> User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1RuYkX-0002mx-Np X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1329178654.43778@RroWLBXwPuxyjB47dvCgnA X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10714 Cc: 10714@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Stefan Monnier writes: > Here's a similar email with lots of trailing whitespace, Thanks. And I found a few spam messages that looked pretty much unreadable with all the trailing white space, and just removing it makes it a lot more readable. (Unfortunately. :-) I've now fixed this in No Gnus, so it should show up in Emacs 24 soonish... -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 07 15:08:46 2012 Received: (at 10714) by debbugs.gnu.org; 7 Feb 2012 20:08:46 +0000 Received: from localhost ([127.0.0.1]:59378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RurLJ-0005p5-Gb for submit@debbugs.gnu.org; Tue, 07 Feb 2012 15:08:45 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:44211) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RurLH-0005ox-8j for 10714@debbugs.gnu.org; Tue, 07 Feb 2012 15:08:44 -0500 Received: from 93-41-188-50.ip82.fastwebnet.it ([93.41.188.50] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RurK8-0003fq-6J; Tue, 07 Feb 2012 21:07:32 +0100 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#10714: SHR leaves too much trailing whitespace References: Date: Tue, 07 Feb 2012 21:07:30 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 06 Feb 2012 10:56:56 -0500") Message-ID: <87d39qv24d.fsf@gnus.org> User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1RurK8-0003fq-6J X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1329250052.83114@3+DjOmIQIL1xhgAcI2UIcQ X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10714 Cc: 10714@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) One thing just occurred to me. If you have something like
bla bla bla
that goes over several lines, that should be presented as a block with a red background. By just stripping all the white space, we instead get a ragged right, which is kinda ugly (and makes some tables less readable, if there are nested blocks). So I think the whitespace-stripping thing will have to be adjusted slightly, and only remove the whitespace if it actually makes the lines wider than the window is. -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome From unknown Fri Sep 05 11:02:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Mar 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator