all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Automatic shell CR escape \ alignment
Date: Sat, 29 Oct 2011 00:53:50 +0000	[thread overview]
Message-ID: <m3aa8kzkgx.fsf@passepartout.tim-landscheidt.de> (raw)
In-Reply-To: 20111028213938.GQ23445@tracyreed.org

Tracy Reed <treed@edirectpublishing.com> 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




      reply	other threads:[~2011-10-29  0:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 21:39 Automatic shell CR escape \ alignment Tracy Reed
2011-10-29  0:53 ` Tim Landscheidt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3aa8kzkgx.fsf@passepartout.tim-landscheidt.de \
    --to=tim@tim-landscheidt.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.