From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: How to do a massive unfill paragraph operation over several hundred files? Date: Fri, 28 Sep 2018 22:04:04 -0400 Message-ID: <4ece1da8-4071-0071-7bf9-e2efb2a18ba1@mousecar.com> References: <87wor6ujdn.fsf@tu-berlin.de> Reply-To: gebser@mousecar.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538186574 18768 195.159.176.226 (29 Sep 2018 02:02:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2018 02:02:54 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 29 04:02:50 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g64an-0004n8-I1 for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 04:02:49 +0200 Original-Received: from localhost ([::1]:49061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g64cu-0001ju-7L for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Sep 2018 22:05:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g64cH-0001jo-8K for help-gnu-emacs@gnu.org; Fri, 28 Sep 2018 22:04:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g64cC-0005M3-Sp for help-gnu-emacs@gnu.org; Fri, 28 Sep 2018 22:04:21 -0400 Original-Received: from mout.perfora.net ([74.208.4.196]:45627) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g64c4-0005JT-12 for help-gnu-emacs@gnu.org; Fri, 28 Sep 2018 22:04:11 -0400 Original-Received: from [192.168.0.17] ([96.27.75.237]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0M6Cey-1fptVP1d18-00y5ky for ; Sat, 29 Sep 2018 04:04:05 +0200 Original-Received: from [192.168.0.17] ([96.27.75.237]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0M6Cey-1fptVP1d18-00y5ky for ; Sat, 29 Sep 2018 04:04:05 +0200 Openpgp: preference=signencrypt Autocrypt: addr=gebser@mousecar.com; prefer-encrypt=mutual; keydata= xsDiBFEDAcwRBACNBKoSAi2xQe3Q5KhOEhVxxbDNHymWmd/Z1nGwNMrhKA7z2TluQRtoO06H C1bsb/ztMARJG3XMcVj1cdiBP0MaOhJwlUG9WPEWe1J4jsYkJah6Zq09S2TOftxOW960iAel 4ZkxxwglMudvGENKok3UHzS+frk5tA5u7wm9vPMKcwCg9D+lwv8XIdA9CqyK9cVAZ+HnpAMD /j/nY6Pdpg+yQm9GW8/nk3SlYOr0mwVRoVJEdz7czLCq0gq2Shz05Y4eHONlgosso0YydkNV vY/cLHfeW8Q47kd/lP04n6TMsJbC70o5TChSF+0VwuAEgUUoaWh0yMgVl4+a9kq9A4xAYIcV b81eDbeCdyAf/yakM6/ANfQqsOIAA/9HcjHO27AkGvRuxU/T/3Mzq93TmqphlIiXsGwsVBdJ BMDMw4oQ2T4eB+aHZdekeuPMeiDt05bPthleRA0ffGxTIfxpgOQI/E5+X0Ip0RZo7kKcV5xc aFK2xITo1Kj8g7wLw3V6ixu4BUz8TyZhy68aDlmlikwiHOCkNPc/0uAbfc08a2VuICg1Ni0z MDMzKSAoaW4gY2hpbGx5IENsZXZlbGFuZCkgPGNvdXNpbkBuZXdjdWx0dXJlcy5jb20+wmYE ExECACYFAlEDAcwCGwMFCQ0oaIAGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRB3pitxDI9d TWFMAJ9FlACq35IUNpW+OoWnmIaM9EaZZgCfct4gpxKVOdA4uxQIfcaaciXzLF/Ow00EUQMF 4xAQAObCzo+yOxQk In-Reply-To: <87wor6ujdn.fsf@tu-berlin.de> Content-Language: en-US X-Provags-ID: V03:K1:jepht3geneMT1jA7IIn1+iZdaw3t/bPZIeaYI5PCnQxVlSXPowU OL6+MaOOF6D1NFa6AAE1gIBWUsTu0l3ZSKiPSENeLK/rlT4gauMRmDRneuNYFpXYfpXGb/4 NvPK6SS325QatnJaJu9f/8g5fu4fKvLgvnzUbLGcfB2hauHX2yC6LcTt1GLLOh5eSR/lI46 FDtmegWuhm3cz8sqvyxnA== X-UI-Out-Filterresults: notjunk:1;V01:K0:O2iTjt2eEqs=:9P43e57MEH+0103TAzZz9t 6k400UtlNK+1EmNPXSdFbuNeOW3ISzNHOgl/4nB2gskagwSTmhJXcKlEq/8D0rgSSl5UvVKWd U1xk5bQsg2WWxYgIz7TLffet9hwtgtKEf9guiD3alkfuLwbzz0SV23X2vNGP5IyXQvH8Z39nB MTAFnYSayaOqFB/C86ZL61dqPgJ5e8jf81/hKF7do4YI65RuqA3+FAYzlBQ9JrsG5gsFiByFM 48rxT3jnOmcGUKXZYQIx0KlH0c+rkxWgSsangHx6XZyHT8TSkyc6ZyzAMsqogs/U0FBeeFwSP Uxh2DkozGhdOw0ImCABCiTVy7fcGYtNm09+kMWLs3+IrpXMMVTpEMvCbNjLnmt1GxkD7YQ0i4 tlq/i0J65wqEHAxyVzSuUN4w6RKFXoMJreiBZ4IvjNRd2RSo2H+b3DLPkeS/Dx6jTrRmY+9AX RAPcc0rrudgk75p5TbTFpbDv53f5pN4mv0n07M3UxDqkVcWPB139kZhsCAvx08oO5Ipb8t/gV vCNj+cRpwYqjFbLlxHRusc3Z+NWwEj9+WyNfRMSSp/z5zgvsrsLCpfQpEsDCKI5hnDW21RTC1 agA/GHGvapAOgL9s+R7qZoupPXpW6VctQIBd4qr3F75bxBcMW6R7n9bvY1a0XQDIm9f2nQnUi eUlMF+Rh43aZbuVPHLNME1pgaNh/zGLnJzU0mMaCWoYMQfh6l6Or2TIepB9t9d+ySLIZUZMKx qvNEpoRv01hku5nr X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 74.208.4.196 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:118061 Archived-At: On 09/28/2018 04:16 AM, Gerald Wildgruber wrote: > Hi > > emacs (latest git checkout, on linux) and org-mode are my main environm= ent for doing (natural language) text related work. > > Recently I changed the way text is processed and stored: > > I no longer use hard coded line breaks introduced automatically at fill= -column with auto-fill-mode enabled; > > instead I now use visual-line-mode together with visual-fill-column mod= e to break lines only VISUALLY at fill-column: there are no real hard-cod= ed line breaks in the file, each paragraph is just one long line. > > I would like to harmonize all my existing Org mode and LaTeX text files= in this way, i.e.: "unfill" every paragraph within them, -- while ideall= y preserving Org mode constructs like lists, BEGIN/END blocks etc. > > MY QUESTION: What would be a good way to AUTOMATE such an unfill operat= ion, removing all line breaks from all paragraphs over a large number of = files? > > > Thanks > > Gerald. Gerald, It's been decades since I messed with it, but as I vaguely recall there's a batch mode for emacs.=C2=A0 Basically, you call emacs from the command line with the "--batch" and other options ("--script [file_containing_elisp]").