From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jonathan Leech-Pepin Newsgroups: gmane.emacs.devel Subject: Re: Sv: Sv: Christmas wish: Literate Elisp Date: Mon, 16 Dec 2019 11:07:16 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006c50720599d4689b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="20004"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "archambv@iro.umontreal.ca" , Stefan Monnier , emacs-devel To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 16 17:08:03 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 1igsug-00050h-Bj for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 17:08:02 +0100 Original-Received: from localhost ([::1]:56226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igsuf-0007uw-0j for ged-emacs-devel@m.gmane.org; Mon, 16 Dec 2019 11:08:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46985) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igsuA-0007Of-MQ for emacs-devel@gnu.org; Mon, 16 Dec 2019 11:07:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igsu9-0004d8-8h for emacs-devel@gnu.org; Mon, 16 Dec 2019 11:07:30 -0500 Original-Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:33214) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igsu9-0004c8-0I for emacs-devel@gnu.org; Mon, 16 Dec 2019 11:07:29 -0500 Original-Received: by mail-pj1-x1036.google.com with SMTP id r67so3184630pjb.0 for ; Mon, 16 Dec 2019 08:07:28 -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=1Kc85Ap3WJ8fSEAWLWQRUACVA4WvEHjbeUVoicOXxS8=; b=f2XP1wtZFy8vOFNbhiQSMLkEJHsVA83D6+E3T3HvLgEZPWfGBo4Er2h5GqPxK0T6Tt HKeBdEvYt8i/IwLImDWQf5iUGHoRVTXJOWOVm9WDVVL3Ol1Zmc3JdSb3kQXkcKlJv4NJ SXdWFnfL79ADcYecs17Q1duHdKUB20FbMHCuCvE0sLCcAVMr6CcyU2Gu0sFLIQFMsT33 ilhrVVJO5A2UqRXiVXqkGK1RwNLnw94TvLgsF1tP0RbfXUi4sFCliMRTgtytObAWL31T 1nLyWqHZ6yPYXZHw9RbR4CuKfvSlc7Bt2TkA7PxF/iG+vLm0cU65E6lnCwdjQYapj7N1 H5FA== 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=1Kc85Ap3WJ8fSEAWLWQRUACVA4WvEHjbeUVoicOXxS8=; b=Fb8WE4j+IzmPnbZkTOnQfjrgnr3bjc0t8VeGQmpKRMlI8FGlAUwNG62/XL+qXzZ/qd qw20TkG84lViqPWGKATNRODtYdHzy+1q7chRuo3AnXfeUaooCz5XISSdL5lwQlIF7L6o roqTEHvkrZ3HXFmb9Jw5GG9XxwpZVxuyGCKE8AS410sXKMyILgwzGHDVGsyVPg0x5xyH lF4Hg0LEfavVspXzViufwyCJbFKABenLZmJdbUAjaHVCkQXYiywaVnHkK5uzSKb7kfGD +59KOhGqe43XojkTN3EeKaA+2NnPooRxUL++OVdRxEYiJUgONmLAQTrLbCZu4khZqLYV W/YQ== X-Gm-Message-State: APjAAAXZBWOJFW53sYJkaTGzWoj9G5zEIE9Cy+JtQhs4kP9YLzmy5aDx QrvvDSk/zIo48nr78vMaEv4HjbGE4ZnznoAc04I= X-Google-Smtp-Source: APXvYqwN4kw4b8NYnnEENAElrF79UWG4Kx1oh603PD9VfApxXjB6HL23GMGM1Q7soJKZHR9J9UOeXlSJVGMtAP3BBFo= X-Received: by 2002:a17:90a:a48c:: with SMTP id z12mr18673770pjp.38.1576512447596; Mon, 16 Dec 2019 08:07:27 -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::1036 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:243415 Archived-At: --0000000000006c50720599d4689b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Arthur, Have you happened to have looked at Outshine ( https://github.com/alphapapa/outshine)? It enhances outline-minor-mode and lets it work with standard org-syntax while in comment blocks (and defines hotkeys to swap into an edit buffer that makes it look like a normal Org-Mode buffer). By keeping the literate syntax in comments you don't break the existing parser. Regards, Jon On Mon, Dec 16, 2019 at 9:03 AM arthur miller wrote: > Aha =F0=9F=98=8A > > Sorry, I didn=E2=80=99t realized what you ment. I am not sure I know that= much of > elisp, > > but I may try to look at, would be lots of learning for me =F0=9F=98=8A. > > > > Skickades fr=C3=A5n E-post > f=C3=B6r Windows 10 > > > > *Fr=C3=A5n: *Stefan Monnier > *Skickat: *den 16 december 2019 14:41 > *Till: *arthur miller > *Kopia: *emacs-devel ; archambv@iro.umontreal.ca > *=C3=84mne: *Re: Sv: Sv: Christmas wish: Literate Elisp > > > > >> As for using it in Elisp: I don't think there's anything stopping anyo= ne > >> from making such a `literate-elisp-mode` and even arrange for `load` t= o > >> 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 t= o > > 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 > > > --0000000000006c50720599d4689b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Arthur,

Have you happened to= have looked at Outshine (https://github.com/alphapapa/outshine)?

It en= hances outline-minor-mode and lets it work with standard org-syntax while i= n comment blocks (and defines hotkeys to swap into an edit buffer that make= s it look like a normal Org-Mode buffer).

By keepi= ng the literate syntax in comments you don't break the existing parser.=

Regards,
Jon

On Mon, Dec 16, 2= 019 at 9:03 AM arthur miller <= arthur.miller@live.com> wrote:

Aha =F0=9F=98=8A

Sorry, I didn=E2=80=99t realized what you ment. I am not sure I know that m= uch of elisp,

but I may try to look at, would be lots of learning = for me =F0=9F=98=8A.

=C2=A0

Skickades fr=C3=A5n E-post f=C3=B6r Windows 10

=C2=A0

Fr=C3=A5= n: Stefan= Monnier
Skickat: den 16 december 2019 14:41
Till: ar= thur miller
Kopia: emac= s-devel; archambv@iro.umontreal.ca
=C3=84mne: Re: Sv: Sv: Christmas wish: Literate Elisp

=C2=A0

>> As for using i= t in Elisp: I don't think there's anything stopping anyone
>> from making such a `literate-elisp-mode` and even arrange for `loa= d` 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.


=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Stefan

=C2=A0

--0000000000006c50720599d4689b--