unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
@ 2016-05-06 17:21 Paul Pogonyshev
  2019-10-20 10:41 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Pogonyshev @ 2016-05-06 17:21 UTC (permalink / raw)
  To: 23470

When I re-evaluate (C-M-x) a function definition that has breakpoints,
all of them are lost. This is particularly annoying when breakpoints
are conditional, because now I not only have to recreate them
manually, but also specify all the conditions again.

Request: preserve existing breakpoints within definitions where
possible. One idea suggested on the devel list is to assign a marker
to each breakpoint and recreate it at the new marker position when
re-evaluating, as long as marker is not deleted (related to
bug#23468).





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
  2016-05-06 17:21 bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions Paul Pogonyshev
@ 2019-10-20 10:41 ` Lars Ingebrigtsen
  2019-10-20 11:11   ` Eli Zaretskii
  2019-10-20 11:11   ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 10:41 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: 23470

Paul Pogonyshev <pogonyshev@gmail.com> writes:

> When I re-evaluate (C-M-x) a function definition that has breakpoints,
> all of them are lost. This is particularly annoying when breakpoints
> are conditional, because now I not only have to recreate them
> manually, but also specify all the conditions again.

Yes, that sounds useful.

> Request: preserve existing breakpoints within definitions where
> possible. One idea suggested on the devel list is to assign a marker
> to each breakpoint and recreate it at the new marker position when
> re-evaluating, as long as marker is not deleted (related to
> bug#23468).

Hm...  is that necessary?  The breakpoints are tied to the offsets...
Hm, yes, but I guess the offsets will change if you've added/removed
some forms, which would put the breakpoints at the wrong position.  So
markers seem like a better solution.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
  2019-10-20 10:41 ` Lars Ingebrigtsen
@ 2019-10-20 11:11   ` Eli Zaretskii
  2019-10-20 11:14     ` Lars Ingebrigtsen
  2019-10-20 11:11   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-10-20 11:11 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: pogonyshev, 23470

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 20 Oct 2019 12:41:47 +0200
> Cc: 23470@debbugs.gnu.org
> 
> Paul Pogonyshev <pogonyshev@gmail.com> writes:
> 
> > When I re-evaluate (C-M-x) a function definition that has breakpoints,
> > all of them are lost. This is particularly annoying when breakpoints
> > are conditional, because now I not only have to recreate them
> > manually, but also specify all the conditions again.
> 
> Yes, that sounds useful.
> 
> > Request: preserve existing breakpoints within definitions where
> > possible. One idea suggested on the devel list is to assign a marker
> > to each breakpoint and recreate it at the new marker position when
> > re-evaluating, as long as marker is not deleted (related to
> > bug#23468).
> 
> Hm...  is that necessary?  The breakpoints are tied to the offsets...
> Hm, yes, but I guess the offsets will change if you've added/removed
> some forms, which would put the breakpoints at the wrong position.  So
> markers seem like a better solution.

If this request is implemented, how will the user be able to cancel
all the breakpoints in a function?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
  2019-10-20 10:41 ` Lars Ingebrigtsen
  2019-10-20 11:11   ` Eli Zaretskii
@ 2019-10-20 11:11   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 11:11 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: 23470

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Hm...  is that necessary?  The breakpoints are tied to the offsets...
> Hm, yes, but I guess the offsets will change if you've added/removed
> some forms, which would put the breakpoints at the wrong position.  So
> markers seem like a better solution.

I've now implemented this in Emacs 27, but only lightly tested.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
  2019-10-20 11:11   ` Eli Zaretskii
@ 2019-10-20 11:14     ` Lars Ingebrigtsen
  2019-10-20 11:31       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 11:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: pogonyshev, 23470

Eli Zaretskii <eliz@gnu.org> writes:

> If this request is implemented, how will the user be able to cancel
> all the breakpoints in a function?

Oh, that's a good point -- I didn't think about that.

Hm...  got any ideas?  :-)

Well, now the breakpoints are marked, at least, so you can remove them
manually with the `u' command, but perhaps that's not sufficient.

A new command to remove all breakpoints from a function, perhaps?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
  2019-10-20 11:14     ` Lars Ingebrigtsen
@ 2019-10-20 11:31       ` Eli Zaretskii
  2019-10-20 11:40         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-10-20 11:31 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: pogonyshev, 23470

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: pogonyshev@gmail.com,  23470@debbugs.gnu.org
> Date: Sun, 20 Oct 2019 13:14:35 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > If this request is implemented, how will the user be able to cancel
> > all the breakpoints in a function?
> 
> Oh, that's a good point -- I didn't think about that.
> 
> Hm...  got any ideas?  :-)
> 
> Well, now the breakpoints are marked, at least, so you can remove them
> manually with the `u' command, but perhaps that's not sufficient.
> 
> A new command to remove all breakpoints from a function, perhaps?

Yes, a new command would be fine (assuming there isn't one already: I
don't consider myself an expert on debug commands, and only ever use a
small subset of them).





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions
  2019-10-20 11:31       ` Eli Zaretskii
@ 2019-10-20 11:40         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 11:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: pogonyshev, 23470

Eli Zaretskii <eliz@gnu.org> writes:

> Yes, a new command would be fine (assuming there isn't one already: I
> don't consider myself an expert on debug commands, and only ever use a
> small subset of them).

There wasn't one, so I've added it now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-20 11:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 17:21 bug#23470: Feature request: preserve breakpoints when C-u C-M-x function definitions Paul Pogonyshev
2019-10-20 10:41 ` Lars Ingebrigtsen
2019-10-20 11:11   ` Eli Zaretskii
2019-10-20 11:14     ` Lars Ingebrigtsen
2019-10-20 11:31       ` Eli Zaretskii
2019-10-20 11:40         ` Lars Ingebrigtsen
2019-10-20 11:11   ` Lars Ingebrigtsen

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).