all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Operating on yanked region
@ 2016-05-18 11:07 Karl Voit
  2016-05-18 11:30 ` Yuri Khan
  2016-05-18 17:59 ` Eli Zaretskii
  0 siblings, 2 replies; 16+ messages in thread
From: Karl Voit @ 2016-05-18 11:07 UTC (permalink / raw
  To: help-gnu-emacs

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




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

end of thread, other threads:[~2016-06-09 12:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 11:07 Operating on yanked region Karl Voit
2016-05-18 11:30 ` Yuri Khan
2016-05-18 12:13   ` Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region) Karl Voit
2016-05-18 12:31     ` tomas
2016-05-18 15:53       ` Karl Voit
2016-05-18 18:14         ` Eli Zaretskii
2016-05-18 20:30           ` Karl Voit
2016-05-19  4:28             ` Eli Zaretskii
2016-05-19  8:38         ` tomas
2016-06-09 10:10           ` Karl Voit
2016-06-09 10:18             ` tomas
2016-05-18 13:25     ` Yuri Khan
2016-05-18 18:02   ` Operating on yanked region Eli Zaretskii
2016-05-18 17:59 ` Eli Zaretskii
2016-06-09  9:43   ` Karl Voit
2016-06-09 12:33     ` Eli Zaretskii

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.