GNU bug report logs - #24660
24.5; nxml-mode should support shift selection

Previous Next

Package: emacs;

Reported by: Yuri Khan <yuri.v.khan <at> gmail.com>

Date: Mon, 10 Oct 2016 16:43:02 UTC

Severity: normal

Tags: patch

Found in version 24.5

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24660 in the body.
You can then email your comments to 24660 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24660; Package emacs. (Mon, 10 Oct 2016 16:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yuri Khan <yuri.v.khan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 10 Oct 2016 16:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Yuri Khan <yuri.v.khan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; nxml-mode should support shift selection
Date: Mon, 10 Oct 2016 22:41:37 +0600
[Message part 1 (text/plain, inline)]
Many movement commands, such as forward-word, forward-sexp,
forward-sentence, next-line, and their backward counterparts, support
shift selection. That is, holding down Shift along with their bindings
causes region to be activated and/or extended.

$ emacs -Q

C-x C-f /tmp/test.xml

    <html>|<head></head><body></body></html>

C-M-S-<right> ;; C-M-<right> (translated) runs forward-sexp

    <html>[<head>]</head><body></body></html>

C-M-S-<right> ;; C-M-<right> (translated) runs forward-sexp

    <html>[<head></head>]<body></body></html>


However, nxml-mode’s commands do not behave this way.

    <html>|<head></head><body></body></html>

C-M-S-n ;; C-M-n (translated) runs nxml-forward-element

Expected:

    <html>[<head></head>]<body></body></html>

Observed:

    <html><head></head>|<body></body></html>


The attached patch fixes this for me. It is based on current master (fd45b3f).
[0001-lisp-nxml-nxml-mode-Support-Shift-selection.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24660; Package emacs. (Mon, 10 Oct 2016 16:59:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit--Claudel <clement.pit <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#24660: 24.5; nxml-mode should support shift selection
Date: Mon, 10 Oct 2016 12:57:54 -0400
[Message part 1 (text/plain, inline)]
This looks great.  Thanks!

This kind of bugs exists in a bunch of places :/  The other one that I see all the time is modes that break delete-selection-mode by rebinding certain commands.

Cheers,
Clément.

On 2016-10-10 12:41, Yuri Khan wrote:
> Many movement commands, such as forward-word, forward-sexp,
> forward-sentence, next-line, and their backward counterparts, support
> shift selection. That is, holding down Shift along with their bindings
> causes region to be activated and/or extended.
> 
> $ emacs -Q
> 
> C-x C-f /tmp/test.xml
> 
>     <html>|<head></head><body></body></html>
> 
> C-M-S-<right> ;; C-M-<right> (translated) runs forward-sexp
> 
>     <html>[<head>]</head><body></body></html>
> 
> C-M-S-<right> ;; C-M-<right> (translated) runs forward-sexp
> 
>     <html>[<head></head>]<body></body></html>
> 
> 
> However, nxml-mode’s commands do not behave this way.
> 
>     <html>|<head></head><body></body></html>
> 
> C-M-S-n ;; C-M-n (translated) runs nxml-forward-element
> 
> Expected:
> 
>     <html>[<head></head>]<body></body></html>
> 
> Observed:
> 
>     <html><head></head>|<body></body></html>
> 
> 
> The attached patch fixes this for me. It is based on current master (fd45b3f).
> 

[signature.asc (application/pgp-signature, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 18 Oct 2016 06:47:01 GMT) Full text and rfc822 format available.

Notification sent to Yuri Khan <yuri.v.khan <at> gmail.com>:
bug acknowledged by developer. (Tue, 18 Oct 2016 06:47:02 GMT) Full text and rfc822 format available.

Message #13 received at 24660-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuri Khan <yuri.v.khan <at> gmail.com>
Cc: 24660-done <at> debbugs.gnu.org
Subject: Re: bug#24660: 24.5; nxml-mode should support shift selection
Date: Tue, 18 Oct 2016 09:46:19 +0300
> From: Yuri Khan <yuri.v.khan <at> gmail.com>
> Date: Mon, 10 Oct 2016 22:41:37 +0600
> 
> Many movement commands, such as forward-word, forward-sexp,
> forward-sentence, next-line, and their backward counterparts, support
> shift selection. That is, holding down Shift along with their bindings
> causes region to be activated and/or extended.
> 
> $ emacs -Q
> 
> C-x C-f /tmp/test.xml
> 
>     <html>|<head></head><body></body></html>
> 
> C-M-S-<right> ;; C-M-<right> (translated) runs forward-sexp
> 
>     <html>[<head>]</head><body></body></html>
> 
> C-M-S-<right> ;; C-M-<right> (translated) runs forward-sexp
> 
>     <html>[<head></head>]<body></body></html>
> 
> 
> However, nxml-mode’s commands do not behave this way.
> 
>     <html>|<head></head><body></body></html>
> 
> C-M-S-n ;; C-M-n (translated) runs nxml-forward-element
> 
> Expected:
> 
>     <html>[<head></head>]<body></body></html>
> 
> Observed:
> 
>     <html><head></head>|<body></body></html>
> 
> 
> The attached patch fixes this for me. It is based on current master (fd45b3f).

Thanks, pushed to master.

In the future, please provide ChangeLog-style commit log messages as
described in CONTRIBUTE.

Also, I encourage you to start the legal paperwork for assigning to
the FSF the copyright of your changes, so that we could continue
accepting your contributions without any limitations.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Nov 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.