From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Sv: Christmas wish: Literate Elisp Date: Fri, 20 Dec 2019 10:00:55 -0500 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: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="163496"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: "emacs-devel@gnu.org" To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 20 16:01:54 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 1iiJmr-000gHu-Fw for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2019 16:01:53 +0100 Original-Received: from localhost ([::1]:57658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiJmp-0002PQ-IS for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2019 10:01:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60773) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiJm3-0001mp-HH for emacs-devel@gnu.org; Fri, 20 Dec 2019 10:01:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiJm1-000378-FT for emacs-devel@gnu.org; Fri, 20 Dec 2019 10:01:02 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17387) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iiJm1-00035P-78 for emacs-devel@gnu.org; Fri, 20 Dec 2019 10:01:01 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8053C1006CE; Fri, 20 Dec 2019 10:00:59 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 47B091004A7; Fri, 20 Dec 2019 10:00:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1576854057; bh=wZN6MrX6OMrZ+Mc2gLv6k6byZp+rO/hGusbSzTEE2Qw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=b51E6AEWfkbc1nP55BMoNA1UzFUxvOFzblGFp+4xfLmJMQovjZQfEn4QRoo1rAIQ7 THa3z3RTOjf4C/QzI+I5Pkftzuy1fnd704zarC56SUQ8jfYtpiW2/IlSxAYABWx64v ekImbccEWfduiEGfZ9eTJ2WVIXgMhIn7IB9+TIENZ14CjeAfbOQ6JgyxnXcvkDbUIK kpU7NfBDXLW7RmdUiqEty98ijJTjLsS4hpel/DKx8dQYdzBvFMFzVcH+XC/FWLXRXY ZqyNLWVr6rD5Ea7ljjyOikX6e0+O1Tqp1v1+nln4YZeV2M6C0+2mAW+OM/kN/aSTBZ l8ovVXOAhWxjQ== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0F0E712024D; Fri, 20 Dec 2019 10:00:57 -0500 (EST) In-Reply-To: (arthur miller's message of "Fri, 20 Dec 2019 00:55:29 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 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:243508 Archived-At: Of course, this decision is not up to me, but I'll point out that I think I don't think we should change the C code to or the byte-compiler to directly support this new format. I'd welcome changes that add hooks to make it possible/easier to support such a format (and other formats like Org-mode), OTOH. Stefan arthur miller [2019-12-20 00:55:29] wrote: > Here is a little prototype to test my idea with literal Elisp. > > I have patched read-eval loop as stated in previous mail, in lread.c. > It is probably possible to implement that in Elisp, but I don't have > enough knowledge of either Emacs internals nor Elisp to do this in some > short time. It would took me a lot of time to look up all the > things I would need. Anyway, C code turned to be rather trivial, and also > completely by-passable if so desired, so I have introduced a user-customi= zable > variable 'emacs-lisp-allow-literal-comments', which is by default nil. > > I wasn't sure in which elisp file to introduce this variable, so I have u= sed > 'simple.el' found in lisp directory of Emacs source distribution. That fi= le > seems to have some other user customizable variables that affect elisp so= I > thought it might be appropriate place. > > For the byte compiler I have patched bytecomp.el, in rather brutish way, = but it > seems to work. It wasn't very difficult either, but I think I have done i= t rather > ugly. Someone might wish to refactor that code. Anyway, it is less then > twenty lines of code, and it is by default bypassed as well. The variable > that controls it is also user customizable and found in same file, > named 'byte-comp-allow-literal-comments'. > > I have attached also a small trivial elisp file for illustration purpose. > > It is just a test of an idea, and small prototype to show that it might w= ork. > It needs more thorough testing and can probably be implemented in some be= tter > way. > > I have tested on GNU/Linux and Windows. Emacs was able to compile it's own > elisp as well as external packages I use. > > As a note, the change in C is completely backwards compatible. No logical > change to elisp parser happens when 'emacs-lisp-allow-literal-comments' > variable is nil. > > ________________________________ > Fr=E5n: Emacs-devel f=F6r > Jean-Christophe Helary > Skickat: den 19 december 2019 02:50 > Till: emacs-devel@gnu.org > =C4mne: Re: Christmas wish: Literate Elisp > > > >> On Dec 19, 2019, at 9:42, chad wrote: >> >> There is a large body of existing software which will be totally unaware= of your changes. > > Although I think the premise of your comment is absolutely valid, I'm not= so > sure about the "*large* body of existing software". > > > Jean-Christophe Helary > ----------------------------------------------- > http://mac4translators.blogspot.com @brandelune