From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Update package: psgml (discard patch) Date: Fri, 21 Apr 2017 10:00:49 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1492783273 26129 195.159.176.226 (21 Apr 2017 14:01:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2017 14:01:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 21 16:01:09 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1Z7S-0006cJ-KA for ged-emacs-devel@m.gmane.org; Fri, 21 Apr 2017 16:01:06 +0200 Original-Received: from localhost ([::1]:59837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Z7Y-00005p-Dn for ged-emacs-devel@m.gmane.org; Fri, 21 Apr 2017 10:01:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Z7L-0008V5-5W for emacs-devel@gnu.org; Fri, 21 Apr 2017 10:01:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1Z7G-0005mA-SD for emacs-devel@gnu.org; Fri, 21 Apr 2017 10:00:59 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:57524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Z7G-0005lz-NC for emacs-devel@gnu.org; Fri, 21 Apr 2017 10:00:54 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v3LE0o4Z011624; Fri, 21 Apr 2017 10:00:51 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id DC3B8662FE; Fri, 21 Apr 2017 10:00:49 -0400 (EDT) In-Reply-To: (Lucien Pullen's message of "Fri, 21 Apr 2017 02:06:25 -0600") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6005=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6005> : inlines <5817> : streams <1742162> : uri <2413540> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214189 Archived-At: >> 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: > > (element par (make paragraph start-indent: &indentS;)) > 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