From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.devel Subject: Re: Sv: Sv: Christmas wish: Literate Elisp Date: Sat, 21 Dec 2019 02:24:59 -0300 Message-ID: References: <87r213qkhm.fsf@alphapapa.net> <878sn9qxk3.fsf@alphapapa.net> <874kxxqlxz.fsf@alphapapa.net> <87v9qdp4x8.fsf@alphapapa.net> <207B2E96-FE0D-4F53-8D5F-1B6C96480661@traduction-libre.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b5e476059a30041d" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="161490"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "emacs-devel@gnu.org" To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 21 06:25:26 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iiXGX-000frj-3A for ged-emacs-devel@m.gmane.org; Sat, 21 Dec 2019 06:25:25 +0100 Original-Received: from localhost ([::1]:36866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiXGV-00036P-9U for ged-emacs-devel@m.gmane.org; Sat, 21 Dec 2019 00:25:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiXGN-00036I-Cf for emacs-devel@gnu.org; Sat, 21 Dec 2019 00:25:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiXGL-0001gE-AZ for emacs-devel@gnu.org; Sat, 21 Dec 2019 00:25:15 -0500 Original-Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:38133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iiXGK-0001bZ-VM for emacs-devel@gnu.org; Sat, 21 Dec 2019 00:25:13 -0500 Original-Received: by mail-pg1-x533.google.com with SMTP id a33so6008865pgm.5 for ; Fri, 20 Dec 2019 21:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7rKRfhYKiO4iOnlKCuL4qi3dSExMBziH52FsR3XVoVo=; b=cFjPigFw/tVQ8ZIrEyByTMKCkfsr1NPoS6FXvZiAv2heGm2MaxR+swzephp99Lg235 LAreLHQeNN1DDblw1IqnCqy72m3zBu9fJ12yD0vZhUlpo9tz/ljPBOvZjLDyl+Uh08qu k1DnE1K3DBE6oIBHmXA6WXW2TrmVOtDiefZSCTAEw2RUG0n3KBntNM2nVsLoWfFVeOnq 5feeOMKdgK1rKv13k24bYAzzTIrNDBtJERwDemB78abmj+a5+LFqk9a5+5uYx5g60knI GsyYjHJay7Pfk/ScmQSDVGC3HD27vqIiLZZhwoF+968j7AGdn4RaAzZGunFxEkSpBF52 vaYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7rKRfhYKiO4iOnlKCuL4qi3dSExMBziH52FsR3XVoVo=; b=LxTTYQxUMrKuPRWcLtd11MGhfzOJx2Z5rOEjn5YfLv/t5/lI60e85rOzs+qx4uffZe iBSTCJMXCYGYy90P0B31xn/CYkmSHToskeXeV0b/DH9E/dMdjUnvfL8G8TNPmCWLHs8J HLgIfvjZyaiNOuU4eiafvqgyySipaahmpllN3A39WD8Subbg2VuxAaFlURucOzi+7l6n yKKi4XDynJddFpniiZ5WfzDZ0+0aeWcpjh+QxRuIRUm+TI49LtVHZ26BCzNg5HYaOseJ /J22IREd1PMDyZ+16x84g9gTFR3KAk5/HhLWkX4aEyF6FAcd0r4Hj5n3XpKYv6f/S1VS MoIQ== X-Gm-Message-State: APjAAAU7WQSjnImHO/1WqlX8360fGZg04XNtObiXPdbXhAtZVXFyShga nBua/ciwmH1Y31GVeawO1cI7dY+Q4FgfUYUOufk= X-Google-Smtp-Source: APXvYqwMoiDN4rGuA1OM0OzK2AO9AJ3QcMGpV87Gsc7ig9PEvj4jny2rNdJ+7jzxJ9yJxujxIfqdHzUdExgd65wy19M= X-Received: by 2002:a63:f743:: with SMTP id f3mr18882390pgk.28.1576905911688; Fri, 20 Dec 2019 21:25:11 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::533 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243531 Archived-At: --000000000000b5e476059a30041d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry, I should have written a longer message, with most, or all, parts of it written in the first person... In my experience hanging out at the #emacs channel at Freenode and asking for help or hints on elisp is fun, and it's easy to test ideas interactively with C-x C-e... asking for help on the C side of Emacs is not so fun - patching the C source is considered arcane knowledge (<- my impression!) and fewer people will be able to discuss that and to help... also, I don't know how to recompile Emacs after a change in a .c and restart it in less that 30 seconds (slow machine here - I use an old ThinkPad with LibreBoot) - in fact I don't think I've ever patched the C source before! Here's the script that I used to test Arthur's patch: # Download the attachments of this message: # https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00556.html # in /tmp/: cd /tmp/ wget -O bytecomp.patch https://lists.gnu.org/archive/html/emacs-devel/2019-12/txtkIKP0OSag7.txt wget -O lread.patch https://lists.gnu.org/archive/html/emacs-devel/2019-12/txttFA8rLAthl.txt wget -O chatty.el https://lists.gnu.org/archive/html/emacs-devel/2019-12/txt6f3pEXMWNI.txt # Apply the patches in /tmp/: cd /tmp/ cp -v ~/bigsrc/emacs/src/lread.c /tmp/ cp -v ~/bigsrc/emacs/lisp/emacs-lisp/bytecomp.el /tmp/ # (find-man "1 patch") patch lread.c lread.patch patch bytecomp.el bytecomp.patch # If they applied cleanly, copy the patched files back: cp -v /tmp/lread.c ~/bigsrc/emacs/src/lread.c cp -v /tmp/bytecomp.el ~/bigsrc/emacs/lisp/emacs-lisp/bytecomp.el # Rebuild Emacs. # I usually skip some of the steps below - my way of executing # these scripts line by line from Emacs is explained here: # http://angg.twu.net/emacsconf2019.html # http://angg.twu.net/eev-intros/find-eev-quick-intro.html#6 rm -Rfv ~/bigsrc/emacs/ mkdir -p ~/bigsrc/emacs/ cd ~/bigsrc/ git clone git://git.sv.gnu.org/emacs cd ~/bigsrc/emacs/ time ./autogen.sh 2>&1 | tee oa time ./configure 2>&1 | tee oc time make bootstrap 2>&1 | tee omb time make 2>&1 | tee om # Run the new Emacs: ~/bigsrc/emacs/src/emacs Cheers, Eduardo Ochs http://angg.twu.net/#eev On Fri, 20 Dec 2019 at 22:18, arthur miller wrote: > > I was expecting that Arthur would come up with a preprocessor written > > in (I guess) 30 lines of Elisp... > > Interesting =F0=9F=99=82. If you have red my previous mails to this list = you > might have noticed that I am not an elisp guru. Stefan has > outlined two possible ways how this could be implemented in > Elisp, if you follow his advice I am sure you will have a working > solution you can present to us. I don't care how many lines of code > it will take. > > (...) > --000000000000b5e476059a30041d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry, I should have written a longer mes= sage, with most, or all,
parts of it written in the first person...
<= br>In my experience hanging out at the #emacs channel at Freenode and
as= king for help or hints on elisp is fun, and it's easy to test ideas
= interactively with C-x C-e... asking for help on the C side of Emacs
is = not so fun - patching the C source is considered arcane knowledge
(<-= my impression!) and fewer people will be able to discuss that and
to he= lp... also, I don't know how to recompile Emacs after a change in
a = .c and restart it in less that 30 seconds (slow machine here - I use
an = old ThinkPad with LibreBoot) - in fact I don't think I've ever
p= atched the C source before! Here's the script that I used to test
Ar= thur's patch:

