all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* transient mark loss on Shift+PageUp/PageDown
@ 2014-02-11 14:39 Ted Zlatanov
  2014-02-12  1:36 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2014-02-11 14:39 UTC (permalink / raw
  To: emacs-devel

Using customizations:

(shift-select-mode t)
(select-active-regions nil)
(transient-mark-mode t)
(cua-mode t nil (cua-base))

Emacs has started losing the transient mark on Shift+PageUp/PageDown
within the last 3 months.  Ctrl+Up/Down still preserves the region
selection.  I wanted to ask if this is by design with
`shift-select-mode' or a bug.

Sorry if this has been discussed, I couldn't find the discussion or bug
report.

Ted




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

* Re: transient mark loss on Shift+PageUp/PageDown
  2014-02-11 14:39 transient mark loss on Shift+PageUp/PageDown Ted Zlatanov
@ 2014-02-12  1:36 ` Stefan Monnier
  2014-02-12 11:32   ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-02-12  1:36 UTC (permalink / raw
  To: emacs-devel

> (shift-select-mode t)

That's the default.

> (select-active-regions nil)

Presumably this shouldn't make a difference.  If it does, we clearly
have a bug.

> (transient-mark-mode t)

That's the default.

> (cua-mode t nil (cua-base))

Nowadays, this shouldn't make a difference either, but it's a recent
change and may have bugs in that respect, indeed.

> Emacs has started losing the transient mark on Shift+PageUp/PageDown
> within the last 3 months.

Not sure what that means.  But "C-SPC ..movement.. S-prior" will keep
the region active, but the region is delimited not by where you hit
C-SPC but by where you hit S-prior.  That's by design of
shift-select-mode.  Maybe CUA behaved differently in this respect and
since CUA nowadays uses shift-select-mode rather than rolling its own
this could explain the change.

If that doesn't explain what you see, then please provide a test case
(and make it a bug report).


        Stefan



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

* Re: transient mark loss on Shift+PageUp/PageDown
  2014-02-12  1:36 ` Stefan Monnier
@ 2014-02-12 11:32   ` Ted Zlatanov
  2014-02-12 14:49     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2014-02-12 11:32 UTC (permalink / raw
  To: emacs-devel

On Tue, 11 Feb 2014 20:36:58 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

>> (shift-select-mode t)
>> (transient-mark-mode t)
SM> That's the default.

>> (select-active-regions nil)

SM> Presumably this shouldn't make a difference.  If it does, we clearly
SM> have a bug.

>> (cua-mode t nil (cua-base))

SM> Nowadays, this shouldn't make a difference either, but it's a recent
SM> change and may have bugs in that respect, indeed.

>> Emacs has started losing the transient mark on Shift+PageUp/PageDown
>> within the last 3 months.

SM> Not sure what that means.

S-prior and S-next

SM> But "C-SPC ..movement.. S-prior" will keep the region active, but
SM> the region is delimited not by where you hit C-SPC but by where you
SM> hit S-prior.  That's by design of shift-select-mode.  Maybe CUA
SM> behaved differently in this respect and since CUA nowadays uses
SM> shift-select-mode rather than rolling its own this could explain the
SM> change.

SM> If that doesn't explain what you see, then please provide a test case
SM> (and make it a bug report).

I don't think it explains it.  The beginning of the region seems to be
set to the *last* place I hit S-prior/next in some way.

As an example, I added blank lines to the end of this message.  In Gnus,
the message starts with some headers and then your citation line.

I went to the beginning of the buffer, held down Shift, then pressed
`next' (PageDown) several times until I got to the end of the buffer.
Then I copied the selected text (which should have been the whole
buffer, including the headers).  Instead, the region and the copied text
began from the text "SM> If that doesn't explain what you see".

I'll try to formulate a bug report for this.  It's really annoying
because you often end up leaving text you meant to cut, and definitely
used to work correctly.

Thanks
Ted




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

* Re: transient mark loss on Shift+PageUp/PageDown
  2014-02-12 11:32   ` Ted Zlatanov
@ 2014-02-12 14:49     ` Stefan Monnier
  2014-02-12 16:55       ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-02-12 14:49 UTC (permalink / raw
  To: emacs-devel

> I went to the beginning of the buffer, held down Shift, then pressed
> `next' (PageDown) several times until I got to the end of the buffer.
> Then I copied the selected text (which should have been the whole
> buffer, including the headers).  Instead, the region and the copied text
> began from the text "SM> If that doesn't explain what you see".

I see it.  I installed the patch below, which should fix it.


        Stefan


=== modified file 'lisp/emulation/cua-base.el'
*** lisp/emulation/cua-base.el	2014-01-27 21:26:48 +0000
--- lisp/emulation/cua-base.el	2014-02-12 14:36:54 +0000
***************
*** 1085,1091 ****
  A near full screen is `next-screen-context-lines' less than a full screen.
  Negative ARG means scroll downward.
  If ARG is the atom `-', scroll downward by nearly full screen."
!   (interactive "P")
    (cond
     ((eq arg '-) (cua-scroll-down nil))
     ((< (prefix-numeric-value arg) 0)
--- 1085,1091 ----
  A near full screen is `next-screen-context-lines' less than a full screen.
  Negative ARG means scroll downward.
  If ARG is the atom `-', scroll downward by nearly full screen."
!   (interactive "^P")
    (cond
     ((eq arg '-) (cua-scroll-down nil))
     ((< (prefix-numeric-value arg) 0)
***************
*** 1106,1112 ****
  A near full screen is `next-screen-context-lines' less than a full screen.
  Negative ARG means scroll upward.
  If ARG is the atom `-', scroll upward by nearly full screen."
!   (interactive "P")
    (cond
     ((eq arg '-) (cua-scroll-up nil))
     ((< (prefix-numeric-value arg) 0)
--- 1106,1112 ----
  A near full screen is `next-screen-context-lines' less than a full screen.
  Negative ARG means scroll upward.
  If ARG is the atom `-', scroll upward by nearly full screen."
!   (interactive "^P")
    (cond
     ((eq arg '-) (cua-scroll-up nil))
     ((< (prefix-numeric-value arg) 0)




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

* Re: transient mark loss on Shift+PageUp/PageDown
  2014-02-12 14:49     ` Stefan Monnier
@ 2014-02-12 16:55       ` Ted Zlatanov
  0 siblings, 0 replies; 5+ messages in thread
From: Ted Zlatanov @ 2014-02-12 16:55 UTC (permalink / raw
  To: emacs-devel

On Wed, 12 Feb 2014 09:49:07 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

>> I went to the beginning of the buffer, held down Shift, then pressed
>> `next' (PageDown) several times until I got to the end of the buffer.
>> Then I copied the selected text (which should have been the whole
>> buffer, including the headers).  Instead, the region and the copied text
>> began from the text "SM> If that doesn't explain what you see".

SM> I see it.  I installed the patch below, which should fix it.

It does, thank you for catching this so quickly.  I thought I was going
crazy!  (Well, I still might be :)

Ted




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

end of thread, other threads:[~2014-02-12 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 14:39 transient mark loss on Shift+PageUp/PageDown Ted Zlatanov
2014-02-12  1:36 ` Stefan Monnier
2014-02-12 11:32   ` Ted Zlatanov
2014-02-12 14:49     ` Stefan Monnier
2014-02-12 16:55       ` Ted Zlatanov

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.