all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: jostein@kjonigsen.net
Cc: emacs-devel@gnu.org
Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode
Date: Wed, 10 May 2017 21:59:57 +0300	[thread overview]
Message-ID: <83o9v0a66q.fsf@gnu.org> (raw)
In-Reply-To: <1494439153.1311720.972341016.7C2EC66A@webmail.messagingengine.com> (message from Jostein Kjønigsen on Wed, 10 May 2017 19:59:13 +0200)

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



  reply	other threads:[~2017-05-10 18:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 10:35 nxml-mode: Derive from prog-mode instead of text-mode Jostein Kjønigsen
2017-05-10 10:40 ` Yuri Khan
2017-05-10 10:52   ` Jostein Kjønigsen
2017-05-10 11:42     ` Yuri Khan
2017-05-10 12:00 ` Stefan Monnier
2017-05-10 16:38 ` Eli Zaretskii
2017-05-10 17:59   ` Jostein Kjønigsen
2017-05-10 18:59     ` Eli Zaretskii [this message]
2017-05-10 19:28       ` Eli Zaretskii
2017-05-11  7:29       ` Jostein Kjønigsen
2017-05-11 15:15         ` raman
2017-05-11 15:29           ` Eli Zaretskii
2017-05-11 15:26         ` Eli Zaretskii
2017-05-14 19:28         ` Philipp Stephani
2017-05-14 19:58           ` Dmitry Gutov
2017-05-15  3:05           ` Tom Tromey
2017-05-16 10:34             ` Jostein Kjønigsen
2017-05-16 11:17               ` Yuri Khan
2017-05-16 12:12                 ` Stefan Monnier
2017-05-16 14:04                   ` Drew Adams
2017-05-16 14:08                     ` Eric Abrahamsen
2017-05-16 18:19                       ` Drew Adams
2017-05-16 21:48                         ` Stefan Monnier
2017-05-17  5:13                         ` Yuri Khan
2017-05-17 12:53                           ` Stefan Monnier
2017-05-17 16:02                           ` Drew Adams
2017-05-17 16:20                             ` Yuri Khan
2017-05-17 16:37                             ` Stefan Monnier
2017-05-17 17:28                               ` Drew Adams
2017-05-17 18:42                                 ` Stefan Monnier
2017-05-17 18:52                                   ` Johan Bockgård
2017-05-16 14:11                     ` Stefan Monnier
2017-05-16 12:11               ` Stefan Monnier
2017-05-16 18:54               ` Eli Zaretskii
2017-05-16 19:02                 ` Jostein Kjønigsen
2017-05-24  8:50                   ` Jostein Kjønigsen
2017-05-30  8:05                     ` Jostein Kjønigsen
2017-05-31 11:52                       ` Stefan Monnier
2017-06-02 12:34                       ` Jostein Kjønigsen
2017-06-06 14:45                         ` Stefan Monnier
2017-05-16 21:50                 ` Stefan Monnier
2017-05-11  1:32 ` Rolf Ade

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=83o9v0a66q.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jostein@kjonigsen.net \
    /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.