emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Bastien <bzg@gnu.org>, Martin Pohlack <mp26@os.inf.tu-dresden.de>,
	Toby Cubitt <tsc25@cantab.net>,
	11774@debbugs.gnu.org
Subject: bug#11774: bug#11774: bug#11774: org-mode causes undo boundaries to be lost
Date: Tue, 3 Jul 2012 11:13:07 -0700	[thread overview]
Message-ID: <CAJcAo8t4wj-8mje2=QEKY275QXyxwkotBCftZmOVQZAsMAt7Hg__43119.075932964$1341339649$gmane$org@mail.gmail.com> (raw)
In-Reply-To: <jwvpq8coitq.fsf-monnier+emacs@gnu.org>

On 7/3/12, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Indeed, self-insert-command used to be treated specially by the
> read-eval-loop and the merging was performed there.  Now this command is
> handled like any other, and self-insert-command does the merging itself.
> In most cases the result is the same, but the behavior is not quite
> identical in the details.

Here is the way I understand it:

There are two problems with self-insert-command now, while before
there was only one.

The first is that it hardcodes the clustering by 20.  As it happens, I
strongly prefer clustering by 1.  That is, I do not want undo to jump
around or type more than necessary.  I just want to autorepeat undo
(C-/) until I get to where I need to be.  Otherwise it is far too
jerky and unpredictable and you have to type more either to delete (if
you didn't undo far back enough) or add (if you undid too far).

This was possible to work around before Emacs 24.  You could advise
self-insert-command or wrap it.  This is why Org was able to control
this with a variable to support clustering or not clustering.

What is new in Emacs is that self-insert-command now destroys
undo-boundary.  If you wrap it, it destroys all of your effort on the
next call to it.  This causes subtle issues such as Org and undo-tree
are dealing with.

It is not reasonable to work around this because of the extra
functionality you need to implement (especially if you want Org to do
speed commands, table operations, and tag padding, which, who
doesn't?).

Unlike before, changing a hardcoded number or undo-boundary and then
recompiling Emacs is necessary if you want to fix it.  :(

The loss of this ability to configure the cluster amount, and the
subtle bug introduced, IMO merit a reversion or a fix to Emacs
self-insert-command.  Even just turning that magic 20 number into a
variable would help.

At least that's my understanding.  I am just a user and I am not
familiar with the internals.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

  reply	other threads:[~2012-07-03 18:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120703095729.GA6651@c3po>
2012-07-03 15:18 ` bug#11774: bug#11774: org-mode causes undo boundaries to be lost Martin Pohlack
     [not found] ` <4FF30D50.8010009@os.inf.tu-dresden.de>
2012-07-03 17:29   ` Stefan Monnier
2012-07-03 18:13     ` Samuel Wales [this message]
     [not found]     ` <CAJcAo8t4wj-8mje2=QEKY275QXyxwkotBCftZmOVQZAsMAt7Hg@mail.gmail.com>
2012-07-03 22:57       ` bug#11774: " Stefan Monnier
     [not found]       ` <jwvfw984ftk.fsf-monnier+emacs@gnu.org>
2012-07-04  0:18         ` Samuel Wales
     [not found]         ` <CAJcAo8ujDHZU2xiPh8hnaXgO1m_-cf2tcA6B_LWj-3YczJRzAA@mail.gmail.com>
2012-07-04  0:24           ` bug#11774: " Samuel Wales
2012-07-04  9:40           ` Toby Cubitt
2012-07-18 13:21           ` Stefan Monnier
2012-08-01 14:26             ` Bastien
     [not found]             ` <CAJcAo8ux9Dw5Nu6x0jm59mWFaLWFG6SSeMs9dju-Jgy5nWkUcA@mail.gmail.com>
2014-11-03 14:35               ` Stefan Monnier
     [not found] <20120624212755.GA14501@c3po.home>
     [not found] ` <20120624215241.GA6205@c3po.home>
2012-06-25 11:35   ` Toby Cubitt
     [not found] ` <4FF14504.10609@os.inf.tu-dresden.de>
2012-07-03  9:57   ` bug#11774: " Toby Cubitt
     [not found] ` <20120625113529.GA15913@c3po.home>
2012-07-02  6:51   ` Martin Pohlack
2012-07-03 18:33   ` Martin Pohlack
2014-11-03 19:25 ` bug#11774: Emacs 24.3: newline-and-indent has two undo boundaries Samuel Wales

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.orgmode.org/

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

  git send-email \
    --in-reply-to='CAJcAo8t4wj-8mje2=QEKY275QXyxwkotBCftZmOVQZAsMAt7Hg__43119.075932964$1341339649$gmane$org@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=11774@debbugs.gnu.org \
    --cc=bzg@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=mp26@os.inf.tu-dresden.de \
    --cc=tsc25@cantab.net \
    /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/org-mode.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).