From: Barry OReilly <gundaetiapo@gmail.com>
To: Stefan <monnier@iro.umontreal.ca>
Cc: 16818@debbugs.gnu.org
Subject: bug#16818: Acknowledgement (Undo in region after markers in undo history relocated)
Date: Wed, 19 Mar 2014 09:36:17 -0400 [thread overview]
Message-ID: <CAFM41H3iBfFjvS2KR-dQso0ST_9A3=5GLghC3-=KEV76hBJkFQ@mail.gmail.com> (raw)
In-Reply-To: <jwva9co2xs4.fsf-monnier+emacsbugs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1886 bytes --]
> The "move-after" markers will be at (+ del-pos (length
> inserted-text)) rather than at del-pos.
Right, thanks for catching that flaw.
> I'd have the same comment here, but if we emit a warning for sole
> marker-adjustments in the "non-region" code, we don't really have to
> worry about them here.
If you're saying changes under undo-make-selective-list are not
necessary, remember that currently it can create a list like:
(nil (#<marker at 141 in *scratch*> . -3) (#<marker at 190 in *scratch*>
. -3) nil (aaa . 141) nil (141 . 144) nil)
I don't think the original recipe of this bug report should generate a
warning. Rather, I had undo-make-selective-list filter out the marker
adjustments so as the above list would have (aaa . 141) at the head.
> I think we should only change the entry corresponding to a deletion
> such that it directly handles all the immediately following
> marker-adjustments
They don't always immediately follow. An integer record can be between
them. For example, at the end of the undo-test-marker-adjustment-moved
test I posted previously, buffer-undo-list is:
(nil (1 . 4) nil (abc . 1) 12 (#<marker at 7 in *temp*-216909> . -1) nil
(1 . 12) (t . 0))
Also, (t sec-high sec-low microsec picosec) entries can be in between.
eg it was easy to bring about this buffer-undo-list:
Value: (nil
(#(" " 0 3
(fontified t))
. 12)
(t 20985 26927 0 0)
(#<marker at 12 in foo.py> . -2)
(#<marker at 12 in foo.py> . -2)
(#<marker in no buffer> . -3)
(#<marker in no buffer> . -2))
I suppose some options are:
* Implement your proposal but skip over the (t ...) and integer
records
* Restructure the C code so as marker adjustments are always
immediately before deletion records
* Revisit the approach of fixing markers that move to unrelated
locations.
Let me know and thank you for your guidance.
[-- Attachment #2: Type: text/html, Size: 2406 bytes --]
next prev parent reply other threads:[~2014-03-19 13:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 22:15 bug#16818: Undo in region after markers in undo history relocated Barry OReilly
[not found] ` <handler.16818.B.13928481719895.ack@debbugs.gnu.org>
2014-02-19 23:07 ` bug#16818: Acknowledgement (Undo in region after markers in undo history relocated) Barry OReilly
2014-02-20 4:53 ` Stefan Monnier
2014-02-20 14:38 ` Barry OReilly
2014-02-24 22:46 ` Barry OReilly
2014-02-25 21:43 ` Stefan Monnier
2014-02-26 15:18 ` Barry OReilly
2014-03-11 21:24 ` Barry OReilly
2014-03-12 23:24 ` Stefan Monnier
2014-03-13 1:59 ` Barry OReilly
2014-03-13 13:24 ` Stefan Monnier
2014-03-13 14:35 ` Stefan Monnier
2014-03-13 16:55 ` Barry OReilly
2014-03-17 23:05 ` Barry OReilly
2014-03-18 0:02 ` Stefan
2014-03-19 13:36 ` Barry OReilly [this message]
2014-03-19 18:52 ` Stefan
2014-03-19 13:45 ` Barry OReilly
2014-03-19 18:56 ` Stefan
2014-03-23 22:49 ` Barry OReilly
2014-03-24 13:03 ` Stefan
2014-03-24 22:10 ` Barry OReilly
2014-03-25 1:28 ` Stefan
2014-03-25 2:32 ` Barry OReilly
2020-09-09 12:25 ` Lars Ingebrigtsen
2020-12-06 15:57 ` bug#16818: Undo in region after markers in undo history relocated Lars Ingebrigtsen
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='CAFM41H3iBfFjvS2KR-dQso0ST_9A3=5GLghC3-=KEV76hBJkFQ@mail.gmail.com' \
--to=gundaetiapo@gmail.com \
--cc=16818@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).