Gnus development mailing list
 help / color / mirror / Atom feed
* Bug in copying
@ 2007-05-09  1:47 Leo
  2007-05-13  9:48 ` Reiner Steib
  0 siblings, 1 reply; 6+ messages in thread
From: Leo @ 2007-05-09  1:47 UTC (permalink / raw)
  To: ding

Dear all,

If I view a pdf attachment inline (I use pdftotext), and try to copy the
inlined text to another buffer, then space will be replaced with ` ',
for example like this one:

                    --------------------------------
                 DEPARTMENT OF APPLIED MATHEMATICS AND 
                          THEORETICAL PHYSICS 


                  You are warmly invited to attend the

                    Andrew Chamblin Memorial Lecture
                                   at

                          Lady Mitchell Hall,
                       Sidgwick Avenue, Cambridge
                                   on

                    Wednesday 9th May 2007 at 4.30pm
                                given by
                        Professor Stephen Hawking
                         “Out of a Black Hole”
                    --------------------------------

Regards,
-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)




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

* Re: Bug in copying
  2007-05-09  1:47 Bug in copying Leo
@ 2007-05-13  9:48 ` Reiner Steib
  2007-05-15 10:50   ` non-break space (was Re: Bug in copying) Katsumi Yamaoka
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2007-05-13  9:48 UTC (permalink / raw)
  To: ding

On Wed, May 09 2007, Leo wrote:

> If I view a pdf attachment inline (I use pdftotext), and try to copy the
> inlined text to another buffer, then space will be replaced with ` ',
> for example like this one:
>
>                     --------------------------------
>                  DEPARTMENT OF APPLIED MATHEMATICS AND 

` ' (U+00A0, NO-BREAK SPACE) is not *converted* ("replaced") by Gnus.
Only the display in the article buffer is different compared to other
buffers.

