From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: A plea for sanity from a frustrated hacker. Date: Sat, 9 Jun 2007 18:41:30 +0100 Message-ID: <20070609174130.GA3419@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181405785 17542 80.91.229.12 (9 Jun 2007 16:16:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2007 16:16:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 09 18:16:24 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hx3by-0001xj-I0 for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2007 18:16:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hx3bx-0004H4-Sl for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2007 12:16:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hx3bs-0004G6-Jn for emacs-devel@gnu.org; Sat, 09 Jun 2007 12:16:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hx3bs-0004Fh-0O for emacs-devel@gnu.org; Sat, 09 Jun 2007 12:16:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hx3br-0004Fa-SS for emacs-devel@gnu.org; Sat, 09 Jun 2007 12:16:15 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hx3br-00078C-8I for emacs-devel@gnu.org; Sat, 09 Jun 2007 12:16:15 -0400 Original-Received: (qmail 25254 invoked by uid 3782); 9 Jun 2007 16:16:10 -0000 Original-Received: from acm.muc.de (p54A3FB07.dip.t-dialin.net [84.163.251.7]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 09 Jun 2007 18:16:08 +0200 Original-Received: (qmail 4299 invoked by uid 1000); 9 Jun 2007 17:41:30 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:72536 Archived-At: Hi, Emacs! I'm trying to debug a bug in the help system, specifically what happens when you hit 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 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 #). help-button-action then proceeds to dredge three further lisp objects out of the button then with them calls .... (help-do-xref ) ... which ignores then does (apply ) So, at this stage, what is the function ? 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 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).