unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: Miles Bader <miles@gnu.org>,
	bob@rattlesnake.com, emacs-devel@gnu.org,
	xemacs-design@xemacs.org
Subject: Re: INFO on add-ons
Date: Thu, 05 Sep 2002 13:22:30 +0900	[thread overview]
Message-ID: <871y89rrp5.fsf@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <200209041549.g84FnQp19483@rum.cs.yale.edu> ("Stefan Monnier"'s message of "Wed, 04 Sep 2002 11:49:25 -0400")

>>>>> "Stefan" == Stefan Monnier <monnier+gnu/emacs@rum.cs.yale.edu> writes:

    Stefan> Huh?!?  What kind of wacky Emacs macros did you have to
    Stefan> maintain indices and to ensure a consistent style when
    Stefan> editing Info files ?

I didn't do indicies (at the time writing Info was a lot easier for me
than the mechanics of contributing, so I knew what was in there), mea
maxima culpa, although I doubt it would be that hard to write a macro
to do it.

As for style, Info has basically three forms of physical presentation,
*emphasis*, `literals' and META VARIABLES.  Very mnemonic.  (I find
modern Texinfo bewildering in its variety of useful-only-in-the-
hardcopy markup, @url and @htmlurl and @file and @dir and @subdir
and @lionsandtigersandbearsohmy and so on.)

    Stefan> What's so great about <kindex key="C-x k"/> compared to
    Stefan> @kindex C-x k ?

I wouldn't have a kindex element.  It would be an attribute of the key
element:

<key index="def" xindex="kill-buffer">C-x k</key> runs the command
<cmd index="ref">kill-buffer</cmd>. ... An alternative to
<key index="ref">C-x k</key> <key>RET C-x b UP RET</key> is
<key>M-x <cmd index="ref">erase-buffer</cmd> RET</key>.

This means that it would be easy to make an XML-based indexing helper.
If you just index all references, it could be automatic.  If you want
intelligent indexing, as above, it would be interactive.  This would
mean that it's hardly a crime to be lazy about indexing, as I was with
the third key element above.  I'm sure you could do it with regexps
and Lisp for texinfo, too, but with XML these possibilities just walk
up and bite you on the ankle.

Furthermore, XML allows you to take natural advantage of commonality,
as I did in the example above by endowing the cmd element with an
index attribute.  Now, any time I want to index something, I just add
an index attribute.  I don't need to remember @kindex and @cindex and
@whateverindexthetexinfomaintainerdeemsnecessarytoday.  If we add an
"eg" (to be distinguished from "ref") value for index attributes, then
it's easy to ensure all indexables share that new distinction.

And the validating parser will barf if index isn't an attribute of
key, while Texinfo doesn't care if I @kindex{Stefan Monnier}.  (Tell
me about how easy it would be to fix _that_ bug.)  If I really want to
index keys, I report it to the XML/Info maintainer as an RFE.  If
approved, implementation is trivial.  You change the definition in two
places in the DTD.  You add the index attribute to key, and key to the
list of indexables for an appropriate index.

It's also easy to add features like xindex, which would automatically
put "see also" entries in the indicies.

    Stefan> What's so great about <sample>foobar</sample> compared to
    Stefan> @sample{foobar} ?

Nothing.  Once again, I want the Document Object Model, so I can use
the many tools that are being developed for structure manipulation.  I
want locality (index an attribute of key, rather than a separate
markup).  I want orthogonality, so that once a new contributor learns
a concept, she can employ it correctly everywhere.  Documentation
should be do-able by users who aren't specialists in Emacs or in
documentation.  (See the Thi-Thien Nguyen thread.)

    Stefan> XML has its advantages, but for a *source* format, it's just
    Stefan> way too cumbersome/verbose,

That is clearly a deficiency of XML in this application, although I
hardly think it's crippling.  In "suppress-attribute" mode, the
example above appears as

<key>C-x k</key> runs the command <cmd>kill-buffer</cmd>. ... An
alternative to <key>C-x k</key> <key>RET C-x b UP RET</key> is
<key>M-x <cmd>erase-buffer</cmd> RET</key>.

Perhaps with fontification to indicate that some of the elements have
hidden attributes.  Still more verbose, but I'm willing to sacrifice
terseness for the power and orthogonality I've described above, power
that Somebody Else Somewhere is already implementing and maintaining
for me.  YMMV.

    Stefan> unless you use an editor that hides the markup, but then
    Stefan> what would such an editor look like ?

PSGML?  outline-mode (for structure editing)?  It would even be
possible to use TeX-like <elt>{element contents} notation to decrease
verbosity.

    Stefan> If you say WYSIWYG

Please, I have asthma.  Take your strawman outside.  ;-)


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
 My nostalgia for Icon makes me forget about any of the bad things.  I don't
have much nostalgia for Perl, so its faults I remember.  Scott Gilbert c.l.py



  parent reply	other threads:[~2002-09-05  4:22 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D728E82.8000808@cox.net>
2002-09-01 22:16 ` INFO on add-ons Alex Schroeder
2002-09-02 23:49   ` David A. Cobb
     [not found]   ` <3D73F919.5010706@cox.net>
