GNU bug report logs - #1397
RFC: A "markup mode"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: tomas <at> tuxteam.de; Keywords: patch; dated Thu, 20 Nov 2008 21:30:04 UTC; Maintainer for emacs is bug-gnu-emacs <at> gnu.org.
Added tag(s) patch. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. Full text available.
Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1397; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	FVGT_m_MULTI_ODD,MDO_DATING2,MURPHY_WRONG_WORD2,PGPSIGNATURE,
	RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at quiet) by emacsbugs.donarmstrong.com; 20 Nov 2008 21:25:10 +0000
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAKLP5H5016206
	for <quiet <at> emacsbugs.donarmstrong.com>; Thu, 20 Nov 2008 13:25:06 -0800
Received: from rgm by fencepost.gnu.org with local (Exim 4.67)
	(envelope-from <rgm <at> gnu.org>)
	id 1L3H1C-00018D-Rz
	for quiet <at> emacsbugs.donarmstrong.com; Thu, 20 Nov 2008 16:24:54 -0500
From: tomas <at> tuxteam.de
To: quiet <at> debbugs.gnu.org
Subject: RFC: A "markup mode"
Date: Sun, 13 Jul 2008 23:04:49 +0200
Lines: 74
X-From-Line: emacs-devel-bounces+rgm=gnu.org <at> gnu.org  Sun Jul 13 17:00:37 2008
Received: from mx10.gnu.org ([199.232.76.166]:45865)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <emacs-devel-bounces+rgm=gnu.org <at> gnu.org>)
	id 1KI8gP-0001cQ-GD
	for rgm <at> gnu.org; Sun, 13 Jul 2008 17:00:37 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <emacs-devel-bounces+rgm=gnu.org <at> gnu.org>)
	id 1KI8gt-00039j-9R
	for rgm <at> gnu.org; Sun, 13 Jul 2008 17:01:09 -0400
Received: from lists.gnu.org ([199.232.76.165]:38323)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <emacs-devel-bounces+rgm=gnu.org <at> gnu.org>)
	id 1KI8gs-00039P-28
	for rgm <at> gnu.org; Sun, 13 Jul 2008 17:01:06 -0400
Received: from localhost ([127.0.0.1]:51090 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KI8gr-0002OU-H2
	for rgm <at> gnu.org; Sun, 13 Jul 2008 17:01:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KI8gO-0002MH-Cf
	for emacs-devel <at> gnu.org; Sun, 13 Jul 2008 17:00:36 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KI8gN-0002Kz-1J
	for emacs-devel <at> gnu.org; Sun, 13 Jul 2008 17:00:36 -0400
Received: from [199.232.76.173] (port=33228 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1KI8gM-0002Kr-M0
	for emacs-devel <at> gnu.org; Sun, 13 Jul 2008 17:00:34 -0400
Received: from alextrapp1.equinoxe.de ([217.22.192.104]:37738
	helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <tomas <at> tuxteam.de>) id 1KI8gM-00034A-EW
	for emacs-devel <at> gnu.org; Sun, 13 Jul 2008 17:00:34 -0400
Received: by www.elogos.de (Postfix, from userid 1000)
	id DC0679006B; Sun, 13 Jul 2008 23:04:49 +0200 (CEST)
X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2)
X-Debbugs-No-Ack: yes
X-BeenThere: emacs-devel <at> gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request <at> gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/emacs-devel>
List-Post: <mailto:emacs-devel <at> gnu.org>
List-Help: <mailto:emacs-devel-request <at> gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request <at> gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+rgm=gnu.org <at> gnu.org
X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4)
Message-ID: <gkk5ay8509.fsf <at> fencepost.gnu.org>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Sender: Glenn Morris <rgm <at> gnu.org>

Severity: wishlist

[ resent from
  http://lists.gnu.org/archive/html/emacs-devel/2008-07/msg00389.html ]=20


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

for some time now I have been working on a generic markup mode for
Emacs. The work has been sped up by the needs of a customer, which might
be served by this code.

I've asked the customer and they would be fine with publishing wnatever
comes out of it under the GPL -- even better if it is adopted as part of
Emacs.

Please find the current incarnation here:

  git http://tuxteam.de/~tomas/Repositories/am

Some remarks:

Design:

The idea is to support (nested) mark-ups like XML or Wiki, rendering
them in a more-or-less WYSIWYG fashion (as far as Emacs supports that).
The mapping between the markup elements and rendering whithin Emacs is
done via a "style" file (which is at the moment just an elisp file
containing faces and assorted fix-ups for special cases. Several
examples of style files are contained in the above code sample.

The markup model is more or less what we know from XML: spans of text
are attached with a "markup class" and a (possibly empty) list of
attributes. Those spans may be empty (the "singletons" in XML).

Implementation:

To satisfy the constraints:

 - preserve document order (even for empty spans)
 - move around markup classes on copy/kill and yank
 - round trip invariance (i.e. what is written is in some sense
   "equivalent" to what has been read)

I ended up with an interesting mixture of overlays, text properties and
invisible "sentinel characters" (always at the beginning of spans: thus
a span is "never empty" in the implementation (helps keeping document
order).

The current implementation features an XML parser (ugh! I must be crazy
to write _yet_ another half-complete XML parser, right?), and is able to
display this XML according to the "style file", copy/yank "works",
nesting whatever markup is picked up at the copy site within the markup
present in the target site.

It is implemented as a minor mode (I'd hoped once to use it as "literate
programming sub-mode" within a programming major mode, to embellish
embedded documentation).

I'd love to hear criticism, ideas, whatever. Do you think something like
this could be useful?

NOTE: I'll be off the net for the next fourteen days. But I'm looking
forward to your comments.

Thanks
- -- tom=E1s
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIem3xBcgs9XrR2kYRAjpVAJ92PEqzPJWGYN7TRqt/N0Rgl0JKrACdFXTs
nfJo/PESQOrhO2uUeHAfFQc=3D
=3DiHJz
-----END PGP SIGNATURE-----




Report stored:
bug#1397; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 20 Sep 2011 19:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.