From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii <eliz@gnu.org> Newsgroups: gmane.emacs.devel Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode Date: Wed, 10 May 2017 21:59:57 +0300 Message-ID: <83o9v0a66q.fsf@gnu.org> References: <1494412509.2069441.971865104.0646ACD6@webmail.messagingengine.com> <8337ccbrar.fsf@gnu.org> <1494439153.1311720.972341016.7C2EC66A@webmail.messagingengine.com> Reply-To: Eli Zaretskii <eliz@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1494442880 19407 195.159.176.226 (10 May 2017 19:01:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 May 2017 19:01:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: jostein@kjonigsen.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 21:01:16 2017 Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org> 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 <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>) id 1d8WrL-0004um-F3 for ged-emacs-devel@m.gmane.org; Wed, 10 May 2017 21:01:15 +0200 Original-Received: from localhost ([::1]:44273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>) id 1d8WrR-0003Di-2g for ged-emacs-devel@m.gmane.org; Wed, 10 May 2017 15:01:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1d8Wqq-0003Bz-UW for emacs-devel@gnu.org; Wed, 10 May 2017 15:00:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1d8Wqn-0002MG-3L for emacs-devel@gnu.org; Wed, 10 May 2017 15:00:45 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@gnu.org>) id 1d8Wqn-0002Lu-0H; Wed, 10 May 2017 15:00:41 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1160 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <eliz@gnu.org>) id 1d8Wqf-0003TN-P7; Wed, 10 May 2017 15:00:36 -0400 In-reply-to: <1494439153.1311720.972341016.7C2EC66A@webmail.messagingengine.com> (message from Jostein =?utf-8?Q?Kj=C3=B8nigsen?= on Wed, 10 May 2017 19:59:13 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." <emacs-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>, <mailto:emacs-devel-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/emacs-devel/> List-Post: <mailto:emacs-devel@gnu.org> List-Help: <mailto:emacs-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>, <mailto:emacs-devel-request@gnu.org?subject=subscribe> Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org> Xref: news.gmane.org gmane.emacs.devel:214772 Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/214772> > From: Jostein Kjønigsen <jostein@secure.kjonigsen.net> > Cc: emacs-devel@gnu.org > Date: Wed, 10 May 2017 19:59:13 +0200 > > In prog-mode I have F5 bound to the recompile-command, and the compile command set via .dir-locals.el. > That means in any "project" I work with, I can always press F5 to build and see that everything works. It's a > good workflow. > > I also rely on projectile for file-navigation, which is also enabled in the prog-mode-hook. > > Now consider I press F5 to start building and see that something fails to due invalid data in a XML-file. I'll need > to edit XML. > > I use projectile to switch to the "bad" XML-file, and correct the settings. I have spell-checking everywhere > telling me my XML-elements are not valid English words. I disable flyspell (which I have for text-mode). > > By reflex I press F5 to build. It doesn't. Because my prog-mode hook was not run. > > A little bit annoyed, I try to switch back to a source-file to build from (by reflex using projectile). I press "C-c p > f". But there is no projectile. Because my prog-mode hook never ran, thus projectile is not on. These seem all to stem from your personal setup, not from inherent features of prog-mode that are absent from text-mode. In fact, prog-mode is exceedingly minimal: it only sets 3 variables, none of them related to what you describe. > I just honestly think it makes infinitely more sense to have nxml-mode just invoke prog-mode directly. > > To put it the other way way: What's the argument for nxml-mode predominantly invoking text-mode-hooks? History, I guess. In the beginning there were SGML and HTML, the latter is (or was back then) mostly text with markup. XML just naturally inherited from HTML. I could understand an argument that nowadays XML and even HTML deviate a lot from text with markup, but I don't see how prog-mode would be more appropriate. I tend to think that we should come up with a new family of modes, which specifically caters to the likes of XML-based coding.