Gnus development mailing list
 help / color / mirror / Atom feed
* Wash 0xA0 nbsp
@ 2008-12-18 23:42 jidanni
  2008-12-19  1:48 ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: jidanni @ 2008-12-18 23:42 UTC (permalink / raw)
  To: ding

I had to use uni2ascii -e to get all the 0xA0's out of
http://article.gmane.org/gmane.org.wikimedia.mediawiki/29506/raw ,
as there is no Wash command to do it apparently.



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

* Re: Wash 0xA0 nbsp
  2008-12-18 23:42 Wash 0xA0 nbsp jidanni
@ 2008-12-19  1:48 ` Katsumi Yamaoka
  2008-12-19  4:12   ` jidanni
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2008-12-19  1:48 UTC (permalink / raw)
  To: ding

>>>>> jidanni@jidanni.org wrote:

> I had to use uni2ascii -e to get all the 0xA0's out of
> http://article.gmane.org/gmane.org.wikimedia.mediawiki/29506/raw ,
> as there is no Wash command to do it apparently.

Isn't it a font problem on you and me?  I.e., there is no font
for the nbsp character available.  In that article, I get a box
for nbsp in Emacs 22, and one-dot width space in Emacs 23.
A workaround is:

(add-hook 'gnus-article-mode-hook
	  (lambda nil (setq nobreak-char-display t)))

;; Gnus sets `nobreak-char-display' to nil locally in the article
;; buffer.  t means display nbsp as "_".



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

* Re: Wash 0xA0 nbsp
  2008-12-19  1:48 ` Katsumi Yamaoka
@ 2008-12-19  4:12   ` jidanni
  2008-12-19  4:39     ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: jidanni @ 2008-12-19  4:12 UTC (permalink / raw)
  To: yamaoka; +Cc: ding

>> http://article.gmane.org/gmane.org.wikimedia.mediawiki/29506/raw ,
KY> t means display nbsp as "_".
I already see the glowing "_"'s. I just want to wash the article
before using
S W runs the command gnus-summary-wide-reply-with-original
because --- imaging me sending non-ASCII mess when my reply could
instead be pure ASCII.



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

* Re: Wash 0xA0 nbsp
  2008-12-19  4:12   ` jidanni
@ 2008-12-19  4:39     ` Katsumi Yamaoka
  2008-12-19  5:07       ` jidanni
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2008-12-19  4:39 UTC (permalink / raw)
  To: jidanni; +Cc: ding

>>>>> jidanni@jidanni.org wrote:

>>> http://article.gmane.org/gmane.org.wikimedia.mediawiki/29506/raw ,
KY> t means display nbsp as "_".
> I already see the glowing "_"'s. I just want to wash the article
> before using
> S W runs the command gnus-summary-wide-reply-with-original
> because --- imaging me sending non-ASCII mess when my reply could
> instead be pure ASCII.

Ok.  How about this workaround?

(defun my-replace-nbsp-with-spc ()
  "Replace nbsp with spc in the current buffer."
  (let ((nbsp (string (make-char 'latin-iso8859-1 160))))
    (goto-char (point-min))
    (while (search-forward nbsp nil t)
      (replace-match " "))))

(add-hook 'gnus-message-setup-hook 'my-replace-nbsp-with-spc)

If you want to run this also in the article buffer:

(add-hook 'gnus-article-prepare-hook 'my-replace-nbsp-with-spc)

I have no idea to add it to the Gnus wash functions.

Regards,



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

* Re: Wash 0xA0 nbsp
  2008-12-19  4:39     ` Katsumi Yamaoka
@ 2008-12-19  5:07       ` jidanni
  0 siblings, 0 replies; 5+ messages in thread
From: jidanni @ 2008-12-19  5:07 UTC (permalink / raw)
  To: yamaoka; +Cc: ding

KY> I have no idea to add it to the Gnus wash functions.

OK, but I was thinking that since W C-h shows about 100 different wash
functions, there certainly should be some that do some of these functions:

Usage: uni2ascii [flags]
       -c Convert circled and parenthesized characters.
       -e Convert to approximate ASCII equivalents.
       -f Convert formal equivalents to ASCII.
       -x Expand certain single characters to equivalent sequences.
       -y Convert certain characters to approximate single-characters.
       -d Strip diacritics.
       -n Convert newlines.
       -s Convert space characters.
       -B Best ASCII. Transform to ASCII if possible. Combines cdefx.

But it seems it would be best for the user to just use
(shell-command-on-region (region-beginning) (region-end) "uni2ascii
-e" ...

OK, I thought a Wash to ASCII group would be a common need (for me I
only encountered that one message with the need though)... OK, never
mind. Thanks anyway for your trouble.



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

end of thread, other threads:[~2008-12-19  5:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-18 23:42 Wash 0xA0 nbsp jidanni
2008-12-19  1:48 ` Katsumi Yamaoka
2008-12-19  4:12   ` jidanni
2008-12-19  4:39     ` Katsumi Yamaoka
2008-12-19  5:07       ` jidanni

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