* RFC: A "markup mode"
@ 2008-07-13 21:04 tomas
2008-07-29 10:50 ` tomas
0 siblings, 1 reply; 4+ messages in thread
From: tomas @ 2008-07-13 21:04 UTC (permalink / raw)
To: emacs-devel
-----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ás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIem3xBcgs9XrR2kYRAjpVAJ92PEqzPJWGYN7TRqt/N0Rgl0JKrACdFXTs
nfJo/PESQOrhO2uUeHAfFQc=
=iHJz
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: A "markup mode"
2008-07-13 21:04 RFC: A "markup mode" tomas
@ 2008-07-29 10:50 ` tomas
2008-07-29 10:57 ` Miles Bader
2008-07-29 12:39 ` Thien-Thi Nguyen
0 siblings, 2 replies; 4+ messages in thread
From: tomas @ 2008-07-29 10:50 UTC (permalink / raw)
To: emacs-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, Jul 13, 2008 at 11:04:49PM +0200, tomas@tuxteam.de wrote:
> Hi,
>
> for some time now I have been working on a generic markup mode for
> Emacs [...]
I have received two private answers and none off-list, so I assume this
to be a little bit off-topic here. I'm taking the discussion private.
Feel free to contact me personally if interested on the discussion (if
enough people care, we might start a mailing list on the topic)
Regards, and sorry for the noise.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIjvXxBcgs9XrR2kYRAk3eAJ9gFtL3at8/nEpsQrh0bPAbt+mSoQCbBqy9
R0m1tH8Q60VfDZEjosGYqSg=
=p2io
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: A "markup mode"
2008-07-29 10:50 ` tomas
@ 2008-07-29 10:57 ` Miles Bader
2008-07-29 12:39 ` Thien-Thi Nguyen
1 sibling, 0 replies; 4+ messages in thread
From: Miles Bader @ 2008-07-29 10:57 UTC (permalink / raw)
To: tomas; +Cc: emacs-devel
tomas@tuxteam.de writes:
> I have received two private answers and none off-list, so I assume this
> to be a little bit off-topic here. I'm taking the discussion private.
> Feel free to contact me personally if interested on the discussion (if
> enough people care, we might start a mailing list on the topic)
It's certainly not off-topic on emacs-devel. Some people may feel more
comfortable responding privately of course (I often do if my thoughts on
some subject are not well developed and I don't want to embarrass myself
publicly :-).
-Miles
--
"Most attacks seem to take place at night, during a rainstorm, uphill,
where four map sheets join." -- Anon. British Officer in WW I
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: A "markup mode"
2008-07-29 10:50 ` tomas
2008-07-29 10:57 ` Miles Bader
@ 2008-07-29 12:39 ` Thien-Thi Nguyen
1 sibling, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2008-07-29 12:39 UTC (permalink / raw)
To: tomas; +Cc: emacs-devel
() tomas@tuxteam.de
() Tue, 29 Jul 2008 12:50:25 +0200
I have received two private answers and none off-list,
so I assume this to be a little bit off-topic here.
I would avoid another mailing list. Maybe try again in a few weeks.
(Probably visible interest will increase once feature freeze goes into
effect. I get the feeling people want to avoid a long drawn-out freeze
and thus maintain silence in hopes that the maintainers interpret the
tranquility as encouragement to move forward.)
thi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-29 12:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-13 21:04 RFC: A "markup mode" tomas
2008-07-29 10:50 ` tomas
2008-07-29 10:57 ` Miles Bader
2008-07-29 12:39 ` Thien-Thi Nguyen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.