unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] Update package: psgml (discard patch)
Date: Fri, 21 Apr 2017 10:00:49 -0400	[thread overview]
Message-ID: <jwvd1c5ubgm.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m08tmugp6m.fsf_-_@gmail.com> (Lucien Pullen's message of "Fri, 21 Apr 2017 02:06:25 -0600")

>> Do you use a dsssl-mode major mode for it?  Can you point me to it?
> It's lisp and entity references between two SGML tags, like this:
>   <style-specification>
>   (element par (make paragraph start-indent: &indentS;))
>   </style-specification>

Thanks.

> The mode is dsssl-mode from the built-in scheme elisp library.

Duh!

[ After so many years using, contributing, and maintaining Emacs,
  I still bump into "unknown" packages and major modes bundled with
  Emacs several times a year (I suspect that some of those "unknown" are
  really that I forgot about them since last time I bumped into them,
  but still).  ]

>> In the specific case of psgml, I think the real fix should be to make
>> psgml interact more normally with font-lock.  I haven't looked into it
>> hard enough yet, tho.
> PSGML only understands the reference concrete syntax, so, with a few
> exceptions such as for fontifying Null End Tags only when they can occur
> and using the value of parameter entities for marked sections, it should
> be able to use font lock using regular expressions.

From a cursory look at how it currently works, I got the impression that
it can be made to use font-lock without changing fundamentally how it's
done.  Using regexps would probably be more painful, less efficient,
and/or less reliable (luckily, font-lock is not limited to regexps).

>> This makes me feel like you indeed have a multi-major-mode situation, in
>> which case sgml-set-face is probably just one part of the problem (and
>> using indirect buffers would just add more problems).
> I've run into multi-major-mode a lot while doing SGML stuff.

[ Side note: given the goal of SGML/XML to provide a kind of "universal
  syntax", the frequency with which even things specifically designed
  for XML/SGML end up using a completely different syntax (e.g. CSS,
  RNC, DSSSL, etc...), seems to be a strong indication of failure.
  Of course, that's just the opinion of someone who's never much liked
  the SGML/XML tags because of their verbosity.  ]

> I do miss MuMaMo integration with nHTML,

Did MuMaMo disappear?

BTW, Tom Tromey has recently added a new mhtml-mode to Emacs, which
"simply" combines Emacs's html-mode js-mode and css-mode.  It won't
directly help your dsssl-mode, but maybe you could try to see if his
approach could be used for your SGML+DSSSL case.  I don't see any strong
reason why sgml-mode + dsssl-mode would be harder than what he did.
I think making it work with psgml rather than the plain html-mode could
be a fair bit of work, OTOH.

While talking about ideas, I'd like to "merge" psgml-mode and sgml-mode.
What "merge" means here is not completely clear, but most likely it
means that psgml-mode would derive from sgml-mode, a bit like js2-mode
derives from js-mode nowadays.

> but I hardly write directly in HTML any more and I don't use PHP,
> so...  There's something about the NOTATION attribute giving the
> editor access to which major mode element content is in that lends
> itself to multi-major-mode.

I must admit that I don't know what you mean by "NOTATION attribute".

> At least, that's how I'd like to use psgml, but I need to learn a lot
> more about modes before I tried something like making emacs SGML-aware.

The SGML/XML support in Emacs is indeed in need of work.  Partly because
of the amount of distinct solutions reinventing the wheel slightly
differently (e.g. between sgml-mode, psgml-mode, nxml-mode, ...).


        Stefan



  reply	other threads:[~2017-04-21 14:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-16 22:38 [ELPA] Update package: psgml Lucien Pullen
2017-04-17 16:34 ` Stefan Monnier
2017-04-19  7:39   ` Lucien Pullen
2017-04-19 12:35     ` Stefan Monnier
2017-04-21  8:06       ` [ELPA] Update package: psgml (discard patch) Lucien Pullen
2017-04-21 14:00         ` Stefan Monnier [this message]
2017-04-26 10:50           ` Lucien Pullen
2017-04-26 12:34             ` Stefan Monnier

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=jwvd1c5ubgm.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.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).