From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ludwig, Mark" Newsgroups: gmane.emacs.help Subject: Editing text in Emacs then pasting into something like Outlook Date: Tue, 30 Apr 2013 14:29:20 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1367332188 28050 80.91.229.3 (30 Apr 2013 14:29:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Apr 2013 14:29:48 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 30 16:29:46 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UXBYw-0004wn-4m for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Apr 2013 16:29:46 +0200 Original-Received: from localhost ([::1]:54721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXBYv-0007mS-LA for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Apr 2013 10:29:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXBYh-0007mJ-9t for help-gnu-emacs@gnu.org; Tue, 30 Apr 2013 10:29:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXBYc-0003ez-Mf for help-gnu-emacs@gnu.org; Tue, 30 Apr 2013 10:29:31 -0400 Original-Received: from usslmhub002.ugs.com ([134.244.32.85]:20587 helo=ugs.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXBYc-0003d7-IA for help-gnu-emacs@gnu.org; Tue, 30 Apr 2013 10:29:26 -0400 Original-Received: from USSLMMBX002.net.plm.eds.com (161.134.138.62) by USSLMHUB002.net.plm.eds.com (134.244.32.85) with Microsoft SMTP Server (TLS) id 14.2.318.1; Tue, 30 Apr 2013 09:29:23 -0500 Original-Received: from USSLMMBX003.net.plm.eds.com ([169.254.2.119]) by USSLMMBX002.net.plm.eds.com ([169.254.1.141]) with mapi id 14.02.0318.001; Tue, 30 Apr 2013 09:29:22 -0500 Thread-Topic: Editing text in Emacs then pasting into something like Outlook Thread-Index: Ac5FqXKlawcbhWdqSSmlJw7bWpWIHw== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [146.122.225.158] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 134.244.32.85 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90425 Archived-At: I need commands like M-a (sentence-forward) to maximize my productivity when writing large swaths of text, so use Emacs for it. I learned M-a and M-e so long ago, that sometimes my fingers will hit one of them before I realize I'm not in Emacs.... Has anyone written code to take a region or a file of plain ASCII text written in Emacs using classical block style (with paragraphs wrapped as in this e-mail) and transform it into something suitable for pasting into MS Word or Outlook as raw text? (I manually unwrap using M-^ and C-p interactively, starting at the end, backing up to the beginning.) This means two newlines before the second through Nth paragraph in my case, because I usually use extra paragraph marks to make space before the following paragraph. I'm only looking for code to "unwrap" the text; for extra credit, actually shove it into the appropriate cross-application "clipboard" buffer. (I copy the unwrapped region using M-w now.) I took a whack at rolling my own unwrap code a few years ago, but it failed in a few cases. I will ask for advice on it here if there is no better existing solution. Please let me know of existing solutions to this problem. I happen to be running Emacs on Windows, but really want a solution for all platforms, because I want this sort of thing on UNIX periodically too. Oh, one of the finer points here is dealing with sentences that end at the end of a line. (I use the traditional Emacs default, so of course, I consistently want two spaces between paragraphs.) Thanks! Mark Ludwig