Gnus development mailing list
 help / color / mirror / Atom feed
* shr: alt text truncation
@ 2010-11-05  0:53 Katsumi Yamaoka
  2010-11-05  1:07 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Katsumi Yamaoka @ 2010-11-05  0:53 UTC (permalink / raw)
  To: ding

Currently the width of an alt text is limited by 8, so I come
across ones like the following occasionally:

+--------+
|Amazon.c|
+--------+
[   image   ]

Is it really necessary?  Even so, can't the limit be extended to
shr-width at least in a table?  For instance:

--- shr.el~	2010-11-04 22:03:07 +0000
+++ shr.el	2010-11-05 00:51:26 +0000
@@ -557,3 +557,6 @@
-	  (let ((shr-state 'space))
-	    (if (> (string-width alt) 8)
-		(shr-insert (truncate-string-to-width alt 8))
+	  (let ((shr-state 'space)
+		(limit (if (zerop shr-table-depth) 8 shr-width)))
+	    (if (> (string-width alt) limit)
+		(shr-insert
+		 (concat (truncate-string-to-width alt (- limit 3))
+			 (make-string 3 ?.)))



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-09 23:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-05  0:53 shr: alt text truncation Katsumi Yamaoka
2010-11-05  1:07 ` Lars Magne Ingebrigtsen
2010-11-05  8:22   ` Steinar Bang
2010-11-08 20:32     ` Lars Magne Ingebrigtsen
2010-11-09  8:39       ` Steinar Bang
2010-11-09 17:49         ` Lars Magne Ingebrigtsen
2010-11-09 22:00         ` Ted Zlatanov
2010-11-09 23:00           ` Steinar Bang
2010-11-09 23:12             ` Rupert Swarbrick

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).