unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* nxml-mode: consider changing nxml-sexp-element-flag default
@ 2018-03-15 20:01 Jostein Kjønigsen
  2018-03-15 21:10 ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Jostein Kjønigsen @ 2018-03-15 20:01 UTC (permalink / raw)
  To: emacs-devel, Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

Hey everyone.

Looking at the commit-history, there's not much happening with nxml-mode
right now. It's stable, mature code.
One thing which surprised me when starting to use Emacs though, was how
XML is a structured document-format... But using C-M-SPACE didn't select
a node in the way it does in other major-mode (like lisp-modes).
For -years- this annoyed me... Until someone pointed out that simply
setting nxml-sexp-element-flag to true makes Emacs behave exactly the
behaviour you would expect and want it to.
This is -much- better, and actually makes nxml-mode a decent
"programming language" for batch XML-jobs through keyboard macros.
Why, oh why, is this not the default?  If nxml-mode is "complete" at
this point, I still think this is one thing left to improve.This would especially make things  betterfor new users.

How about it?

--
Regards
Jostein Kjønigsen

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjonigsen.net


[-- Attachment #2: Type: text/html, Size: 1695 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-15 20:01 nxml-mode: consider changing nxml-sexp-element-flag default Jostein Kjønigsen
@ 2018-03-15 21:10 ` Stefan Monnier
  2018-03-17 12:52   ` Steinar Bang
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2018-03-15 21:10 UTC (permalink / raw)
  To: emacs-devel

> For -years- this annoyed me... Until someone pointed out that simply
> setting nxml-sexp-element-flag to true makes Emacs behave exactly the
> behaviour you would expect and want it to.
> This is -much- better, and actually makes nxml-mode a decent
> "programming language" for batch XML-jobs through keyboard macros.
> Why, oh why, is this not the default?

Probably for fear of irking users used to the old behavior.
FWIW I'm mildly in favor of changing the default,


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-15 21:10 ` Stefan Monnier
@ 2018-03-17 12:52   ` Steinar Bang
  2018-03-19 20:52     ` Jostein Kjønigsen
  0 siblings, 1 reply; 9+ messages in thread
From: Steinar Bang @ 2018-03-17 12:52 UTC (permalink / raw)
  To: emacs-devel

>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:

>> For -years- this annoyed me... Until someone pointed out that simply
>> setting nxml-sexp-element-flag to true makes Emacs behave exactly the
>> behaviour you would expect and want it to.
>> This is -much- better, and actually makes nxml-mode a decent
>> "programming language" for batch XML-jobs through keyboard macros.
>> Why, oh why, is this not the default?

> Probably for fear of irking users used to the old behavior.
> FWIW I'm mildly in favor of changing the default,

I'm a longtime nxml user, and I'm in favour of changing the default.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-17 12:52   ` Steinar Bang
@ 2018-03-19 20:52     ` Jostein Kjønigsen
  2018-03-19 21:03       ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Jostein Kjønigsen @ 2018-03-19 20:52 UTC (permalink / raw)
  To: Steinar Bang, emacs-devel, Stefan Monnier


[-- Attachment #1.1: Type: text/plain, Size: 604 bytes --]

On Sat, Mar 17, 2018, at 1:52 PM, Steinar Bang wrote:
>> Probably for fear of irking users used to the old behavior.
>> FWIW I'm mildly in favor of changing the default,
> 
> I'm a longtime nxml user, and I'm in favour of changing the default.

In case there's no objections and we decide to go through with this,
I've change the default and run "make check".
It seems no tests are impacted, and the patch is therefore pretty small.
Is there anything more we'll need to do?
--
Regards
Jostein Kjønigsen

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjonigsen.net





[-- Attachment #1.2: Type: text/html, Size: 1513 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nxml-mode-defaults.patch --]
[-- Type: text/x-patch; name="nxml-mode-defaults.patch", Size: 771 bytes --]

From f3c7a19423d2a01c6e25dd017884b78c09a50d66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Mon, 19 Mar 2018 21:48:33 +0100
Subject: [PATCH] nxml-mode: change nxml-sexp-element-flag default to t

---
 lisp/nxml/nxml-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index 1df410e505..554b5acfb2 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -56,7 +56,7 @@ nxml-char-ref-display-glyph-flag
   :group 'nxml
   :type 'boolean)
 
-(defcustom nxml-sexp-element-flag nil
+(defcustom nxml-sexp-element-flag t
   "Non-nil means sexp commands treat an element as a single expression."
   :group 'nxml
   :type 'boolean)
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-19 20:52     ` Jostein Kjønigsen
@ 2018-03-19 21:03       ` Stefan Monnier
  2018-03-20  6:18         ` Jostein Kjønigsen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2018-03-19 21:03 UTC (permalink / raw)
  To: Jostein Kjønigsen; +Cc: jostein, Steinar Bang, emacs-devel

> In case there's no objections and we decide to go through with this,
> I've change the default and run "make check".
> It seems no tests are impacted, and the patch is therefore pretty small.
> Is there anything more we'll need to do?

Mention the change in etc/NEWS ?


        Stefan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-19 21:03       ` Stefan Monnier
@ 2018-03-20  6:18         ` Jostein Kjønigsen
  2018-03-23  7:36           ` Jostein Kjønigsen
  2018-04-01  9:50           ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Jostein Kjønigsen @ 2018-03-20  6:18 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 520 bytes --]

On Mon, Mar 19, 2018, at 10:03 PM, Stefan Monnier wrote:
>> In case there's no objections and we decide to go through with this,>> I've change the default and run "make check".
>> It seems no tests are impacted, and the patch is therefore
>> pretty small.>> Is there anything more we'll need to do?
> 
> Mention the change in etc/NEWS ?
> 
> 
>         Stefan

Sounds reasonable. Fixed.

--
Regards
Jostein Kjønigsen

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjonigsen.net





[-- Attachment #1.2: Type: text/html, Size: 1428 bytes --]

[-- Attachment #2: nxml-mode.patch --]
[-- Type: text/plain, Size: 1348 bytes --]

From 07e5b7fd2559bf7c4b331222f766a6ee02bbc898 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= <jostein@kjonigsen.net>
Date: Tue, 20 Mar 2018 07:15:17 +0100
Subject: [PATCH] nxml-mode: Change nxml-sexp-element-flag default

Default-value is now t.
---
 etc/NEWS               | 8 ++++++++
 lisp/nxml/nxml-mode.el | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 99f3f27..17b31ff 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -266,6 +266,14 @@ defines the logic of finding a next-error capable buffer.
 It has an option to use a single such buffer on selected frame, or
 by default use the last buffer that navigated to the current buffer.

+
+** nxml-mode
+
+*** Changed default for variable 'nxml-sexp-element-flag' to true.
+This means that pressing C-M-SPACE now selects the entire tree by
+default, and not just the opening element.
+
+
 ** Eshell

 ---
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index 1df410e..554b5ac 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -56,7 +56,7 @@ nxml-char-ref-display-glyph-flag
   :group 'nxml
   :type 'boolean)

-(defcustom nxml-sexp-element-flag nil
+(defcustom nxml-sexp-element-flag t
   "Non-nil means sexp commands treat an element as a single expression."
   :group 'nxml
   :type 'boolean)
--
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-20  6:18         ` Jostein Kjønigsen
@ 2018-03-23  7:36           ` Jostein Kjønigsen
  2018-03-23  8:29             ` Eli Zaretskii
  2018-04-01  9:50           ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Jostein Kjønigsen @ 2018-03-23  7:36 UTC (permalink / raw)
  To: emacs-devel, Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

I realize the Emacs 26.1 RC is probably high on everyone's list right
now, but are we going anywhere with this patch?
If so, I'd just like to point out that I don't have commit-access to the
Emacs git repo, so someone else will have to merge :)
--
 Regards