,----[ gnus-art.el -> gnus-article-mode ]
|   ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
|   ;; face.
|   (set (make-local-variable 'nobreak-char-display) nil)
`----

It is the PDF generating application or pdftotext that creates the
NO-BREAK SPACE in the first place, not Gnus.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* non-break space (was Re: Bug in copying)
  2007-05-13  9:48 ` Reiner Steib
@ 2007-05-15 10:50   ` Katsumi Yamaoka
  2007-05-15 11:07     ` non-break space Michaël Cadilhac
  2007-05-15 16:00     ` Reiner Steib
  0 siblings, 2 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2007-05-15 10:50 UTC (permalink / raw)
  To: ding

>>>>> In <v9mz09qckf.fsf@marauder.physik.uni-ulm.de>
>>>>>	Reiner Steib wrote:

> ,----[ gnus-art.el -> gnus-article-mode ]
>|   ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
>|   ;; face.
>|   (set (make-local-variable 'nobreak-char-display) nil)
> `----

Is it still necessary to prevent it from being displayed?
Before it was introduced, the non-break space seems to have been
displayed as `\ '.  But now it looks like `_' by default.  I feel
it looks better than a box.

You can try it by evaluating `(setq nobreak-char-display t)' in
the article <m23b2622f9.fsf@sl392.st-edmunds.cam.ac.uk>.

Regards,



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

* Re: non-break space
  2007-05-15 10:50   ` non-break space (was Re: Bug in copying) Katsumi Yamaoka
@ 2007-05-15 11:07     ` Michaël Cadilhac
  2007-05-15 16:00     ` Reiner Steib
  1 sibling, 0 replies; 6+ messages in thread
From: Michaël Cadilhac @ 2007-05-15 11:07 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]

Katsumi Yamaoka <yamaoka@jpl.org> writes:

>>>>>> In <v9mz09qckf.fsf@marauder.physik.uni-ulm.de>
>>>>>>	Reiner Steib wrote:
>
>> ,----[ gnus-art.el -> gnus-article-mode ]
>>|   ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
>>|   ;; face.
>>|   (set (make-local-variable 'nobreak-char-display) nil)
>> `----
>
> Is it still necessary to prevent it from being displayed?
> Before it was introduced, the non-break space seems to have been
> displayed as `\ '.  But now it looks like `_' by default.  I feel
> it looks better than a box.

IMHO, nbsp are of a great help when /writing/ text, but it's just
distracting when you are only /reading/ them. And just FYI, I use the
following for writing nbsp (and I stopped using
`fill-french-nobreak-p'):

   (defun self-insert-possibly-nbsp (&optional n)
     "Like `self-insert-command', but add a nbsp before if needed."
     (interactive "p")
     (when (and (stringp current-input-method)
                (string-match "french" current-input-method)
                (memq (char-before) '(?\s ?\t ?\n)))
       (delete-char -1)
       (insert "\240")) ;; Non-breakable space.
     (self-insert-command n))

   (global-set-key "?" 'self-insert-possibly-nbsp)
   (global-set-key "!" 'self-insert-possibly-nbsp)
   (global-set-key ":" 'self-insert-possibly-nbsp)
   (global-set-key ";" 'self-insert-possibly-nbsp)

-- 
 |   Michaël `Micha' Cadilhac       |  ... KVim is cited in the talk.        |
 |   http://michael.cadilhac.name   |   "I can't tell if I am more sorry     |
 |   JID/MSN:                       |        for vim or for KDE."            |
 `----  michael.cadilhac@gmail.com  |          -- RMS                   -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: non-break space
  2007-05-15 10:50   ` non-break space (was Re: Bug in copying) Katsumi Yamaoka
  2007-05-15 11:07     ` non-break space Michaël Cadilhac
@ 2007-05-15 16:00     ` Reiner Steib
  2007-05-15 23:31       ` Katsumi Yamaoka
  1 sibling, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2007-05-15 16:00 UTC (permalink / raw)
  To: ding

On Tue, May 15 2007, Katsumi Yamaoka wrote:

> Is it still necessary to prevent it from being displayed?
> Before it was introduced, the non-break space seems to have been
> displayed as `\ '.  

Yes, that's why I've fixed the comment.

> But now it looks like `_' by default.  I feel it looks better than a
> box.

If it's displayed as a box for you, there's something wrong.  It
should be displayed exactly like an ordinary space character.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: non-break space
  2007-05-15 16:00     ` Reiner Steib
@ 2007-05-15 23:31       ` Katsumi Yamaoka
  0 siblings, 0 replies; 6+ messages in thread
From: Katsumi Yamaoka @ 2007-05-15 23:31 UTC (permalink / raw)
  To: ding

>>>>> In <v9lkfqhya0.fsf@marauder.physik.uni-ulm.de>
>>>>>	Reiner Steib wrote:
> On Tue, May 15 2007, Katsumi Yamaoka wrote:

>> But now it looks like `_' by default.  I feel it looks better than a
>> box.

> If it's displayed as a box for you, there's something wrong.  It
> should be displayed exactly like an ordinary space character.

Ah, I failed to notice it's only with me.  I realized I didn't
have a font for the Latin-1 nbsp character as follows:

(fontset-font nil (make-char 'latin-iso8859-1 32))
 => (nil . "iso8859-1")

(Though I don't know why all the Latin-1 characters except nbsp
were displayed properly.)  Anyway I added this:

(set-fontset-font
       nil 'latin-iso8859-1
       "-*-*-medium-r-*-*-*-150-*-*-*-*-iso8859-1")

And now nbsp looks exactly a space in the article buffer.

Thank you.



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

end of thread, other threads:[~2007-05-15 23:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-09  1:47 Bug in copying Leo
2007-05-13  9:48 ` Reiner Steib
2007-05-15 10:50   ` non-break space (was Re: Bug in copying) Katsumi Yamaoka
2007-05-15 11:07     ` non-break space Michaël Cadilhac
2007-05-15 16:00     ` Reiner Steib
2007-05-15 23:31       ` Katsumi Yamaoka

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