all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Martin Stjernholm <mast@lysator.liu.se>
Cc: emacs-devel@gnu.org
Subject: Re: gratuitous changes
Date: 10 Feb 2003 01:29:22 +0100	[thread overview]
Message-ID: <5badh5q8pp.fsf@lister.roxen.com> (raw)
In-Reply-To: <20030206172231.GA32231@gnu.org>

Miles Bader <miles@gnu.org> wrote:

> > It uses after-change-functions, post-command-hook, first-change-hook
> > and write-contents-hooks. What's the problem with that?
> 
> It slows down editing. /.../

I took care to ensure that they run very fast in the normal case. In
the most common case, i.e. when there has been no preceding
modification, the post-command-hook function only does a single test
of a variable. When there has been a change the overhead still is
negligible compared to on-the-fly font locking. I don't think it's an
issue even on low end systems.

> Suppose some hook wrapped all the text in a visited file with an appropriate
> `modification-hooks' property, which would simply remove itself from any
> lines that were modified.  Then the file-write-time hook could scan through
> and only remove line-ending whitespace from lines that aren't wrapped by that
> property.

That's an alternative. I can see one problem with it: It's not
possible to avoid trimming of multiline edits, e.g. when blocks are
yanked. In my ws-trim package that's configurable.

Besides, the trimming wouldn't take place interactively. Whether
that's a drawback or a feature is of course a matter of taste. I like
the interactive way since it minimizes the experience of the extra
whitespace, i.e. edit a line, leave it, go back again and it'll
already be nice and tidy.

  reply	other threads:[~2003-02-10  0:29 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31 21:48 gratuitous changes Stefan Monnier
2003-01-31 22:16 ` Andreas Schwab
2003-01-31 22:51   ` John Wiegley
2003-01-31 23:01 ` Juanma Barranquero
2003-02-01  0:00   ` Stefan Monnier
2003-02-01  6:51     ` Robert Anderson
2003-02-03 15:09       ` Stefan Monnier
2003-02-03 16:20         ` Robert Anderson
2003-02-01  9:54     ` Juanma Barranquero
2003-02-01  2:11 ` Miles Bader
2003-02-01 18:44   ` Bill Wohler
2003-02-01 22:11 ` Richard Stallman
2003-02-01 23:28   ` Martin Stjernholm
2003-02-02  5:52     ` Eli Zaretskii
2003-02-02  6:14       ` Miles Bader
2003-02-06 16:34         ` Martin Stjernholm
2003-02-06 17:22           ` Miles Bader
2003-02-10  0:29             ` Martin Stjernholm [this message]
2003-02-03 14:57     ` Stefan Monnier
2003-02-02  5:56 ` Eli Zaretskii
2003-02-02 12:56   ` Juanma Barranquero
2003-02-02 13:59   ` Kim F. Storm
2003-02-03 13:01     ` Richard Stallman
2003-02-03 14:11       ` Juanma Barranquero
2003-02-03 14:54         ` Stefan Monnier
2003-02-03 15:01           ` Juanma Barranquero
2003-02-04 14:59       ` Juanma Barranquero
2003-02-04 16:09         ` Robert Anderson
2003-02-04 16:44           ` Juanma Barranquero
2003-02-04 17:14             ` Robert Anderson
2003-02-04 17:22               ` Juanma Barranquero
2003-02-04 19:46         ` Eli Zaretskii
2003-02-04 20:16           ` Juanma Barranquero
2003-02-04 20:22             ` Stefan Monnier
2003-02-04 20:44               ` Nick Roberts
2003-02-04 22:59                 ` Edward O'Connor
2003-02-04 23:19                   ` Juanma Barranquero
2003-02-05  0:32                   ` Kim F. Storm
2003-02-05  0:39                     ` Kim F. Storm
2003-02-05  0:49                       ` Kenichi Handa
2003-02-05  4:24                     ` Luc Teirlinck
2003-02-05  4:51                       ` Miles Bader
2003-02-06  2:42                   ` Richard Stallman
2003-02-06  4:09                     ` Luc Teirlinck
2003-02-07  9:18                       ` Richard Stallman
2003-02-04 23:18                 ` Juanma Barranquero
2003-02-05  0:42                   ` Stefan Monnier
2003-02-05  6:03                 ` Eli Zaretskii
2003-02-06  2:42                 ` Richard Stallman
2003-02-06  2:54                   ` Luc Teirlinck
2003-02-04 23:14               ` Juanma Barranquero
2003-02-05  6:01             ` Eli Zaretskii
2003-02-05  8:18               ` Juanma Barranquero
2003-02-05 15:30                 ` Eli Zaretskii
2003-02-14 22:56                   ` Thien-Thi Nguyen
2003-02-05  0:14         ` Richard Stallman
2003-02-07 14:02 ` Francesco Potorti`
2003-02-10  1:47   ` Miles Bader
2003-02-10 10:09     ` Francesco Potorti`

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=5badh5q8pp.fsf@lister.roxen.com \
    --to=mast@lysator.liu.se \
    --cc=emacs-devel@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.