unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andreas Politz <politza@fh-trier.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Copying to unicode.
Date: Wed, 03 Nov 2010 22:34:35 +0100	[thread overview]
Message-ID: <877hguqefo.fsf@fh-trier.de> (raw)
In-Reply-To: mailman.7.1288812009.12865.help-gnu-emacs@gnu.org

"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


       reply	other threads:[~2010-11-03 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7.1288812009.12865.help-gnu-emacs@gnu.org>
2010-11-03 21:34 ` Andreas Politz [this message]
2010-11-03 16:27 Copying to unicode Steven W. Orr
2010-11-07  8:35 ` Daniel Pittman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hguqefo.fsf@fh-trier.de \
    --to=politza@fh-trier.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).