From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lucien Pullen Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Update package: psgml (discard patch) Date: Fri, 21 Apr 2017 02:06:25 -0600 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1492762025 6467 195.159.176.226 (21 Apr 2017 08:07:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2017 08:07:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 21 10:07:01 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 1d1Tan-0001aS-Pm for ged-emacs-devel@m.gmane.org; Fri, 21 Apr 2017 10:07:01 +0200 Original-Received: from localhost ([::1]:57761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Tat-0002HU-A5 for ged-emacs-devel@m.gmane.org; Fri, 21 Apr 2017 04:07:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1TaL-0002Fy-Ej for emacs-devel@gnu.org; Fri, 21 Apr 2017 04:06:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1TaI-0002Sx-Ar for emacs-devel@gnu.org; Fri, 21 Apr 2017 04:06:33 -0400 Original-Received: from mail-yb0-x235.google.com ([2607:f8b0:4002:c09::235]:35274) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d1TaI-0002Sr-5j for emacs-devel@gnu.org; Fri, 21 Apr 2017 04:06:30 -0400 Original-Received: by mail-yb0-x235.google.com with SMTP id 6so38358695ybq.2 for ; Fri, 21 Apr 2017 01:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version; bh=NMfQ6ZTxNXLyMNfJcdlUGT2tjQnBWGa0xfc4jl3jQJ0=; b=PJQqclNCTaPpJn1npaWsHNJkCA4tPonzCDJQ7LBZBevcej5bEO+8T5yqWEIMeR9lQP ZZLG5Z7dW1XUxvlkeEYLEcgmDQ57wKIiKNCtO2m5efn5eL1DmGKMWhwkAVceHM9z/L3E kqi33SEtykMxAwEHMQ+7cslTXtHmT87RGd/POdyTTnB8O4NbKDjaXA33f+6XaTe7qOcC k+gCS6FvlTTxLXfdmYoTbgCr6qZv4CBxlKA9gkDBhcvlPK2XjzsOTbfWfOTOUyUBbzGc jnMa1I0vAu+c3etZ1OvME1ZW4RyWPe6VW4qaAnN6+KaU+4DNuSgdIOj/QJ2hFbs6Zn0A EiLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:mail-followup-to:date :in-reply-to:message-id:user-agent:mime-version; bh=NMfQ6ZTxNXLyMNfJcdlUGT2tjQnBWGa0xfc4jl3jQJ0=; b=J/sy2yc0a5iC3gudQ6/A766wtJEZMkkLz6UGNDH3WJGeJxNLcfWjDldhvQKsmRTEFW I8vzvLG1sP2uJmiBYVjD20zKD+6/oyhOhmAGrRRUbL+zm80bKYfK9d86m14bSOberdxb C6fu6qh1Wqfdf8WsdVI7aBA17X8FVYvrAwAK2G/ZmYqveUK7rah2pFedtbv3+5I65Tsr w43S6CwE1PML7R0WXGMVON8E32/pEACsY7GRmtjwZrUpCozl4bN1/vxUHyLoMnPAKCWj yNESKBoHMt8R4JX/NuJqxfyTfOHXcW5ExhyXWZaJJNOUcN+EVR1N1uKKhSXQC5MgahRY Uu6g== X-Gm-Message-State: AN3rC/7HwX1vtPC/bvc19+t/obq5EnxabSqDVpttZYKlTTIDirboVSKv 5gmCLSkxm1k0bohd X-Received: by 10.98.210.2 with SMTP id c2mr11571202pfg.83.1492761988814; Fri, 21 Apr 2017 01:06:28 -0700 (PDT) Original-Received: from lucien.drurowin.org (c-71-56-236-181.hsd1.co.comcast.net. [71.56.236.181]) by smtp.googlemail.com with ESMTPSA id d82sm14431449pfl.124.2017.04.21.01.06.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Apr 2017 01:06:28 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Wed, 19 Apr 2017 08:35:22 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::235 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:214178 Archived-At: 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: (element par (make paragraph start-indent: &indentS;)) 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.