unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29118@debbugs.gnu.org, vianchielfaura@gmail.com
Subject: bug#29118: 25.2.50; Undoing shell flush output results in weird state
Date: Sat, 11 Nov 2017 21:12:30 -0500	[thread overview]
Message-ID: <87bmk82qk1.fsf@users.sourceforge.net> (raw)
In-Reply-To: <83y3nepn9l.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 10 Nov 2017 10:10:30 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> debugging undo-list stuff is kind of a pain.
>
> Why is that a pain?

Just from this very simple recipe, buffer-undo-list contains all of this
(assuming you made no mistakes typing it in, it's unclear to me how to
reproduce it non-interactively).  And I find it pretty difficult to
interpret buffer positions in my head.  So interpreting what all the
element means is ... a pain.

(nil
 (22 . 25)
 (22 . 35)
 (#("*** output flushed ***
~/src/emacs$ " 0 23
 (fontified t front-sticky #1=(field inhibit-line-move-field-capture)
	    rear-nonsticky t field output inhibit-line-move-field-capture t)
 23 36
 (font-lock-face
  (comint-highlight-prompt)
  inhibit-line-move-field-capture t field output rear-nonsticky t front-sticky #1# fontified nil))
   . 22)
 (#<marker at 38 in *shell*> . -36)
 (#<marker at 22 in *shell*> . -36)
 (#<marker at 22 in *shell*> . -23)
 (#<marker at 22 in *shell*> . -36)
 (nil font-lock-face
      (comint-highlight-prompt . #2=(comint-highlight-prompt))
      45 . 58)
 nil
 (nil font-lock-face #2# 45 . 58)
 (22 . 58)
 (#("~/src/emacs$ " 0 13
    (fontified nil front-sticky
	       (field inhibit-line-move-field-capture)
	       rear-nonsticky t field output inhibit-line-move-field-capture t font-lock-face
	       (comint-highlight-prompt)))
   . -22)
 (#<marker at 38 in *shell*> . -13)
 (#<marker at 22 in *shell*> . -13)
 (#("hi
" 0 3
(fontified t front-sticky
	   (field inhibit-line-move-field-capture)
	   rear-nonsticky t field output inhibit-line-move-field-capture t))
   . -22)
 38 nil
 (nil font-lock-face nil 25 . 38)
 (21 . 38)
 (#("echo hi" 0 7
    (fontified nil))
   . 14)
 (#<marker at 38 in *shell*> . -7)
 (21 . 28)
 nil
 (14 . 21)
 nil
 (nil font-lock-face nil 1 . 14)
 (1 . 14)
 (t . 0))

> What can we do to make its debugging experience better?

Some way of visualizing the effect of undo list elements.  A way to
replay and rewind without affecting the undo list.

Implementing such a thing would probably be pretty difficult.  I have
some crude visualization for markers in yasnippet-debug.el (in GNU
ELPA).





  reply	other threads:[~2017-11-12  2:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 21:25 bug#29118: 25.2.50; Undoing shell flush output results in weird state Allen Li
2017-11-10  1:26 ` Noam Postavsky
2017-11-10  8:10   ` Eli Zaretskii
2017-11-12  2:12     ` Noam Postavsky [this message]
2017-11-12  4:47       ` Eli Zaretskii
2017-11-26 19:59       ` bug#29461: Wishlist: better facilities for debugging undo problems Noam Postavsky
2017-11-11  7:20   ` bug#29118: 25.2.50; Undoing shell flush output results in weird state Allen Li
2017-11-12 18:30     ` Noam Postavsky
2017-11-13  8:29       ` Allen Li
2017-11-13 13:26       ` Stefan Monnier
2017-11-15 13:05         ` Noam Postavsky

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=87bmk82qk1.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=29118@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=vianchielfaura@gmail.com \
    /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).