From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Landscheidt Newsgroups: gmane.emacs.help Subject: Re: Automatic shell CR escape \ alignment Date: Sat, 29 Oct 2011 00:53:50 +0000 Organization: Message-ID: References: <20111028213938.GQ23445@tracyreed.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1319849654 18331 80.91.229.12 (29 Oct 2011 00:54:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2011 00:54:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 29 02:54:10 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RJxBa-0000lK-32 for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 02:54:10 +0200 Original-Received: from localhost ([::1]:50453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJxBZ-0000N5-Iq for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2011 20:54:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJxBV-0000Mx-GK for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 20:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJxBU-0006Hf-CO for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 20:54:05 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:52168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJxBU-0006HX-0N for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 20:54:04 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RJxBT-0000iN-94 for help-gnu-emacs@gnu.org; Sat, 29 Oct 2011 02:54:03 +0200 Original-Received: from g224126142.adsl.alicedsl.de ([92.224.126.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Oct 2011 02:54:03 +0200 Original-Received: from tim by g224126142.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Oct 2011 02:54:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 23 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: g224126142.adsl.alicedsl.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:b/F+Gn7Sby5EgcnT0asfva06M/I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:82695 Archived-At: Tracy Reed wrote: > When doing something like: > command -option1 reallylongargument \ > -option2 evenlongerargumentfoo \ > -option3 oddlengthreallylongargument \ > -option4 reallylongargument \ > I really like to keep my code to 80 columns and line up those line-ending > escape slashes so it looks neat. A few years ago someone showed me a really > cool trick to be used when making shell scripts tidy: When in shell mode you > could do something such that it would handle the column of \ in a special way and > always keep them lined up and move them all in or out together whenever the > length of the longest line changed. I have forgotten how it was done. Anyone > know? The basic concept is handled by align.el and there, appar- ently, by basic-line-continuation. I don't know what custom- izations you need for shell scripts, though (I usually pre- fer manually calling align-regexp). Tim