help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Operating on yanked region


From: Karl Voit
Subject: Operating on yanked region
Date: Wed, 18 May 2016 13:07:12 +0200
User-agent: slrn/pre1.0.0-18 (Linux)

Hi!

When I paste text from a Windows application to my Emacs (running
mainly Org-mode), I get wrong charset.

For correcting such wrong character sets, I want to write a function
that corrects the charset. Additionally, I want to add some
search&replace stuff to convert Outlook-list items to Org-mode list
items.

So this is, what I want to achieve:

  1. clipboard-yank
  2. operate following things on the yanked region:
     1. recode-region (from mule.el)
        - from: windows-1252
        - to: latin-1
     2. replace list items
     3. replace enum items
     4. paste from clipboard

How can I work with the newly yanked region after clipboard-yank?

With a construct I named "with-region" the structure should follow following
concept:

(defun my-convert-windows-region ()
  (with-region (clipboard-yank)
     (recode-region ...)
     (string-replace ...)
     (string-replace ...)
  )
)

How can I accomplish this with Elisp in reality?

-- 
All in all, one of the most disturbing things today is the definitive
fact that the NSA, GCHQ, and many more government organizations are
massively terrorizing the freedom of us and the next generations.
                                                  http://Karl-Voit.at




reply via email to

[Prev in Thread] Current Thread [Next in Thread]