Jostein Kjønigsen

jostein@kjonigsen.net 🍵 jostein@gmail.com
https://jostein.kjonigsen.net


On Tue, Mar 20, 2018, at 7:18 AM, Jostein Kjønigsen wrote:
> On Mon, Mar 19, 2018, at 10:03 PM, Stefan Monnier wrote:
>>> In case there's no objections and we decide to go through with this,>>> I've change the default and run "make check".
>>> It seems no tests are impacted, and the patch is therefore pretty
>>> small.>>> Is there anything more we'll need to do?
>> 
>> Mention the change in etc/NEWS ?
>> 
>> 
>>         Stefan
> 
> Sounds reasonable. Fixed.
> 
> --
> Regards
> Jostein Kjønigsen
> 
> jostein@kjonigsen.net 🍵 jostein@gmail.com
> https://jostein.kjonigsen.net
> 
> 
> 
> 
> Email had 1 attachment:


>  * nxml-mode.patch
>   2k (text/plain)


[-- Attachment #2: Type: text/html, Size: 2309 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-23  7:36           ` Jostein Kjønigsen
@ 2018-03-23  8:29             ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2018-03-23  8:29 UTC (permalink / raw)
  To: jostein; +Cc: monnier, emacs-devel

> From: Jostein Kjønigsen <jostein@secure.kjonigsen.net>
> Date: Fri, 23 Mar 2018 08:36:31 +0100
> 
> I realize the Emacs 26.1 RC is probably high on everyone's list right now, but are we going anywhere with this
> patch?
> 
> If so, I'd just like to point out that I don't have commit-access to the Emacs git repo, so someone else will have
> to merge :)

