Gnus development mailing list
 help / color / mirror / Atom feed
* shr.el: folding Japanese text
@ 2010-10-08  8:10 Katsumi Yamaoka
  2010-10-08 17:05 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 44+ messages in thread
From: Katsumi Yamaoka @ 2010-10-08  8:10 UTC (permalink / raw)
  To: ding

Hi,

Could you see articles in the gwene.jp.itmedia.news.bursts
newsgroup?  You may see some aren't folded and some are folded
uglily.  There's no concept of the word wrapping in Japanese.
Normally there's no space between words.  A word may be folded
in the middle of it.  Is it funny?  But it's our custom. ;-)
I guess that Korean text and Chinese text are similar.

The following is a quick hack that satisfies me so-so.  For the
moment I don't know how we can switch it for Latin text and
others, though.

(defun shr-insert (text)
  (when (eq shr-state 'image)
    (insert "\n")
    (setq shr-state nil))
  (unless (string-equal text "\n")
    (let ((start (point))
	  nls)
      (insert text)
      (fill-region start (point))
      (goto-char start)
      (skip-chars-forward "\n")
      (setq nls (skip-chars-backward "\n"))
      (cond ((bobp)
	     (delete-char (- nls)))
	    ((< nls -2)
	     (delete-char (- -2 nls)))))
    (goto-char (point-max))))

Regards,



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

end of thread, other threads:[~2010-10-20 17:22 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-08  8:10 shr.el: folding Japanese text Katsumi Yamaoka
2010-10-08 17:05 ` Lars Magne Ingebrigtsen
2010-10-08 17:23   ` Ted Zlatanov
2010-10-09 16:09     ` Lars Magne Ingebrigtsen
2010-10-09 21:35       ` Lars Magne Ingebrigtsen
2010-10-09 21:48         ` Lars Magne Ingebrigtsen
2010-10-10  4:57         ` CHENG Gao
2010-10-10 13:42         ` Andreas Schwab
2010-10-10 13:47           ` Lars Magne Ingebrigtsen
2010-10-10 16:22             ` Andreas Schwab
2010-10-11  4:03             ` James Cloos
2010-10-11  7:23         ` Kan-Ru Chen
2010-10-11 18:07           ` Lars Magne Ingebrigtsen
2010-10-12  8:19             ` Katsumi Yamaoka
2010-10-12 12:48               ` Lars Magne Ingebrigtsen
2010-10-12 14:13                 ` Katsumi Yamaoka
2010-10-13  8:13                   ` Katsumi Yamaoka
2010-10-13 16:53                     ` Lars Magne Ingebrigtsen
2010-10-13 19:01                       ` Lars Magne Ingebrigtsen
2010-10-14  8:16                         ` Katsumi Yamaoka
2010-10-14 10:12                           ` Katsumi Yamaoka
2010-10-14 14:13                           ` Katsumi Yamaoka
2010-10-14 18:34                           ` Lars Magne Ingebrigtsen
2010-10-14 19:10                             ` Lars Magne Ingebrigtsen
2010-10-15  0:40                               ` Katsumi Yamaoka
2010-10-15  7:35                                 ` Lars Magne Ingebrigtsen
2010-10-15 10:28                                   ` Lars Magne Ingebrigtsen
2010-10-15 10:48                                     ` Lars Magne Ingebrigtsen
2010-10-15  1:28                               ` Kan-Ru Chen
2010-10-15  6:29                               ` Reiner Steib
2010-10-15 18:05                                 ` Andreas Schwab
2010-10-15 20:16                                   ` Reiner Steib
2010-10-15  1:18                             ` Katsumi Yamaoka
2010-10-14 19:05                           ` Lars Magne Ingebrigtsen
2010-10-15  8:08                             ` Katsumi Yamaoka
2010-10-15 14:02                               ` Lars Magne Ingebrigtsen
2010-10-17  1:04                                 ` Lars Magne Ingebrigtsen
2010-10-18  5:19                                   ` Katsumi Yamaoka
2010-10-18 19:01                                     ` Lars Magne Ingebrigtsen
2010-10-18  5:19                                 ` Katsumi Yamaoka
2010-10-19  7:52                                   ` Katsumi Yamaoka
2010-10-19 18:12                                     ` Lars Magne Ingebrigtsen
2010-10-20  7:29                                       ` Katsumi Yamaoka
2010-10-20 17:22                                         ` Lars Magne Ingebrigtsen

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