emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A plea for sanity from a frustrated hacker.


From: Alan Mackenzie
Subject: A plea for sanity from a frustrated hacker.
Date: Sat, 9 Jun 2007 18:41:30 +0100
User-agent: Mutt/1.5.9i

Hi, Emacs!

I'm trying to debug a bug in the help system, specifically what happens
when you hit <CR> to open the pertinent file after doing C-h f (or C-h
v).

Putting point over the file name and doing a quick C-h c <CR> revealed
that the function I wanted was `push-button'.  Fair enough.  A tedious
eternity of edbugging later, I've now found that .....

push-button calls
  button-activate which calls
    (let ((action (button-get button))) .... which returns 'help-button-action
      and then calls
    (funcall action ....), i.e.,
    (funcall 'help-button-action #<marker at 58 in *Help*>).

    help-button-action then proceeds to dredge three further lisp objects
      out of the button then with them calls ....
      (help-do-xref <p1> <p2> <p3>) ... which ignores <p1> then does
         (apply <p2> <p2>)

So, at this stage, what is the function <p2>?  It's a byte-compiled
lambda.  :-(  At this point, tedium and frustration have caused me to
postpone further debugging and write this rant.

Hey, Guys, this JUST ISN'T FUN.  We've got six levels of calls here, none
of which do anything other than delegate actions to the next in the
nest and hoik out random lisp objects from exotic places.  We've even
come through two nested `funcall'/`apply's and _still_ not got to the
real action, the function which visits the file.el and displays it in the
other window from *Help*.  Would somebody help me find this function,
please?

This is reminiscent of the objectionable orientation in so many
industrial C++ programs.  Can we _please_ hack with less impliciticity?
No matter how well written something is, it will need to be debugged and
changed at some point, and writing in a way so opaque it almost looks
deliberately obfuscated doesn't help.  At the very least, SURELY the
final function <p2> could have been inserted as a symbol into wherever it
was rather than as a byte-compiled lambda?

This is madness.  Don't worry, I'll get over it.

-- 
Alan Mackenzie (Ittersbach, Germany).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]