2002-09-03 22:56     ` Alex Schroeder
2002-09-04  0:48       ` Alex Schroeder
2002-09-04  1:39         ` Miles Bader
2002-09-04  4:47           ` Eli Zaretskii
2002-09-04  5:02             ` Miles Bader
2002-09-04  5:06               ` Eli Zaretskii
2002-09-04  5:14                 ` Miles Bader
2002-09-04 13:20                   ` Eli Zaretskii
2002-09-04 13:34                     ` Miles Bader
2002-09-05  4:46                       ` Eli Zaretskii
2002-09-05 12:09                         ` Valdis.Kletnieks
2002-09-05 14:52                         ` Robert J. Chassell
2002-09-04 22:40           ` Alex Schroeder
2002-09-05  2:46           ` Richard Stallman
2002-09-07  7:44           ` Pavel Janík
2002-09-04  4:44         ` Eli Zaretskii
2002-09-04 12:13         ` Robert J. Chassell
2002-09-04  4:42       ` Eli Zaretskii
2002-09-02  1:08 ` Stephen J. Turnbull
     [not found] ` <87ptvxxkoj.fsf@tleepslib.sk.tsukuba.ac.jp>
2002-09-02  1:36   ` Miles Bader
     [not found]   ` <buok7m5jhpm.fsf@mcspd15.ucom.lsi.nec.co.jp>
2002-09-02  4:51     ` Stephen J. Turnbull
     [not found]     ` <87fzwtxad9.fsf@tleepslib.sk.tsukuba.ac.jp>
2002-09-02  5:04       ` Miles Bader
     [not found]       ` <buoelcdj82q.fsf@mcspd15.ucom.lsi.nec.co.jp>
2002-09-02  6:03         ` Stephen J. Turnbull
2002-09-02 23:47           ` David A. Cobb
     [not found]           ` <3D73F89D.2070106@cox.net>
2002-09-03  4:16             ` "Extreme Documentation" [was: INFO on add-ons] Stephen J. Turnbull
2002-09-03 15:49               ` David A. Cobb
2002-09-03 19:05               ` Thien-Thi Nguyen
2002-09-04  3:51                 ` Stephen J. Turnbull
2002-09-04  5:58                   ` Thien-Thi Nguyen
2002-09-03 13:26           ` INFO on add-ons Richard Stallman
2002-09-03 15:43             ` Stephen J. Turnbull
2002-09-03 16:30               ` Robert J. Chassell
2002-09-03 17:33                 ` Henrik Enberg
2002-09-03 17:58                   ` Miles Bader
2002-09-03 20:54                     ` Kai Großjohann
2002-09-03 20:54                   ` Kai Großjohann
2002-09-02 23:40       ` David A. Cobb
     [not found]       ` <3D73F6D1.7010002@cox.net>
2002-09-03  4:42         ` Stephen J. Turnbull
2002-09-03 15:39           ` David A. Cobb
2002-09-03 16:23             ` Robert J. Chassell
2002-09-03 22:23               ` David A. Cobb
2002-09-04  1:18               ` Miles Bader
2002-09-04  3:39                 ` Stephen J. Turnbull
2002-09-04  3:46                   ` Miles Bader
2002-09-04  7:23                     ` Stephen J. Turnbull
2002-09-05  2:17                       ` Karl Eichwalder
2002-09-04 14:38                   ` Robert J. Chassell
2002-09-04 17:42                     ` Ville Skyttä
2002-09-04 22:14                       ` Robert J. Chassell
2002-09-05  2:53                     ` Stephen J. Turnbull
2002-09-05 13:37                       ` Robert J. Chassell
2002-09-06  2:40                         ` Stephen J. Turnbull
2002-09-06 12:18                           ` Robert J. Chassell
2002-09-06 13:30                             ` Miles Bader
2002-09-06 20:03                           ` Richard Stallman
2002-09-05 13:54                       ` Robert J. Chassell
2002-09-05 20:16                         ` Ville Skyttä
2002-09-04 15:49                   ` Stefan Monnier
2002-09-04 17:12                     ` Robert J. Chassell
2002-09-04 18:22                     ` Ville Skyttä
2002-09-05  1:48                       ` Miles Bader
2002-09-05  2:32                         ` Karl Eichwalder
2002-09-05  4:51                           ` Eli Zaretskii
2002-09-05  6:00                             ` Karl Eichwalder
2002-09-05 13:25                           ` Robert J. Chassell
2002-09-05  4:48                         ` Eli Zaretskii
2002-09-05  4:22                     ` Stephen J. Turnbull [this message]
2002-09-05 18:02                     ` Richard Stallman
2002-09-06  1:19                       ` Miles Bader
2002-09-06 20:03                         ` Richard Stallman
2002-09-04  4:44                 ` Eli Zaretskii
2002-09-04 12:29                 ` Robert J. Chassell
2002-09-05  2:46                 ` Richard Stallman
2002-09-02 23:22   ` David A. Cobb
2002-09-02 14:53 ` Richard Stallman
2002-09-02 23:59   ` David A. Cobb
2002-09-01 22:02 David A. Cobb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871y89rrp5.fsf@tleepslib.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=bob@rattlesnake.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=xemacs-design@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).