all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Copying to unicode.
@ 2010-11-03 16:27 Steven W. Orr
  2010-11-07  8:35 ` Daniel Pittman
  0 siblings, 1 reply; 3+ messages in thread
From: Steven W. Orr @ 2010-11-03 16:27 UTC (permalink / raw)
  To: help-gnu-emacs

People send me stuff from Outlook all the time. I sometimes want to copy some 
of the text to a file I'm editing in emacs. The text displays fine in emacs, 
but what I really want to do is to set myself up so that *funny* characters 
end up being pasted in using unicode.

I see that there's something called the nonascii-translation-table. I'm 
looking for low-hanging fruit. Has anyone already written something cool that 
translates funny characters to keep me in unibyte? Examples would be:

Open or close double quotes ==> " ( \042 )
enspace, mspace, etc        ==> ' ' ( \040 )
Funny single quotes         ==> ' ( \047 )
etc...

Anyone? Or is this a dumb idea?

Thanks.

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



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

* Re: Copying to unicode.
       [not found] <mailman.7.1288812009.12865.help-gnu-emacs@gnu.org>
@ 2010-11-03 21:34 ` Andreas Politz
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Politz @ 2010-11-03 21:34 UTC (permalink / raw)
  To: help-gnu-emacs

"Steven W. Orr" <steveo@syslang.net> writes:

> People send me stuff from Outlook all the time. I sometimes want to
> copy some of the text to a file I'm editing in emacs. The text
> displays fine in emacs, but what I really want to do is to set myself
> up so that *funny* characters end up being pasted in using unicode.
>
> I see that there's something called the
> nonascii-translation-table. I'm looking for low-hanging fruit. Has
> anyone already written something cool that translates funny characters
> to keep me in unibyte? Examples would be:
>
> Open or close double quotes ==> " ( \042 )
> enspace, mspace, etc        ==> ' ' ( \040 )
> Funny single quotes         ==> ' ( \047 )
> etc...
>
> Anyone? Or is this a dumb idea?
>
> Thanks.

Take a look at the variable `interprogram-paste-function'.  All you
really have to do is using it's value (a function) to obtain the
clipboard and return some modified string, according to your needs.

-ap


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

* Re: Copying to unicode.
  2010-11-03 16:27 Copying to unicode Steven W. Orr
@ 2010-11-07  8:35 ` Daniel Pittman
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Pittman @ 2010-11-07  8:35 UTC (permalink / raw)
  To: help-gnu-emacs

"Steven W. Orr" <steveo@syslang.net> writes:

> People send me stuff from Outlook all the time. I sometimes want to copy
> some of the text to a file I'm editing in emacs. The text displays fine in
> emacs, but what I really want to do is to set myself up so that *funny*
> characters end up being pasted in using unicode.

Gnus has "Wash Dumbquotes" in `gnus-article-treat-dumbquotes' that implements
this for email read that way.

        Daniel
-- 
✣ Daniel Pittman            ✉ daniel@rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons




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

end of thread, other threads:[~2010-11-07  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-03 16:27 Copying to unicode Steven W. Orr
2010-11-07  8:35 ` Daniel Pittman
     [not found] <mailman.7.1288812009.12865.help-gnu-emacs@gnu.org>
2010-11-03 21:34 ` Andreas Politz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.