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: Mon, 16 Dec 2019 08:41:07 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197272"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: "archambv@iro.umontreal.ca" , emacs-devel To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 14:41:52 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 1igqdE-000pBF-5q for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 14:41:52 +0100 Original-Received: from localhost ([::1]:53902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igqdB-0004aK-TY for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 08:41:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51704) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igqcc-0003gF-FI for emacs-devel@gnu.org; Mon, 16 Dec 2019 08:41:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igqca-0002m3-QA for emacs-devel@gnu.org; Mon, 16 Dec 2019 08:41:13 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27693) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1igqca-0002kT-K9 for emacs-devel@gnu.org; Mon, 16 Dec 2019 08:41:12 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D82D581A2C; Mon, 16 Dec 2019 08:41:10 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0039E81800; Mon, 16 Dec 2019 08:41:08 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1576503669; bh=f0ThJB6OoUoWrSkYdpgP2KAZFQPe7MBwvYBd1z2q2eg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZwzS2e7jl+xZyrEysG20R3vKy5rIljtJidhnwKt15XWVULSXOhugWzSkdv0FvOsaK DVCVdfjzOszxC3PydYyuwiRoMGIJalZhrflAPuhNzt4SQ6zsWiK1rUoPECEOSgW2J9 wZcG5sj//PrBlMeWAyba8ejstiu2cEJGURF/0FXxh1rt0+Dl+zTrr1xuOTrMCLY4Ql m1oWAHUKRZoKbEi4rxdwLJtCqs4SdssDVDTya9udRYSopKIz59jEWyVO95/3r0yynl jvzTkTVu4Pwxrzeit6A8zT8Di9Qn1vTVBdgq3GdKex/h/LsqK7O3+/IAxTlB13snaC nnkVhyLfCo3QQ== Original-Received: from pastel (69-165-158-134.dsl.teksavvy.com [69.165.158.134]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B343312129D; Mon, 16 Dec 2019 08:41:08 -0500 (EST) In-Reply-To: (arthur miller's message of "Mon, 16 Dec 2019 12:01:45 +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:243409 Archived-At: >> As for using it in Elisp: I don't think there's anything stopping anyone >> from making such a `literate-elisp-mode` and even arrange for `load` to >> handle such a file (just like there is already a package that lets >> `load` work directly on .org files). > I was able to make readevalloop do what I want. It was rather trivial to Note that in my comment above I meant it in existing Emacsen, i.e. without any modification to the C code. The idea is to make use of existing hooks such as `load-source-file-function` or `file-name-handler-alist`. I'm not sure what hook could be used to do the same with byte-compilation, but in the worst case, an advice should do the trick. Stefan