From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: How to do a massive unfill paragraph operation over several hundred files? Date: Sat, 29 Sep 2018 13:32:48 +0200 Organization: Aioe.org NNTP Server Message-ID: <8636ts4jz3.fsf@zoho.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538220825 14192 195.159.176.226 (29 Sep 2018 11:33:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2018 11:33:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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 13:33:40 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 1g6DVE-0003ZU-HP for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 13:33:40 +0200 Original-Received: from localhost ([::1]:50434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6DXK-0001YR-Uc for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Sep 2018 07:35:50 -0400 X-Received: by 2002:adf:9ae5:: with SMTP id a92-v6mr230979wrc.16.1538220769060; Sat, 29 Sep 2018 04:32:49 -0700 (PDT) Original-Path: usenet.stanford.edu!q200-v6no2492328wmd.0!news-out.google.com!z184-v6ni8862wmz.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: onLrbz09yV+MU3RaxdbMkg.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org Cancel-Lock: sha1:6Y5iKMWjEbsdfjwnivA+0bU2NBc= X-Notice: Filtered by postfilter v. 0.8.3 Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:223936 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:118062 Archived-At: Gerald Wildgruber wrote: > MY QUESTION: What would be a good way to > AUTOMATE such an unfill operation, removing all > line breaks from all paragraphs over a large > number of files? Script to insert a string into files 1, 2, and 3: #! /bin/zsh local script=do-this.el emacs -Q --batch --script $script 1 2 3 Elisp to do it: ;; do-this.el (dolist (f argv) (find-file f) (insert "Sail Ho!") ; do your thing here (save-buffer) ) -- underground experts united http://user.it.uu.se/~embe8573