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: Sv: Christmas wish: Literate Elisp Date: Fri, 20 Dec 2019 11:17:35 -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 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="218238"; 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 17:18:00 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 1iiKyT-000uY4-GK for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2019 17:17:57 +0100 Original-Received: from localhost ([::1]:58546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiKyS-0005dx-Cr for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2019 11:17:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45475) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiKyG-0005dk-9j for emacs-devel@gnu.org; Fri, 20 Dec 2019 11:17:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiKyE-0001Kn-JG for emacs-devel@gnu.org; Fri, 20 Dec 2019 11:17:43 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44150) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iiKyE-0001Jm-B9 for emacs-devel@gnu.org; Fri, 20 Dec 2019 11:17:42 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F18F244D35E; Fri, 20 Dec 2019 11:17:38 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 826C244D358; Fri, 20 Dec 2019 11:17:37 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1576858657; bh=g9aVOc1BSYka5Li3R1b59TuWlDmER4giXzUDBxl4OUY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=RVx6rAlu3NTrzS1tVyCvYuRmCN+K85d8MBy/TqSCrAkNPUvuP/qeXQZ411y2/onCI Vyaer4/N5yVZhiZ+l8iYEE8/IHnk5nOm1LDIeMs0Wd79Q5zAmzDDvxHeem/Kp41QN6 hItmp/XcLZO/n2XeE4FxEDOHdDb+bKDD23tAtJDJsADVHTvcw/o/7ESseYRmL0dD+y IoioManzdTPNhmoUHRRZebtyAyRLSrnzyv7E4pYGf75+176eLy9fXqyfiSsisGHLIx iVqAmjIxoCTI/60coLNUToROZNhtGMorFQ3SzUTpA0GF/m5airGYomr2bRdWZxbLxU 3HY0S8R73qghw== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5560D12132B; Fri, 20 Dec 2019 11:17:37 -0500 (EST) In-Reply-To: (arthur miller's message of "Fri, 20 Dec 2019 15:50: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:243515 Archived-At: > I really understand the concern, but I must ask how would one change the > elisp itself without re-implementing much or some of of elisp parser if it would > be done externally? I recommend you take a look at the existing function used on load-source-file-function (i.e. load-with-code-conversion): it loads the source file into a buffer and then calls `eval-buffer`. So all it would take is for you to erase the text (aka non-code) part of the source code before passing it to `eval-buffer` (but of course, only do it when that source is using your new format). Or instead of `eval-buffer` you might "manually" skip the text parts, then use `read` + `eval` on the code parts. This would probably take a bit more effort in order to correctly handle (defvar foo). Stefan