From: John Yates <john@yates-sheets.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>,
"Emacs developers" <emacs-devel@gnu.org>
Subject: Re: Electric indentation sub-optimality and resolution
Date: Thu, 18 Dec 2014 19:43:12 -0500 [thread overview]
Message-ID: <CAJnXXohac+45BQ9j0mkMVX=+VgKC+_bofCozvehoCByVTL2avw@mail.gmail.com> (raw)
In-Reply-To: <86388chgci.fsf@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]
On Thu, Dec 18, 2014 at 3:07 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> Personally, I like this lighter-weight approach:
>
> https://github.com/purcell/whitespace-cleanup-mode
In my case I have show-trailing-whitespace set and my trailing-whitespace
face is "red3". That made it very painful to insert blank lines in the
presence of cc-mode's new electric indentation, even when some other
mechanism / package / mode ultimately was going to clean things up
(assuming I saved the file). Until I did a save my new electric whitespace
messes were "in my face".
Steve Purcell's approach works only if one's file is pristine. Prior to
the introduction of electric indentation I had no need of such a package: I
was careful not to introduce inappropriate whitespace. But since I
regularly have to work on files where other people have been less
fastidious Steve's package would not clean these electric whitespace messes.
I actually really like the behavior of the code I posted. It has an added
small bonus. Normally it does not cleanup pre-existing whitespace. When I
modify a line with trailing whitespace it does cleanup that one line,
something my projects' guidelines allow.
/john
[-- Attachment #2: Type: text/html, Size: 1734 bytes --]
next prev parent reply other threads:[~2014-12-19 0:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 16:19 Electric indentation sub-optimality and resolution John Yates
2014-12-18 18:34 ` Óscar Fuentes
2014-12-18 19:13 ` Stefan Monnier
2014-12-18 19:40 ` Óscar Fuentes
2014-12-18 20:07 ` Dmitry Gutov
2014-12-19 0:43 ` John Yates [this message]
2014-12-19 1:08 ` Óscar Fuentes
2014-12-21 0:36 ` Le Wang
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJnXXohac+45BQ9j0mkMVX=+VgKC+_bofCozvehoCByVTL2avw@mail.gmail.com' \
--to=john@yates-sheets.org \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=ofv@wanadoo.es \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).