all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: rocky <rocky@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Is there a package which uses markers to guess how to remap line numbers?
Date: Thu, 19 Nov 2009 18:10:02 -0800 (PST)	[thread overview]
Message-ID: <9f511283-d915-434b-b18b-a4546a008d16@d21g2000yqn.googlegroups.com> (raw)
In-Reply-To: icaayih6yv.fsf@verizon.net

On Nov 19, 10:25 am, des...@verizon.net wrote:
> rocky <ro...@gnu.org> writes:
> > I am writing a package (an interface to debuggers) that sets markers
> > on various lines (e.g. the lines at which the debugger stops at). Over
> > time, the buffer (source code) can change and the markers move around
> > with that. This is good.
>
> > Is there however a package which will suggest after buffer
> > modification how a particular line number might have changed given the
> > existingmarkerinformation and associated line number information for
> > that buffer?
>
> > Here is a concrete example. Let's say I have a buffer with amarkerat
> > lines 1, 5, 10 and 20. Let's say themarkerfor 10 moves to line 11
> > after modification but not the one for 1, 5 or 20.
>
> > If I ask about lines in the range 2-4, I may warn that overall the
> > buffer has changed but possibly not the one in that range. Of course
> > if I ask about lines 1, 5, or 20, I can warn that although the buffer
> > has changed, (parts of) those lines haven't. If I ask about a line in
> > the range 6-19 I can suggest there may be a move ahead a line with
> > more certainty of line 10.
>
> > Has anyone thought about this problem. Does such a package exist or
> > has anything like this been done as part of an existing package?
>
> Part of the compile package does something like that.
> As you do "next-error" it accounts for any fixes you may have made
> for previous errors.

Thanks for the suggestion.

I looked at compile.el. It seems to be to parse all of the error
messages in the compilation buffer and set markers for each of those
locations referred to. That is why it can track edits.

The difference here is that we are interactive, so I don't know in
advance all of the lines that might be stopped at.

Assuming a debugger that only reports line positions and nothing finer
grained, I could set marks at every line in the file, or better sets
marks at every stoppable line in the file (i.e. the lines that you can
set a breakpoint on). However I suspect that will be too slow and/or
use lots of memory.

But perhaps not - we'll see.


  reply	other threads:[~2009-11-20  2:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 13:02 Is there a package which uses markers to guess how to remap line numbers? rocky
2009-11-19 15:25 ` despen
2009-11-20  2:10   ` rocky [this message]
2009-11-19 15:39 ` Scott Frazer
2009-11-20  2:23   ` rocky

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=9f511283-d915-434b-b18b-a4546a008d16@d21g2000yqn.googlegroups.com \
    --to=rocky@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.