all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lucien Pullen <drurowin@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] Update package: psgml (discard patch)
Date: Fri, 21 Apr 2017 02:06:25 -0600	[thread overview]
Message-ID: <m08tmugp6m.fsf_-_@gmail.com> (raw)
In-Reply-To: <jwvzifcvb0z.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Wed, 19 Apr 2017 08:35:22 -0400")

Also sprach Stefan Monnier on 2017-04-19:
> I'm not really familiar with DSSSL, so I'm not sure what thie use case
> looks like concretely.  Is that some Lisp-ish sublanguage that appears
> between two SGML tags or on the contrary Lisp-ish language with SGML
> tags within it (i.e. some sort of multi-major-mode situation)?
>
> 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>

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

>> I actually wanted it to be mode-local, which emacs doesn't really do,
>
> Emacs does support "mode-local" in the following sense:
>
>     (add-hook 'foo1-mode-hook (lambda () (setq-local VAR VAL1)))
>     (add-hook 'foo2-mode-hook (lambda () (setq-local VAR VAL2)))
>     ...

>> I can set sgml-set-face in a hook for sgml-mode, but then I have to
>> unset it if I want to edit in the other mode.  I figured a single list
>> of modes where SGML should be fontified would be easier to keep track of
>> than a slue of mode hooks.
>
> A bunch of mode hooks is the "standard" way to deal with such situations
> in Emacs.  Which is more convenient depends on the situation, admittedly.

I read the buffer local sections in the manual again following your
example.  Emacs does do mode local.  That... isn't how I understood
buffer-local variables to work.

In this case, I consider the patch unnecessary.

> 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.

> 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.  I do miss
MuMaMo integration with nHTML, 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.

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.



  reply	other threads:[~2017-04-21  8:06 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       ` Lucien Pullen [this message]
2017-04-21 14:00         ` [ELPA] Update package: psgml (discard patch) Stefan Monnier
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

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

  git send-email \
    --in-reply-to=m08tmugp6m.fsf_-_@gmail.com \
    --to=drurowin@gmail.com \
    --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 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.