all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 66738@debbugs.gnu.org
Subject: bug#66738: 30.0.50; Gud LLDB regressions
Date: Wed, 25 Oct 2023 11:40:40 +0200	[thread overview]
Message-ID: <A5B41924-6DF8-4C5C-8778-AA56570C5B7F@gmail.com> (raw)
In-Reply-To: <m2v8av137p.fsf@Pro.fritz.box>

25 okt. 2023 kl. 11.06 skrev Gerd Möllmann <gerd.moellmann@gmail.com>:

> ...I'll fix this myself, thank you.
> 
> Yeah, I did that. But it seems I have misinterpreted what the intention
> of the delete-region is.

The gist of it is that lldb uses CHA and ED as follows:

  "previous line\nsome text" (CHA N) (ED) "something else"

where (CHA N) repositions the cursor to column N, which is usually somewhere inside "some text", and (ED) clears the rest of the text on the line.

This means that if the current line, "some text", is M characters long, then we can simply delete the last M-N characters and remove the CHA and ED sequences which now have done their job, and continue processing.

The snag is that part of "some text" may have already been inserted into the buffer earlier and is thus not part of the current string being filtered. For that reason, we start by removing that part from the buffer and gluing it onto the front of our string so that the CHA and ED operations can act on it.

That text deleted from the buffer may have been write-protected but that's fine; it will be protected again next time it's inserted.

> Then let me ask differently: why did you change this in the first place?

You mean why I didn't use a series of forward slashes as end-delimiter for the full path name? It seemed no less arbitrary than a newline and no more robust. The current solution is straightforward and handles any Unix or Windows file name users will come across.

I did try out NUL as a delimiter but predictably this didn't work (lldb threw an exception, actually).






  reply	other threads:[~2023-10-25  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25  4:24 bug#66738: 30.0.50; Gud LLDB regressions Gerd Möllmann
2023-10-25  8:32 ` Mattias Engdegård
2023-10-25  9:06   ` Gerd Möllmann
2023-10-25  9:40     ` Mattias Engdegård [this message]
2023-10-25 14:02       ` Gerd Möllmann
2023-10-25 14:23         ` Mattias Engdegård

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=A5B41924-6DF8-4C5C-8778-AA56570C5B7F@gmail.com \
    --to=mattias.engdegard@gmail.com \
    --cc=66738@debbugs.gnu.org \
    --cc=gerd.moellmann@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 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.