From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: shr: alt text truncation
Date: Fri, 05 Nov 2010 09:53:55 +0900 [thread overview]
Message-ID: <b4maalo4ml8.fsf@jpl.org> (raw)
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 ?.)))
next reply other threads:[~2010-11-05 0:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 0:53 Katsumi Yamaoka [this message]
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
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=b4maalo4ml8.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.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.
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).