From: phillip.lord@russet.org.uk (Phillip Lord)
To: Eli Zaretskii <eliz@gnu.org>
Cc: Markus Triska <triska@metalevel.at>, 23906@debbugs.gnu.org
Subject: bug#23906: 25.0.95; Undo boundary after process output is not consistent
Date: Mon, 11 Jul 2016 12:45:42 +0100 [thread overview]
Message-ID: <87h9bw5rfd.fsf@russet.org.uk> (raw)
In-Reply-To: <83r3b6lih2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 06 Jul 2016 21:38:49 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Markus Triska <triska@metalevel.at>
>> Date: Wed, 06 Jul 2016 19:56:30 +0200
>>
>> 7) Now the point: *Most* of the time, after undo, the buffer is exactly
>> as it was before. But sometimes, about 1 out of 7 times, after undo
>> is pressed, the characters "%@ " remain at the end of the buffer:
>>
>> %?- time(ceiled_square_root(2^10000, R)).
>> %@
>>
>> These three characters ("%@ ") are inserted by ediprolog before
>> receiving process output, and in most cases removed after the undo.
>>
>> The issue in this case is not so much that the %@ appears in the buffer,
>> but that it is not handled consistently. Most often (and preferably), a
>> single undo removes both the process output _and_ the %@, but sometimes
>> a single undo removes *only* the process output, and the %@ remains. The
>> behaviour I desire is that C-/ consistently removes everything that was
>> inserted in direct sequence, both the "%@ " _and_ the process output.
>
> Given the fact that (AFAIU) undo for subprocesses is caught by code
> that runs off a timer, isn't the above expected? Phillip?
Assuming that ceiled_square_root takes a significant length of time
(10/7 seconds in this case!), yes, I think this is the case.
I assume that the %@ is inserted first before the process is started,
then the results put in after the results come back? This would mean
that after the insertion of %@ there would be no undo-boundary.
You could check by adding %@ immediately before you insert data from
prolog, rather than after you send data to it. To me, this makes more
sense -- you are adding text over an elongated period (i.e. during the
evaluation) without the expectation of an undo boundary. Likewise,
forcing an undo-boundary immediately after %@ would give you consistent
behaviour (although different).
There are a number of fixes we could make for this in the undo system.
I could check for the size of the last undo, before forcing an
undo-boundary. Or, we could add an option to suppress the timer in a
specific buffer; although, this would add the possibility of
out-of-memory if it's not turned on again.
In this case, though, I am inclined toward suggesting changing
ediprolog.el.
Phil
next prev parent reply other threads:[~2016-07-11 11:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 17:56 bug#23906: 25.0.95; Undo boundary after process output is not consistent Markus Triska
2016-07-06 18:38 ` Eli Zaretskii
2016-07-11 11:45 ` Phillip Lord [this message]
2016-07-11 13:54 ` Markus Triska
2016-07-12 16:29 ` Phillip Lord
2016-07-12 17:03 ` Stefan Monnier
2016-07-12 18:56 ` Markus Triska
2016-07-12 20:22 ` Stefan Monnier
2016-07-12 21:02 ` Markus Triska
2016-07-12 21:20 ` Stefan Monnier
2016-07-12 22:35 ` Markus Triska
2016-07-12 22:51 ` Stefan Monnier
2016-07-12 22:45 ` Markus Triska
2016-07-13 22:12 ` Phillip Lord
2016-07-14 8:34 ` Markus Triska
2016-07-14 13:33 ` Phillip Lord
2016-07-14 15:10 ` Markus Triska
2016-07-14 20:25 ` Phillip Lord
2016-07-14 22:12 ` Stefan Monnier
2016-07-18 4:18 ` Stefan Monnier
2016-07-18 19:03 ` Markus Triska
2016-07-19 0:41 ` Stefan Monnier
2016-07-19 1:05 ` Stefan Monnier
2016-07-24 15:45 ` Phillip Lord
2016-07-24 21:36 ` Stefan Monnier
2020-09-04 13:55 ` Lars Ingebrigtsen
2016-07-13 8:09 ` Phillip Lord
2016-07-13 14:29 ` Markus Triska
2016-07-13 22:23 ` Phillip Lord
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=87h9bw5rfd.fsf@russet.org.uk \
--to=phillip.lord@russet.org.uk \
--cc=23906@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=triska@metalevel.at \
/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.