From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Emacs development... Date: Sun, 22 Aug 2021 09:47:37 +0200 Message-ID: References: <56B1C272-CB13-4793-930C-9F6B96F9856B@traduction-libre.org> <83r1enz453.fsf@gnu.org> <87h7fjuuva.fsf@gnu.org> <351DF59E-BFE0-4CC2-8A40-B4E7CB73D81E@traduction-libre.org> <2281ccca2d439b935535197d931c1ccf41b0f86f.camel@yandex.ru> <3AA2DD3C-EDEC-4180-9180-AE84D6705BE8@traduction-libre.org> <87fsv26eu1.fsf@gmail.com> <5587433C-396F-4230-A81D-21CC33FAF901@traduction-libre.org> <87bl5q5n8b.fsf@gmail.com> <87tuji41l5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Jean-Christophe Helary , emacs-devel@gnu.org To: Tim Cross Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 22 09:48:24 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHiDN-0004dn-O9 for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Aug 2021 09:48:23 +0200 Original-Received: from localhost ([::1]:51192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHiDM-0007r3-8Q for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Aug 2021 03:48:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHiCp-0007Co-0K for emacs-devel@gnu.org; Sun, 22 Aug 2021 03:47:47 -0400 Original-Received: from mail-oln040092064036.outbound.protection.outlook.com ([40.92.64.36]:50195 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHiCj-00012o-JC for emacs-devel@gnu.org; Sun, 22 Aug 2021 03:47:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QsrCHfP3gwO0UnfDxv0g55PCagwGDmLcZH+QTdzW0iJIigtp+fuRLF4bOvRfOQ7+gaVOSPPGMu1k+CtiMJfv6yEHrMX4DBwBF6H+/az7bq/2d9yvfoY9Qbrp2IdcVFR1KZF6Yw6EVIPQ95sROR+ceofulg4708TVBb62PYdcv/aJ+qXBG18hER+l+Jp4zf/GtWq8wrWiQMTAf8lHwqdNkUoh2EKPf6+b6Bc9Dg4ta00CTDs11wo3McvconmkyS1UowOu5IZXr/GSX+mYVNKUCe8XGKFnRHWH4TS1JKLhqRszWPlL7o/OsCpQ3yPgdE2RCFZB/0dIdYpeKI+BAqbj2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VsMF8pNWQF+KIXdA+NnyITsZyGcxb8lbwjkm0o3z2BY=; b=cWKtmM4NyeLJi2ubQnsHrVyCInxhOozPWZ10o/jEl6nIhrhnw+XmBAB0jpbOUe9dL92ZgLcPi0SrgSUDvEk+vlD/8Br84/JaDQlEwl7mdJOxtX16GgQWTCJ35NlCqZEoNMfQMiKSJNTUOBuijkl1Em2ZAaTwtP9ZFvJNWtBS0tyAiKodzvKSpsZjxotXmcvpDcN5dwR1GZPbLGhn7c5CnUIUms5HcKTsuZGgZCk+xjv+WI1lHp+MSMNMwwJOORL7SsDhm4ZiZsg1ICWR0NGXrNkInC3Bd8ZXDapyhqZrpCcMD5wsSDbGecqJ/KgidHPxTp4FdM5HsuUwnPczVZHi0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VsMF8pNWQF+KIXdA+NnyITsZyGcxb8lbwjkm0o3z2BY=; b=Iz1lxFDQY8XG+s0NbSCo9zkcKE8waEohU0akgK6T9SUTF5CxUK6zPYi/OBtu7b8DM8JY2ZQhAKsMpLbCjFn2pIPv+iPRSkFsfWj1RE/RanvxfTDblPQq/H5227T19M2CVUH342Uq63rEncPoEfm55CxN8KaKNbpRcVvex3U6mbXndYZb/yxJhzA3WIr+RIiZUIrD3aB3L3c/0g0+zlMURMkrSq1710GF1WHRTo1m9ZbdbxurOxpVAh0yY/7VMBbLdgCh4JoKnYDhJcXtNM4JXouySIW/Ukp1kk7zpLGuLrkK0VTW2i5jrZcWzIFaL+gPcDywKO3toihWcrw9g7WOrg== Original-Received: from DB5EUR01FT037.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e1a::41) by DB5EUR01HT090.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e1a::363) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Sun, 22 Aug 2021 07:47:39 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e1a::44) by DB5EUR01FT037.mail.protection.outlook.com (2a01:111:e400:7e1a::212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Sun, 22 Aug 2021 07:47:39 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:16926B8E8022D4F68B523DD4DCA05446C05130B27F39D7888CC73DFFEB5E3803; UpperCasedChecksum:A78145C4C38E4AC883E2102CDEA86C0600C9CFB1C44E6488A864F2D2D46BC175; SizeAsReceived:7985; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b483:471e:6dc2:12ae]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b483:471e:6dc2:12ae%9]) with mapi id 15.20.4436.023; Sun, 22 Aug 2021 07:47:39 +0000 In-Reply-To: <87tuji41l5.fsf@gmail.com> (Tim Cross's message of "Sun, 22 Aug 2021 12:48:28 +1000") X-TMN: [DnczzZG1FhwSs10AnpYtq5sn7xrKg7eQ] X-ClientProxiedBy: AM6PR01CA0052.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::29) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87mtp9c44m.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM6PR01CA0052.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Sun, 22 Aug 2021 07:47:38 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: a7549e21-d129-488c-eee0-08d965411d18 X-MS-TrafficTypeDiagnostic: DB5EUR01HT090: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DkjrOJB/H/UHAb4YxborHnJF/6M4mU1WHU3kb3x3SzhPOEi7Y7u3smMijXUcuaxHDNtQ883g+YkDGCv9qwjR+HteqimXTW31DdAxxFtCfQvj41/iijmgPUjwZlZJfzy4hGy89aBNK0rDQnKLHq05R7MmQWy0nyqUSAfOXx6Qp+AkIdKgU6KhicYCi9QiJTQcQvemIvjN2OsCbbh8gfFpES7CnldAHWIAmFRbgt+LB6Xl6hX7V3y9vPa4XLJv8AhgayEGhVo2LPHq5VQGYUfSHbyb9M5Wr+h6oc18dZd3yuuPMV8fFgAFh/x8AqmR1ohZbsx121rEHs9N7ptNCWlWaoVx3ycy8yQpOTjIZnOFu6WAgu9a2hTkHHfIyfrdFANdFo+ZJ3AohoLp5iqvuq2wuv3zqQ7kQ1+k3vfos4CLoJVNYVcPVzqnH6BodWUWob1c X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BpKDlWzzmQwAjMeFRDX4ha5ct9nPjslRsoagIcvwT2Z2l2muWMJEak2rxZTvT40ApaP5A7DQpTL91GWP22Ej/UYEZwGkZymUi3s1cDvCoEXXbNKfsFG/566zfstTv38ofEK1SRSStZ6Xz4kIn4lt3Q== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7549e21-d129-488c-eee0-08d965411d18 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2021 07:47:38.9429 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB5EUR01FT037.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT090 Received-SPF: pass client-ip=40.92.64.36; envelope-from=arthur.miller@live.com; helo=EUR01-DB5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272826 Archived-At: Tim Cross writes: > Arthur Miller writes: > >> Tim Cross writes: >> >>> Jean-Christophe Helary writes: >>> >>>>> On Aug 21, 2021, at 23:08, Tim Cross wrote: >>>>> >>>>> I would also recommend getting comfortable with ielm (M-x ielm), an >>>>> Interactive Emacs Lisp Mode, as well as learning how to evaluate >>>>> expressions in the source buffer. >>>> >>>> Thank you Tim for the suggestion. I like ielm a lot, when I use it. >>>> >>>> What I am trying to do now is fix a bug in package.el and I don't see how I can >>>> use ielm for that. Do you have suggestions ? >>> >>> The relevance of ielm is that it is a powerful and useful tool you have >>> at hand when doing development or bug fixing in elisp. It provides the >>> REPL where you can test/evaluate bits of code. How useful it is for a >>> specific issue will depend on that issue. >> >> What does ielm offer over M-: (eval-expression)? I use a lot M-: so I am >> interested to know if I can improve on my workflow. >> > > Evaluating sexp in the code is very valuable. However, sometimes, I just What do you mean in the code? Like C-x C-e? M-: opens a repl, similar to ielm. It places cursor in minibuffer and lets me eval a function with any arguments and so. Ielm asks me to keep a prompt open in another buffer. So I have to switch to and from that buffer, so I never really appreciate it. So I wonder if ielm has something more to offer, than what I get from M-:? > want to execute functions or parts of functions outside the context of > the code file. I might just want to verify my understanding of how a > function works, or call it with different arguments or modify something > etc. I'm not suggesting ielm as an alternative, but rather an addition > to the set of tools/techniques used. > >> >>> The main limitation with edebug (with debuggers generally), is that it >>> doesn't really help with understanding the logic and intention of the >>> code. It can help with understanding the 'mechanics' - what gets run >>> when and what gets set to what value at what point etc. However, this >>> rarely helps explain why. You may identify when a variable gets set to >>> the wrong value, but not why it ended up with the wrong value. Knowing >>> when it gets set to the wrong value can be useful, but often, if you >>> really understand the code, you can already see this by just running the >>> steps through mentally. >> You have a point there, but in many cases people are not really sure >> what value is passed into variable, so they will printf or message in >> elisp, something just to see the value so they can identify which piece >> of code it gets. >> >> In that particular case, I would suggest that debugger is to prefer, >> instead of adding a printf statememnt which will go away in a seconds >> after. > > I personally find doing things like that much faster and less hassle > than firing up the debugger, instrumenting functions and stepping > through code. > > Everyone will have their own style. I've seen lots of people who depend > heavily on debuggers. I rarely use them for any language. Debugging is > tedious enough without making it worse IMO. > > A lot can also depend on the quality of the code. If you have lots of > code which depends on side effects all over the place, then sometimes a > debugger is the only way you can try and track down the problem. On the > other hand, clean functional code which avoids side effects tends to be > easier as you can clearly see where and how things get modified without > having to watch for changes or trace code execution. > > Different languages can also change the equation a bit. I am more likely > to use a debugger when working in C or assembly, but never when working > with CL, Clojure, javascript, elisp etc. I might with Java, but then > again, if I'm forced to do java, I'm already bored and no longer having > fun! Indeed. I have to admit I am a bit lazy sometimes and use message if I am just doing some quick thing. But generally I prefer debugger. In c/c++ it is out of question to debug with printfs. I haven't wrote a line of Java since 15 years back, so I can share your taste for fun, definitely :). >> >> Before I learned to use a debugger it could have being a lot >> of System.out.println statements, to the point I needed to search the >> output in a text editor. It was many years ago when even grep was an >> esoteric command for me :). > > All depends on how you use/add those statements. If you find it > necessary to search through heaps of lines of output, I would argue you > are not using the statements judiciously. You add statements where they > are beneficial and remove them as soon as there not. Same with using the > debugger - you don't instrument everything and watch all the variables - > you apply things judiciously and clean up as you go. Yep, I was young and innexperienced. Also nobody thought at university how to use a debugger (or other tools like make & co really). It was all about taxonomies from dinosaurus to mamal, cars with different colours and all kind of persons and how they will keep track of their age and such.