It's been just 3 days since the last exchange on this; I usually wait
at least a week before pushing, to let people see and comment.  Please
wait a little bit longer before pinging.

(This change will not go into Emacs 26.1, so the RC is not really
relevant.)

Thamnks.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: nxml-mode: consider changing nxml-sexp-element-flag default
  2018-03-20  6:18         ` Jostein Kjønigsen
  2018-03-23  7:36           ` Jostein Kjønigsen
@ 2018-04-01  9:50           ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2018-04-01  9:50 UTC (permalink / raw)
  To: jostein; +Cc: monnier, emacs-devel

> From: Jostein Kjønigsen <jostein@secure.kjonigsen.net>
> Date: Tue, 20 Mar 2018 07:18:49 +0100
> 
> On Mon, Mar 19, 2018, at 10:03 PM, Stefan Monnier wrote:
> 
>  In case there's no objections and we decide to go through with this,
>  I've change the default and run "make check".
>  It seems no tests are impacted, and the patch is therefore pretty small.
>  Is there anything more we'll need to do?
> 
>  Mention the change in etc/NEWS ?
> 
>          Stefan
> 
> Sounds reasonable. Fixed.

Thanks, I pushed this to the master branch.

For the future, please take care of the following nits:

  . include a ChangeLog-style commit log message with your changes
  . mark entries in NEWS with "---" if they need no documentation
    updates, "+++" if the documentation updates are included in the
    patch or were already done in the past
  . review references to the variable(s) whose default(s) you are
    changing, and amend the references as needed; e.g., if some doc
    string describes what happens "by default", it will need to be
    amended to describe the new default.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-01  9:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 20:01 nxml-mode: consider changing nxml-sexp-element-flag default Jostein Kjønigsen
2018-03-15 21:10 ` Stefan Monnier
2018-03-17 12:52   ` Steinar Bang
2018-03-19 20:52     ` Jostein Kjønigsen
2018-03-19 21:03       ` Stefan Monnier
2018-03-20  6:18         ` Jostein Kjønigsen
2018-03-23  7:36           ` Jostein Kjønigsen
2018-03-23  8:29             ` Eli Zaretskii
2018-04-01  9:50           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).