From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "N. Raghavendra" Newsgroups: gmane.emacs.devel Subject: Re: nXML mode maintenance and enhancement Date: Wed, 23 May 2018 20:18:11 +0530 Message-ID: <87d0xmctsk.fsf@gmail.com> References: <87603e4lhz.fsf@gmail.com> Reply-To: "N. Raghavendra" NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527087690 5856 195.159.176.226 (23 May 2018 15:01:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 May 2018 15:01:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 23 17:01:26 2018 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 1fLVGY-0001Q1-Jk for ged-emacs-devel@m.gmane.org; Wed, 23 May 2018 17:01:26 +0200 Original-Received: from localhost ([::1]:33932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLVIf-0000Ps-KW for ged-emacs-devel@m.gmane.org; Wed, 23 May 2018 11:03:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLV3s-00069q-UC for emacs-devel@gnu.org; Wed, 23 May 2018 10:48:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLV3p-0002gm-QE for emacs-devel@gnu.org; Wed, 23 May 2018 10:48:20 -0400 Original-Received: from mail-pl0-x22c.google.com ([2607:f8b0:400e:c01::22c]:41234) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLV3p-0002gV-L1 for emacs-devel@gnu.org; Wed, 23 May 2018 10:48:17 -0400 Original-Received: by mail-pl0-x22c.google.com with SMTP id az12-v6so13169615plb.8 for ; Wed, 23 May 2018 07:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:user-agent:reply-to :mail-followup-to:date:message-id:mime-version :content-transfer-encoding; bh=n6osMw6A4dV5W9iksAY5r3VSUpfrBHbRThlvqLtDfnk=; b=b1sDlcowAuvwCqfCjkM/VXFZnfaoSgqTXyltsLBFtvMWu/5h1YZId/WTUr3RhoCLUQ xUKdhgNSD1klfkwAjdDOqp20LPqgAx1EmLBmc2tqYffUiNl7P91IJD8KLWEFcvK/CBku JUnAZlE1yy2HFwqvuRKv4A18pEDaBAxMqGj/ytn83RUVrHTwnrE4pAj8bYtxDb94iBJJ xcK+sm16KsYETutKMymUqg1hQI12EaE7Fb1pOiW9Nz/t+sdL7+L4Wy+5f2biV9k+gw0F /gTS5qpVfwAIIyEWAddtMOJX3hctvlRzxbcD6/W32deCruDUN0bN5BF9Jx2cGasaC2N6 bguA== 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:in-reply-to:references :user-agent:reply-to:mail-followup-to:date:message-id:mime-version :content-transfer-encoding; bh=n6osMw6A4dV5W9iksAY5r3VSUpfrBHbRThlvqLtDfnk=; b=tWnMuQ/grrim7n6yzEKNGVHzd853PTQ610JTWZ1yKAFPKUy0T2STToQWl+OzGSuYSo hWKvaydwRt/CYiJ9D9jEzckp3mUUamsIOyP3hL5OqQPs5A8fn1ybkj3YmhJLJYlMiT7a ydb7uIUZf3MjXDD7uqDw8QI9Qq99JuaoqA5/mCL70jJxNr0RMSxHDFyIVB93++UsQMml OrDbPxD1Bsq+5T3eKm8HkvCCAMHxi/kzoxMvRmTpZdSVq10y49jrcqCF6eHcl5pajN0V sODqRIFTdpB/BAHVQIJrPTyY2Y5gZLKcfhMOKnffG++8N5WyVYVv2FrG6VBMQEFaH3xD fiuw== X-Gm-Message-State: ALKqPwdYrOlUortjyM96drPttrbUyJ9+WULjSZ+9d4vNXqScADTLhEr8 fnRuRn5B0DVy2szDEuTDoV1rEA== X-Google-Smtp-Source: AB8JxZoTf6UED1Ccx25amhyj8XRtP+zEGIDixi1StU164ZPUk6hCEbPZ+CMJuyQU4Z28OjNcYCKZ5A== X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr3368019plr.323.1527086896504; Wed, 23 May 2018 07:48:16 -0700 (PDT) Original-Received: from ailuros ([14.139.59.140]) by smtp.gmail.com with ESMTPSA id u75-v6sm36801437pfd.92.2018.05.23.07.48.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 07:48:15 -0700 (PDT) In-Reply-To: (Yuri Khan's message of "Wed, 23 May 2018 21:18:55 +0700") Mail-Followup-To: emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::22c 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:225602 Archived-At: At 2018-05-23T21:18:55+07:00, Yuri Khan wrote: > There is not and cannot be One True Way to indent XML, for all users and > uses of nXML. Sure, the user can always change it. Every mode comes with a default indentation style. I am only suggesting that the default indentation rules of nXML conform to those of the SGML and PSGML modes. > XML formats are used for text markup languages such as XHTML and DocBook; > configuration files; and various data files. The indentation rules in > =E2=80=98nxml-indent-line=E2=80=99 are very much oriented towards data fi= les =E2=80=94 as in, =E2=80=9Cadd > a level of indentation for every unclosed opening tag; remove a level of > indentation for every closing tag opened elsewhere, independent of the > actual tag names=E2=80=9D. I am not well acquainted with PSGML, but I sus= pect that > it is is more text-markup-oriented. Yes, and PSGML provides a many more editing facilities for authors of documents, than does nXML. > I sort-of can do that now. This involves: hooking =E2=80=98rng-schema-cha= nge-hook=E2=80=99; > in the hook function, looking at =E2=80=98rng-current-schema=E2=80=99 to = see if its =E2=80=98caddr=E2=80=99 > is "html"; and, if so, pointing =E2=80=98indent-line-function=E2=80=99 at= my own function > that pretty much has to reimplement the whole of =E2=80=98nxml-indent-lin= e=E2=80=99 from > scratch, in about 250 lines of Elisp. I wonder if you can share your code here; perhaps I or someone else can try to adapt it into a general function in nXML. >> b) Support for processing instructions such as, e.g., > >> > >> which specify that a `foo' element should not be disturbed when >> filling a region; this is useful if one wants to fill a buffer >> containing verbatim elements such as program listings. Sure, one can have both the PI and variable customisation methods. PIs for editing have been a common facility in SGML and XML; for instance, just today I saw that XMLMind has a PI mechanism for associating a RELAX NG schema with a document. Raghu. -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/