[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: href "title" attribute
- From: Kevin Ryde <user42@xxxxxxxxxx>
- Date: Tue, 11 Jan 2011 10:32:52 +1100
- X-ml-name: emacs-w3m
- X-mail-count: 11486
- References: <87d3oesu2d.fsf@xxxxxxxxx> <20110103.163353.214432641.1BF46D@xxxxxxxxxxx> <20110104.223841.133868059.1BF46D@xxxxxxxxxxx>
Hideyuki SHIRAI (°×¾®ÐãÐÐ) <shirai@xxxxxxxxxxx> writes:
> I've just commited the patch with little modification.
I like the way the tooltip has the url on its own line. I wonder if the
message area `w3m-print-this-url' might do the same.
If "Title (URL)" is long enough that it will need two lines anyway, then
maybe it could be shown as "Title\nURL" like the tooltip.
If message-truncate-lines is true then I suppose it should not, because
the second line won't show up. Maybe something like below.
Personally I quite like "Title\nURL" always (or whenever
message-truncate-lines is false), so myself I might forget the
length/frame-width check. If there's parens in the title then it's a
bit easy not to see the "(URL)" also in parens. Maybe a link face of
some kind on the url there would help.
2011-01-11 Kevin Ryde <user42@xxxxxxxxxx>
* w3m.el (w3m-print-this-url): If anchor-title plus url is wider than
the frame then use two lines "Title\nURL".
--- w3m.el.~1.1512.~ 2011-01-11 09:34:15.000000000 +1100
(B+++ w3m.el 2011-01-11 10:31:14.000000000 +1100
(B@@ -7153,7 +7153,20 @@
(B ((> (length alt) 0)
(B (concat alt ": " url))
(B ((> (length title) 0)
(B- (concat title " (" url ")"))
(B+ ;; xemacs21 doesn't have message-truncate-lines
(B+ ;; and always truncates messages, so one line in
(B+ ;; that case
(B+ ;; emacs20 doesn't have message-truncate-lines and
(B+ ;; shows newlines as ^J, so prefer one line in
(B+ ;; that case
(B+ (if (or (not (boundp 'message-truncate-lines))
(B+ (< (+ (length url) (length title) 5)
(B+ (concat title " (" url ")") ;; one line if fits
(B+ (concat title "\n" url))) ;; two lines if big