From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Emacs development... Date: Sun, 22 Aug 2021 06:54:36 -0700 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> <87pmu550cv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37325"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Arthur Miller , 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 15:55:39 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 1mHnwn-0009TW-G8 for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Aug 2021 15:55:37 +0200 Original-Received: from localhost ([::1]:55320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHnwm-0004T4-FB for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Aug 2021 09:55:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHnvv-0003NE-9f for emacs-devel@gnu.org; Sun, 22 Aug 2021 09:54:43 -0400 Original-Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:46722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHnvt-0001uP-C0 for emacs-devel@gnu.org; Sun, 22 Aug 2021 09:54:43 -0400 Original-Received: by mail-pg1-x52d.google.com with SMTP id k14so14095130pga.13 for ; Sun, 22 Aug 2021 06:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=aGfntD7WDCQxOw6gkBuJ5kgupRcvwbHUFUNUI0KPXoM=; b=LuIeaW5AO3xH3gVq8llPo7fNf21I73TNcLxGje/sKLEyQ3x+qd4HxciR5WkK7Lh28G E8LMcB+vFwyPGm9cZzvO8cf5RnKhSHKfYuFffxHvcxDScyXkepfoYwqi57QoLSwEFAPM c0e+2yj9cqWvpSIO3LUGSx6apMM//A4yMbp2+m86MgvhNmep2rQJSHLwo9EGwdeU6A3v vbR9WuI0h4Keqt2Pyv+TkatyNOLQN14DlpFzkiaqS8UV/nP2jgbdVZiJLh6noOajRW09 LcE8xu9BEfDBH/34bpqhCAUURFdWwMMVRxBJVhrWbH646bMuj/e9abetab/oL8o3/9Z/ C80w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=aGfntD7WDCQxOw6gkBuJ5kgupRcvwbHUFUNUI0KPXoM=; b=a5qDXe/zSQxIvUr6Y4NsbtUkUb44uFTL6iVNQkPzq1KDT3RbksIZypKvqDK/ri0180 iYBixx7aBIrpCI9KZOiovMgyDxmXcm7NiBzC7bbyElNepC/yFN1djqUn6SzkXgQ8g4AE cp+w+oRWJfE7HJB57llIBTFUkV9HtW18t1LFY5Hc4O020Qxoz4NK0uk007J+Bj6njrx3 4YscEDlHQxIA7sgMalsKjDXtSlB/4TAuwIOVRyt3q2MMbNB6hDPb/8ii7yYuqwSumG+4 3JxtYb8Ff1QSSpS0pF9/YVJABJnNVpuK9lDow50JBmancdpMeskJfn42mGCgKlKNTfNv tWug== X-Gm-Message-State: AOAM530Rh4R4w1CYq91phChCOs5BNXg5Wk7UJ54WGGHaaRswFqB5DNWC 9we75tKcqYeDoYoQ6zbNQr5rS6kHZXT/HKIZ X-Google-Smtp-Source: ABdhPJzahMP0Dn8e8zoFfAV9Cfv9+INoxhYWZMWnlSfZhvj2rSUi/MO4kA+8aJeHrk6Cv6X3LslGJw== X-Received: by 2002:a05:6a00:9a4:b0:3e2:f6d0:c926 with SMTP id u36-20020a056a0009a400b003e2f6d0c926mr22189417pfg.31.1629640478370; Sun, 22 Aug 2021 06:54:38 -0700 (PDT) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id j15sm12483101pfh.194.2021.08.22.06.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Aug 2021 06:54:37 -0700 (PDT) In-Reply-To: <87pmu550cv.fsf@gmail.com> (Tim Cross's message of "Sun, 22 Aug 2021 18:11:48 +1000") Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=raman@google.com; helo=mail-pg1-x52d.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 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:272836 Archived-At: Tim Cross writes: In addition to all you say below re IELM, the nugget of gold that makes it invaluable is its ability to set the eval context buffer while remaining in the ielm buffer, see command bound to C-c b. > Arthur Miller writes: > >> Tim Cross writes: >> >>> Arthur Miller writes: >>> >>>> Tim Cross writes: >>>> >>>>> Jean-Christophe Helary writes: >>>>> >>>>>>> On Aug 21, 2021, at 23:08, Tim Cross wrote: >>>>>>>=20 >>>>>>> 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.=20 >>>>>> >>>>>> 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 se= e 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 ha= ve >>>>> 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.=20 >>>> >>>> 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.=20 >>>> >>> >>> 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-:? >> > > M-: isn't what I would call a REPL. It just provides a way to evaluate a > lisp expression which you can enter in the echo area. It is similar to > eval-last-sexp (C-x C-e), except as you say, you can specify the argument= s. > > Where ielm differs is that it is more like a proper REPL - it adds the > 'L' (loop) which you don't have with M-:, which is really just the REP > (read, eval print) part. With ielm you can enter multiple statements, go = back > through history and edit/modify an expression and re-evaluate it. Define > a new function and then call it, set a variable and then see its printed > form by just typing it at the prompt etc. I also find it a lot easier > when entering more complex expressions than just using the minibuffer > with M-:. > > When I'm writing new eilsp, I will often open a new *.el file and a ielm > buffer. I might write the first pass of a function in ielm, run it with > different arguments until it works as desired and then copy it back to > the *.el file to save it. > > I don't find it an issue to switch buffers - this is what I'm doing all > the time. I have a frame with multiple tabs and each tab might have > multiple windows and I will jump around between them constantly. It only > takes one or two key strokes, so I find it no more hassle than M-:. > > Being able to edit more complex expressions and move up/down through the > history is extremely useful. However, I also really enjoy interactive > development and exploration. I hate writing a whole heap of code and > then having to spend hours debugging it. I prefer to write small > functions and build them up bit by bit, running and testing them as I > go. For this, ielm is a key tool.=20 > > What would be even better is the ability to send code from the buffer to > be evaluated in the ielm buffer. I think Stefan posted something about > this recently. This could make it easier to execute expressions within a > context you have created and provide some additional functionality which > isn't easily done now (though of course, being Emacs, you can set it up). > > To what extent you would find ielm useful really depends on personal taste > and style when it comes to development and/or debugging. This is both > the power and weakness of Emacs. It is powerful because you can create > the workflow which is more natural and customised to individual tastes. > It is a weakness because 'out of the box', things are very vanilla and > it can take time to learn what is possible and configure it. To be > honest, my current emacs lisp environment is nowhere as refined and > configured as it once was. Back when I was doing more elisp, things were > heavily customised with many advanced features enabled, custom key > bindings, additional functions, advice etc etc. However, I rarely find > it necessary to do much elisp these days. I've even stopped maintaining > my own emacs configuration and now just use spacemacs - I have always > liked VI's modal editing style and I find spacemacs mostly works really > well. I have some fairly minor tweaks and customisation, but on the > whole, I just leave it alone and get on with the other stuff I need to > do.=20 > --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8