unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Has anybody got a tool for manipulating dribble files?
@ 2011-10-12 19:01 Alan Mackenzie
  2011-10-13  2:21 ` Michael Welsh Duggan
  2011-10-13  2:23 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Alan Mackenzie @ 2011-10-12 19:01 UTC (permalink / raw)
  To: emacs-devel

Hi, Emacs.

I've got a rather largish dribble-file (thanks Michael!) for recreating
a bug.  Does anybody here have or know about a tool which can replay
(partially or wholly) such a file, or anything similar?

-- 
Alan Mackenzie (Nuremberg, Germany).



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

* Re: Has anybody got a tool for manipulating dribble files?
  2011-10-12 19:01 Has anybody got a tool for manipulating dribble files? Alan Mackenzie
@ 2011-10-13  2:21 ` Michael Welsh Duggan
  2011-10-13  3:43   ` Stefan Monnier
  2011-10-13 21:05   ` Alan Mackenzie
  2011-10-13  2:23 ` Stefan Monnier
  1 sibling, 2 replies; 6+ messages in thread
From: Michael Welsh Duggan @ 2011-10-13  2:21 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

Alan Mackenzie <acm@muc.de> writes:

> Hi, Emacs.
>
> I've got a rather largish dribble-file (thanks Michael!) for recreating
> a bug.  Does anybody here have or know about a tool which can replay
> (partially or wholly) such a file, or anything similar?

I asked this a little while ago, and got no response.  So I wrote the
following function:


[-- Attachment #2: dribble.el --]
[-- Type: application/emacs-lisp, Size: 831 bytes --]

[-- Attachment #3: Type: text/plain, Size: 769 bytes --]


This function reads a dribble file and creates a keyboard macro from
it.  It is heuristic in nature.  You cannot tell the difference between
`RET' being pressed and the key sequence "<return>" in a dribble file,
along with a couple of other similar things.

Once you have the macro, it can then be edited using M-x edit-kbd-macro
(of `C-x e').  Unfortunately, the macro will stop on any C-g or any
command that raises an error, so the macro must be edited to elide
these.

In this particular case, I have done the work, and I will be posting an
exact recipe for recreating the problem in Bug 9560.  (Once nice thing
about using a keyboard macro to replicate the problem is that you can
trim it to look at intermediate state.)

-- 
Michael Welsh Duggan
(md5i@md5i.com)

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

* Re: Has anybody got a tool for manipulating dribble files?
  2011-10-12 19:01 Has anybody got a tool for manipulating dribble files? Alan Mackenzie
  2011-10-13  2:21 ` Michael Welsh Duggan
@ 2011-10-13  2:23 ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2011-10-13  2:23 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> I've got a rather largish dribble-file (thanks Michael!) for recreating
> a bug.  Does anybody here have or know about a tool which can replay
> (partially or wholly) such a file, or anything similar?

I don't, but if you do find one, maybe we should include it somewhere.


        Stefan



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

* Re: Has anybody got a tool for manipulating dribble files?
  2011-10-13  2:21 ` Michael Welsh Duggan
@ 2011-10-13  3:43   ` Stefan Monnier
  2011-10-13  3:51     ` Michael Welsh Duggan
  2011-10-13 21:05   ` Alan Mackenzie
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2011-10-13  3:43 UTC (permalink / raw)
  To: Michael Welsh Duggan; +Cc: Alan Mackenzie, emacs-devel

> This function reads a dribble file and creates a keyboard macro from
> it.  It is heuristic in nature.  You cannot tell the difference between

We should change the code in record_char so as to write an unambiguous
format.  E.g. write the space key as " SPC" and add a space in front of
the "<...>" symbols.
Tho a (more verbose) alternative is to use the same format as used
within the [...] vector of a keyboard macro, so you can just add "[" at
the front and "]" at the back and parse it with `read'.


        Stefan



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

* Re: Has anybody got a tool for manipulating dribble files?
  2011-10-13  3:43   ` Stefan Monnier
@ 2011-10-13  3:51     ` Michael Welsh Duggan
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Welsh Duggan @ 2011-10-13  3:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Alan Mackenzie, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> This function reads a dribble file and creates a keyboard macro from
>> it.  It is heuristic in nature.  You cannot tell the difference between
>
> We should change the code in record_char so as to write an unambiguous
> format.  E.g. write the space key as " SPC" and add a space in front of
> the "<...>" symbols.

I agree completely.  It wouldn't even be hard to do.  Unfortunately, I
cannot seem to get a blanket disclaimer from my employer (I can only get
disclaimers on a case-by-case basis), so I will have to leave it to
somebody else.

> Tho a (more verbose) alternative is to use the same format as used
> within the [...] vector of a keyboard macro, so you can just add "[" at
> the front and "]" at the back and parse it with `read'.

That would certainly work.  Though I wonder if all the <foo> keys are
all necessarily portable.

-- 
Michael Welsh Duggan
(md5i@md5i.com)



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

* Re: Has anybody got a tool for manipulating dribble files?
  2011-10-13  2:21 ` Michael Welsh Duggan
  2011-10-13  3:43   ` Stefan Monnier
@ 2011-10-13 21:05   ` Alan Mackenzie
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Mackenzie @ 2011-10-13 21:05 UTC (permalink / raw)
  To: Michael Welsh Duggan; +Cc: emacs-devel

Hi, Michael.

On Wed, Oct 12, 2011 at 10:21:26PM -0400, Michael Welsh Duggan wrote:
> Alan Mackenzie <acm@muc.de> writes:

> > Hi, Emacs.

> > I've got a rather largish dribble-file (thanks Michael!) for recreating
> > a bug.  Does anybody here have or know about a tool which can replay
> > (partially or wholly) such a file, or anything similar?

> I asked this a little while ago, and got no response.  So I wrote the
> following function:

[ .... ]

Excellent man!

> This function reads a dribble file and creates a keyboard macro from
> it.  It is heuristic in nature.  You cannot tell the difference between
> `RET' being pressed and the key sequence "<return>" in a dribble file,
> along with a couple of other similar things.

OK.

> Once you have the macro, it can then be edited using M-x edit-kbd-macro
> (of `C-x e').  Unfortunately, the macro will stop on any C-g or any
> command that raises an error, so the macro must be edited to elide
> these.

> In this particular case, I have done the work, and I will be posting an
> exact recipe for recreating the problem in Bug 9560.  (Once nice thing
> about using a keyboard macro to replicate the problem is that you can
> trim it to look at intermediate state.)

:-)

> -- 
> Michael Welsh Duggan
> (md5i@md5i.com)

-- 
Alan Mackenzie (Nuremberg, Germany).



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

end of thread, other threads:[~2011-10-13 21:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-12 19:01 Has anybody got a tool for manipulating dribble files? Alan Mackenzie
2011-10-13  2:21 ` Michael Welsh Duggan
2011-10-13  3:43   ` Stefan Monnier
2011-10-13  3:51     ` Michael Welsh Duggan
2011-10-13 21:05   ` Alan Mackenzie
2011-10-13  2:23 ` Stefan Monnier

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