From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David.Kastrup@t-online.de (David Kastrup) Newsgroups: gmane.emacs.devel Subject: Re: narrow-to-here-document Date: 21 Jun 2003 16:48:09 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030620.225909.39171959.jet@gyve.org> <20030620141028.GA1331@math.berkeley.edu> <20030621.012632.74543482.jet@gyve.org> <87brwrvr3g.fsf@tleepslib.sk.tsukuba.ac.jp> <20030621141929.GB4179@math.berkeley.edu> Reply-To: dak@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056206987 25495 80.91.224.249 (21 Jun 2003 14:49:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2003 14:49:47 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Jun 21 16:49:45 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19TjgX-0006d5-00 for ; Sat, 21 Jun 2003 16:49:45 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19Tjif-0007y3-00 for ; Sat, 21 Jun 2003 16:51:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Tjft-0006pH-83 for emacs-devel@quimby.gnus.org; Sat, 21 Jun 2003 10:49:05 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19TjfZ-0006dk-DB for emacs-devel@gnu.org; Sat, 21 Jun 2003 10:48:45 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19TjfV-0006Un-Ka for emacs-devel@gnu.org; Sat, 21 Jun 2003 10:48:42 -0400 Original-Received: from mailout03.sul.t-online.com ([194.25.134.81]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19TjfS-0006To-Hh for emacs-devel@gnu.org; Sat, 21 Jun 2003 10:48:38 -0400 Original-Received: from fwd10.aul.t-online.de by mailout03.sul.t-online.com with smtp id 19TjfM-0007DE-01; Sat, 21 Jun 2003 16:48:32 +0200 Original-Received: from localhost.localdomain (Gn8OG4ZQoe2NIM4AH4VD2SW9aQqiWQ9bIdx5vmHgwxIXkTfRapGLwi@[217.80.157.137]) by fwd10.sul.t-online.com with esmtp id 19TjfD-2FmtSi0; Sat, 21 Jun 2003 16:48:23 +0200 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h5LEmEJC001936; Sat, 21 Jun 2003 16:48:15 +0200 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h5LEmA6Y001932; Sat, 21 Jun 2003 16:48:10 +0200 Original-To: Ilya Zakharevich In-Reply-To: <20030621141929.GB4179@math.berkeley.edu> Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Seen: false X-ID: Gn8OG4ZQoe2NIM4AH4VD2SW9aQqiWQ9bIdx5vmHgwxIXkTfRapGLwi@t-dialin.net Original-cc: cperl@ilyaz.org Original-cc: "Stephen J. Turnbull" Original-cc: Masatake YAMATO X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15183 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15183 Ilya Zakharevich writes: > On Sat, Jun 21, 2003 at 10:01:31AM +0200, David Kastrup wrote: > > TeX is one particular contestant. There are forms of "Literate > > Programming" with a heavy mixture of code and comments, but every > > reference manual contains C code passages, shell scripts and similar > > stuff. An excerpt: > > TeX has no HERE documents. Period. An interesting style of discussion, given that I provided examples. > There are *programming styles* in TeX (as far as can call fighting > with TeX deficiencies programming ;-[) which provide a poor-man > approximations to HERE documents. The examples given were not concerned with programming in TeX. They demonstrated various ways to embed program code into documents typeset with TeX. > However, the target of the discussion is how to add mode-specific > functions which find boundaries of the given HERE documents. > > The problem with TeX is that given no standard way to define HERE > docs, one cannot define such a function listings.sty provides one of various ways for including documents in particular languages, and AUCTeX has hooks for packages. It could easily use one for listings.sty. Knuth's WEB system of structured documentation (aka Literate Programming) has well defined semantics for including code pieces in Pascal or (for CWEB) C in what amounts to a TeX document noweb has well-defined ways to do the same (illustrated source code in some programming language, using TeX for the typesetting). So I think that the potential applicability of such functionality can't be completely summarized with "TeX has no HERE documents. Period." For the sake of discussing the matter at hand, I don't see that it would make sense not to consider the various TeX-based applications here, too. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum