From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Valente Newsgroups: gmane.emacs.help Subject: Re: debugging Emacs LISP functions Date: Wed, 1 Mar 2017 17:33:31 +0000 (UTC) Message-ID: <1134748621.1292569.1488389611565@mail.yahoo.com> References: <20170301121427.GA3290@workstation> Reply-To: John Valente NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1488392360 15810 195.159.176.226 (1 Mar 2017 18:19:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Mar 2017 18:19:20 +0000 (UTC) To: hector , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 01 19:19:15 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj8qH-0003Yt-79 for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Mar 2017 19:19:13 +0100 Original-Received: from localhost ([::1]:48089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj8qN-0008Rc-7S for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Mar 2017 13:19:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj88M-0003D8-Sb for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 12:33:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cj88I-0004WI-UE for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 12:33:50 -0500 Original-Received: from nm26-vm6.bullet.mail.ne1.yahoo.com ([98.138.91.119]:40106) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cj88I-0004Rp-LT for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 12:33:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1488389612; bh=BaVDl4GX5OBYVTDVd3ixRWopZ7C6/6AoGKO0coqkak4=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=MypcMnFJOsENkpmrhBx0yZyx6qoChlQ68mviZCTnmmvx+odHjbFRC8MfNZIBrNKrbMGFrhh1T/fEufmogQw1PU/W+rXoZ9aw5Xc/9P14la9frWjaWB+35rIJ6HToNeL/bA07mrt8XSbOf0nfft6nU+xnKiUkE0l83oclVFtbIPydDB7CGDsrHrM2rYm6DPebaHF2Nk49vYH5mwj0gNldbkCbhJk4VjHCX8RMgOYPwVOoKZh3+aQNYAltRiPJFNLHNLaOWNQDpiGEA2Qr6rimjDTOJisG44T3lMHKowrfU3B3Kfbtpexc7qFRaMhJjQg3/3Kvy/GNIoj45j8+SKL7Hg== Original-Received: from [98.138.100.117] by nm26.bullet.mail.ne1.yahoo.com with NNFMP; 01 Mar 2017 17:33:32 -0000 Original-Received: from [98.138.89.232] by tm108.bullet.mail.ne1.yahoo.com with NNFMP; 01 Mar 2017 17:33:32 -0000 Original-Received: from [127.0.0.1] by omp1047.mail.ne1.yahoo.com with NNFMP; 01 Mar 2017 17:33:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 309831.53637.bm@omp1047.mail.ne1.yahoo.com X-YMail-OSG: 46Vj1PUVM1mcoCoxGr4mspSldL9BV2LfwQGakYCXPiH3JUPwSmybv.IyvUvwq0W MLYq9E.AneFRcGuW5XkcC2A5VFE1KfMnmfc3.xypF92DoO_itIY1.djT3KQISVVEQ2kMPXupx7FX wWbupE6MD0.Q2zGDuu2f39N7Iv2py6YGi4DtY2dFNNURoAv8sA3zo.786whLqWwJQtGFu0xJKFYR XOIxyEkb2FkUrVGI2zGxIY5rxP.qWxFbeSaoBh94BwyAgKn8Usvf_j6a4P2gQPAMdtvW.G.dYhOB FHm4wKR8DQa2nanCU.vbXG9fNqqUSiXxzaE.e5C3nfj6kNXp2dot7A2r07L9Lz.jLHIbnmQW99ft 5SLXYfkB39497nSikU5q2zv28kjxGK9xL4lPeaWFb_vPbEaYQLb_a_GtxCRiMTyIwbuW277MQb2L HMkruwSnGKqbLBuq1KTDLd.T79Ai.bmlbMP2j5TSMWkvOXRlsyyhF0j5H8BtQxgBIrU85eJzhEro 3heEuF_QMs2YlU6Wl9FE- Original-Received: from jws200155.mail.ne1.yahoo.com by sendmailws116.mail.ne1.yahoo.com; Wed, 01 Mar 2017 17:33:31 +0000; 1488389611.835 In-Reply-To: <20170301121427.GA3290@workstation> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 98.138.91.119 X-Mailman-Approved-At: Wed, 01 Mar 2017 13:18:21 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112407 Archived-At: The blurring between "user" and "developer", in this case, has nothing to d= o with free software. =C2=A0Emacs is many things, including an elisp compli= er and interpreter. =C2=A0So the problem you're having is absolutely approp= riate for a user-level mailing list. As far as Lisp goes, it's very common and canonical to have a function that= can return either a string or a list of strings. I see someone else has already responded with some help about using the deb= ugger, and about evaluating source-code functions. =C2=A0One other thing yo= u might try is quit emacs, and move or delete all the .elc files, and start= it up again. =C2=A0I don't know how much that will work, because there mig= ht be code around that notices the lack of .elc files and recompiles the so= urce. =C2=A0But I don't think the core files do that. =C2=A0As far as I rec= all, emacs is more than happy to work with interpreted code. =C2=A0It's jus= t a little bit slower.=C2=A0 - John From: hector To: help-gnu-emacs@gnu.org=20 Sent: Wednesday, March 1, 2017 4:14 AM Subject: debugging Emacs LISP functions =20 I have a problem with Emacs. Basically it doesn't do what I want it to do := -) Or put it another way, it doesn't behave as I expect it to behave. I tried debugging the offending function (dir-locals-find-file) and then I found another problem. Perhaps I just don't get acquainted to the LISP typing system. This function can return a string or a list. Is this good coding style? But that's another question. Perhaps this mail should go to the emacs-devel mailing list. I don't know. With free software you just loose the difference between a "user" and a "developer". Anyway I see some developers read this list every now and then. When I try to debug LISP code that is part of Emacs I see with some functio= ns I get the source code and with others I just get "byte-code". In the latter case I can't debug it because the debugger just skips the whole function. How can I know what functions appear as "byte-code" in the debugger? And how can I debug them? =20