=C2=A0 # Download the attachments of this message:=
=C2=A0 # =C2=A0 https://lists.gnu.org/archive/html/emacs-devel/20= 19-12/msg00556.html
=C2=A0 # in /tmp/:
=C2=A0 cd /tmp/
=C2=A0 = wget -O bytecomp.patch https://lists.gnu.org/archive/html/emacs-d= evel/2019-12/txtkIKP0OSag7.txt
=C2=A0 wget -O lread.patch =C2=A0 =C2= =A0https://lists.gnu.org/archive/html/emacs-devel/2019-12/txttFA8= rLAthl.txt
=C2=A0 wget -O chatty.el =C2=A0 =C2=A0 =C2=A0ht= tps://lists.gnu.org/archive/html/emacs-devel/2019-12/txt6f3pEXMWNI.txt<= br>=C2=A0
=C2=A0 # Apply the patches in /tmp/:
=C2=A0 cd /tmp/
= =C2=A0 cp -v ~/bigsrc/emacs/src/lread.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 /tmp/
=C2=A0 cp -v ~/bigsrc/emacs/lisp/emacs-lisp/b= ytecomp.el /tmp/
=C2=A0 # (find-man "1 patch")
=C2=A0 patch= lread.c =C2=A0 =C2=A0 lread.patch
=C2=A0 patch bytecomp.el bytecomp.pat= ch
=C2=A0
=C2=A0 # If they applied cleanly, copy the patched files b= ack:
=C2=A0 cp -v /tmp/lread.c =C2=A0 =C2=A0 ~/bigsrc/emacs/src/lread.c<= br>=C2=A0 cp -v /tmp/bytecomp.el ~/bigsrc/emacs/lisp/emacs-lisp/bytecomp.el=
=C2=A0
=C2=A0 # Rebuild Emacs.
=C2=A0 # I usually skip some of t= he steps below - my way of executing
=C2=A0 # these scripts line by line= from Emacs is explained here:
=C2=A0 # =C2=A0 http://angg.twu.net/emacsconf2019.html
=C2= =A0 # =C2=A0 http://angg.twu.net/eev-intros/find-eev-quick-intro.html#6
= =C2=A0
=C2=A0 rm -Rfv =C2=A0~/bigsrc/emacs/
=C2=A0 mkdir -p ~/bigsrc= /emacs/
=C2=A0 cd =C2=A0 =C2=A0 =C2=A0 ~/bigsrc/
=C2=A0 git clone git= ://git.sv.gnu.org/emacs
=C2= =A0
=C2=A0 cd =C2=A0 =C2=A0 =C2=A0 ~/bigsrc/emacs/
=C2=A0 time ./aut= ogen.sh =C2=A0 2>&1 | tee oa
=C2=A0 time ./configure =C2=A0 =C2= =A02>&1 | tee oc
=C2=A0 time make bootstrap 2>&1 | tee omb=
=C2=A0 time make =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2>&1 | tee o= m
=C2=A0
=C2=A0 # Run the new Emacs:
=C2=A0 ~/bigsrc/emacs/src/em= acs


Cheers,
=C2=A0 Eduardo Ochs
=C2=A0 http://angg.twu.net/#eev

On Fri, 20 Dec 2019 at 22:18, arthur miller <arthur.miller@live.com> wrote:
> I was expecting that Arthur would come up with a preprocessor wr= itten
> in (I guess) 30 lines of Elisp...=C2=A0

Interesting =F0=9F=99=82. If you have red my previous mails to this list you
might have noticed that I am not an elisp guru. Stef= an has=C2=A0
outlined two possible ways how this could be impleme= nted in=C2=A0
Elisp, if you follow his advice I am sure you will h= ave a working=C2=A0
solution you can present to us. I don't care how= many lines of code
it will take.

(...)
--000000000000b5e476059a30041d--