unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Selected text -> system clipboard on NS?
@ 2010-12-06 13:09 Adrian Robert
  2010-12-06 17:17 ` Jan Djärv
  0 siblings, 1 reply; 16+ messages in thread
From: Adrian Robert @ 2010-12-06 13:09 UTC (permalink / raw)
  To: Emacs Development

Hi,

I know there were some selection changes a while back on the trunk and
one effect on the NS port is that selecting text no longer affects the
system clipboard selection.  You have to actually copy (M-w, Cmd-c) it now.
I was wondering if there was any setting to get the old behavior back?

From a customize-apropos it looked like Select Active Regions or Pc
Selection Mode might have something to do with it, but I couldn't get
them to work.  Nor do I really want to activate transient-mark-mode
which they seem to require.

Just wondering if this is something by design, a bug in the NS port, or
I'm just missing the correct way to do it?

thanks,
Adrian




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

* Re: Selected text -> system clipboard on NS?
  2010-12-06 13:09 Selected text -> system clipboard on NS? Adrian Robert
@ 2010-12-06 17:17 ` Jan Djärv
  2010-12-07 12:36   ` Adrian Robert
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Djärv @ 2010-12-06 17:17 UTC (permalink / raw)
  To: Adrian Robert; +Cc: Emacs Development



Adrian Robert skrev 2010-12-06 14.09:
> Hi,
>
> I know there were some selection changes a while back on the trunk and
> one effect on the NS port is that selecting text no longer affects the
> system clipboard selection.  You have to actually copy (M-w, Cmd-c) it now.
> I was wondering if there was any setting to get the old behavior back?
>
>  From a customize-apropos it looked like Select Active Regions or Pc
> Selection Mode might have something to do with it, but I couldn't get
> them to work.  Nor do I really want to activate transient-mark-mode
> which they seem to require.
>
> Just wondering if this is something by design, a bug in the NS port, or
> I'm just missing the correct way to do it?

The PRIMARY selection maps to NXPrimary (aka @"Selection") now, as that makes 
sense on GNUStep.  Maybe we should map PRIMARY to the general pasteboard (aka 
clipboard) when not on GNUStep or hijack x-select-enable-clipboard?  AFAIK, 
there is no way to get selected text to the clipboard without a copy (M-w and 
such).

	Jan D.



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

* Re: Selected text -> system clipboard on NS?
  2010-12-06 17:17 ` Jan Djärv
@ 2010-12-07 12:36   ` Adrian Robert
  2010-12-07 17:09     ` Chong Yidong
  0 siblings, 1 reply; 16+ messages in thread
From: Adrian Robert @ 2010-12-07 12:36 UTC (permalink / raw)
  To: Jan Djärv; +Cc: Emacs Development


Jan Djärv kirjoitti 2010/12/06 kello 19:17:

> The PRIMARY selection maps to NXPrimary (aka @"Selection") now, as that makes sense on GNUStep.  Maybe we should map PRIMARY to the general pasteboard (aka clipboard) when not on GNUStep or hijack x-select-enable-clipboard?  AFAIK, there is no way to get selected text to the clipboard without a copy (M-w and such).


The behavior on OS X now is correct as far as what users expect from other apps -- merely selecting text does NOT affect the clipboard.  So I don't think any mandatory remapping is called for.  I'm not sure how 'x-select-enable-clipboard' is interpreted under X.  From the docstring, it seems that if it is set, you still need to explicitly "cut" the text for it to show up on the clipboard, rather than merely selecting it.  Whereas we (or at least I ;-) would want the option to send selected (but not yet cut/copied) text to clipboard (and also primary).  On OS X primary is only used for service calls as far as I know.

-Adrian




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

* Re: Selected text -> system clipboard on NS?
  2010-12-07 12:36   ` Adrian Robert
@ 2010-12-07 17:09     ` Chong Yidong
  2010-12-08  5:23       ` Miles Bader
                         ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Chong Yidong @ 2010-12-07 17:09 UTC (permalink / raw)
  To: Adrian Robert; +Cc: Jan Djärv, Emacs Development

Adrian Robert <adrian.b.robert@gmail.com> writes:

> I'm not sure how x-select-enable-clipboard' is interpreted under X.
> From the docstring, it seems that if it is set, you still need to
> explicitly "cut" the text for it to show up on the clipboard, rather
> than merely selecting it.

The docstring for x-select-enable-clipboard says that it currently has
no effect on NS.  It would be good to bring the NS port in line with the
others; i.e. the NS branch of the code in x-select-text should obey
x-select-enable-clipboard.

> we (or at least I ;-) would want the option to send selected (but not
> yet cut/copied) text to clipboard (and also primary).

Maybe you want to customize mouse-drag-copy-region.



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

* Re: Selected text -> system clipboard on NS?
  2010-12-07 17:09     ` Chong Yidong
@ 2010-12-08  5:23       ` Miles Bader
  2010-12-08  5:47       ` Adrian Robert
  2010-12-11  9:38       ` Adrian Robert
  2 siblings, 0 replies; 16+ messages in thread
From: Miles Bader @ 2010-12-08  5:23 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Adrian Robert, Jan Djärv, Emacs Development

Chong Yidong <cyd@stupidchicken.com> writes:
> It would be good to bring the NS port in line with the
> others; i.e. the NS branch of the code in x-select-text should obey
> x-select-enable-clipboard.

Hmm, that way the NS branch can be dysfunctional-but-correct too!

-Miles

-- 
"I distrust a research person who is always obviously busy on a task."
   --Robert Frosch, VP, GM Research



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

* Re: Selected text -> system clipboard on NS?
  2010-12-07 17:09     ` Chong Yidong
  2010-12-08  5:23       ` Miles Bader
@ 2010-12-08  5:47       ` Adrian Robert
  2010-12-11  9:38       ` Adrian Robert
  2 siblings, 0 replies; 16+ messages in thread
From: Adrian Robert @ 2010-12-08  5:47 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Jan Djärv, Emacs Development


Chong Yidong kirjoitti 2010/12/07 kello 19:09:

> Adrian Robert <adrian.b.robert@gmail.com> writes:
> 
>> I'm not sure how x-select-enable-clipboard' is interpreted under X.
>> From the docstring, it seems that if it is set, you still need to
>> explicitly "cut" the text for it to show up on the clipboard, rather
>> than merely selecting it.
> 
> The docstring for x-select-enable-clipboard says that it currently has
> no effect on NS.  It would be good to bring the NS port in line with the
> others; i.e. the NS branch of the code in x-select-text should obey
> x-select-enable-clipboard.


If I'm understanding the doc string correctly, there would be nothing to do under NS since clipboard is always used when explicitly cutting/copying text on NS (like Windows).  Probably the doc could be improved to clarify that NS and Windows are similar here (though NS *does* have a primary as I mentioned before).



>> we (or at least I ;-) would want the option to send selected (but not
>> yet cut/copied) text to clipboard (and also primary).
> 
> Maybe you want to customize mouse-drag-copy-region.


Thanks!


-Adrian





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

* Re: Selected text -> system clipboard on NS?
  2010-12-07 17:09     ` Chong Yidong
  2010-12-08  5:23       ` Miles Bader
  2010-12-08  5:47       ` Adrian Robert
@ 2010-12-11  9:38       ` Adrian Robert
  2010-12-11 12:13         ` Jan Djärv
  2 siblings, 1 reply; 16+ messages in thread
From: Adrian Robert @ 2010-12-11  9:38 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Jan Djärv, Emacs Development

Another question.

In the NS port trunk, if you hit Ctrl-space [set mark], then mouse-click on another point, the region is cleared.  (Running with -Q.)  Previously this has set the region to between point and mark.  Is this an intended behavior or unintended consequence of recent changes?

thanks,
Adrian


Chong Yidong kirjoitti 2010/12/07 kello 19:09:

> Adrian Robert <adrian.b.robert@gmail.com> writes:
> 
>> I'm not sure how x-select-enable-clipboard' is interpreted under X.
>> From the docstring, it seems that if it is set, you still need to
>> explicitly "cut" the text for it to show up on the clipboard, rather
>> than merely selecting it.
> 
> The docstring for x-select-enable-clipboard says that it currently has
> no effect on NS.  It would be good to bring the NS port in line with the
> others; i.e. the NS branch of the code in x-select-text should obey
> x-select-enable-clipboard.
> 
>> we (or at least I ;-) would want the option to send selected (but not
>> yet cut/copied) text to clipboard (and also primary).
> 
> Maybe you want to customize mouse-drag-copy-region.




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

* Re: Selected text -> system clipboard on NS?
  2010-12-11  9:38       ` Adrian Robert
@ 2010-12-11 12:13         ` Jan Djärv
  2010-12-13 17:28           ` Adrian Robert
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Djärv @ 2010-12-11 12:13 UTC (permalink / raw)
  To: Adrian Robert; +Cc: Chong Yidong, Emacs Development

It does so for the X port as well.

	Jan D.

Adrian Robert skrev 2010-12-11 10.38:
> Another question.
>
> In the NS port trunk, if you hit Ctrl-space [set mark], then mouse-click on
> another point, the region is cleared.  (Running with -Q.)  Previously this
> has set the region to between point and mark.  Is this an intended behavior
> or unintended consequence of recent changes?
>
> thanks, Adrian



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

* Re: Selected text -> system clipboard on NS?
  2010-12-11 12:13         ` Jan Djärv
@ 2010-12-13 17:28           ` Adrian Robert
  2010-12-13 20:42             ` David De La Harpe Golden
  0 siblings, 1 reply; 16+ messages in thread
From: Adrian Robert @ 2010-12-13 17:28 UTC (permalink / raw)
  To: Jan Djärv; +Cc: Chong Yidong, Emacs Development


Jan Djärv kirjoitti 2010/12/11 kello 14:13:

> It does so for the X port as well.


Thanks..  I take by this and the lack of other response that this IS an intended feature then.

So how are people selecting regions extending over multiple pages now?

My old method, now broken, was to hit Ctrl-spc, page up or down to roughly the other end of where I wanted, then click the mouse to the exact place.  Now If I want to do this I have to avoid using the mouse, since that will reset the mark and destroy the region.


thanks,
Adrian




> Adrian Robert skrev 2010-12-11 10.38:
>> Another question.
>> 
>> In the NS port trunk, if you hit Ctrl-space [set mark], then mouse-click on
>> another point, the region is cleared.  (Running with -Q.)  Previously this
>> has set the region to between point and mark.  Is this an intended behavior
>> or unintended consequence of recent changes?
>> 
>> thanks, Adrian




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

* Re: Selected text -> system clipboard on NS?
  2010-12-13 17:28           ` Adrian Robert
@ 2010-12-13 20:42             ` David De La Harpe Golden
  2010-12-13 21:09               ` Selected text -&gt; " Adrian Robert
  2010-12-13 21:17               ` Selected text -> " Jan Djärv
  0 siblings, 2 replies; 16+ messages in thread
From: David De La Harpe Golden @ 2010-12-13 20:42 UTC (permalink / raw)
  To: emacs-devel

On 13/12/10 17:28, Adrian Robert wrote:

> My old method, now broken, was to hit Ctrl-spc, page up or down to roughly the other
 > > end of where I wanted, then click the mouse to the exact place.

We-ell, the usual Ctrl-SPC then mouse-3 (right mouse button) should 
still be working (untested latest trunk though) ...though I acknowledge 
macs are infamously mouse-button-deficient.

I haven't managed to wade through the large history of mails in this 
area to see if there was a recorded decision, my holiday period emacs 
time doesn't really start for a few days yet.




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

* Re: Selected text -&gt; system clipboard on NS?
  2010-12-13 20:42             ` David De La Harpe Golden
@ 2010-12-13 21:09               ` Adrian Robert
  2010-12-13 21:36                 ` David De La Harpe Golden
  2010-12-13 21:17               ` Selected text -> " Jan Djärv
  1 sibling, 1 reply; 16+ messages in thread
From: Adrian Robert @ 2010-12-13 21:09 UTC (permalink / raw)
  To: emacs-devel

David De La Harpe Golden <david <at> harpegolden.net> writes:

> 
> On 13/12/10 17:28, Adrian Robert wrote:
> 
> > My old method, now broken, was to hit Ctrl-spc, page up or down to roughly
the other
>  > > end of where I wanted, then click the mouse to the exact place.
> 
> We-ell, the usual Ctrl-SPC then mouse-3 (right mouse button) should 
> still be working (untested latest trunk though)


This works under NS in transient-mark-mode, but not otherwise.  It's late and my
X build is not working.  Is this how it works under X as well?  I cannot see
anything in the related doc strings that seems to indicate this difference in
behavior.








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

* Re: Selected text -> system clipboard on NS?
  2010-12-13 20:42             ` David De La Harpe Golden
  2010-12-13 21:09               ` Selected text -&gt; " Adrian Robert
@ 2010-12-13 21:17               ` Jan Djärv
  2010-12-13 21:43                 ` David De La Harpe Golden
  1 sibling, 1 reply; 16+ messages in thread
From: Jan Djärv @ 2010-12-13 21:17 UTC (permalink / raw)
  To: David De La Harpe Golden; +Cc: emacs-devel



David De La Harpe Golden skrev 2010-12-13 21.42:
> On 13/12/10 17:28, Adrian Robert wrote:
>
>> My old method, now broken, was to hit Ctrl-spc, page up or down to roughly
>> the other
>  > > end of where I wanted, then click the mouse to the exact place.
>
> We-ell, the usual Ctrl-SPC then mouse-3 (right mouse button) should still be
> working (untested latest trunk though) ...though I acknowledge macs are
> infamously mouse-button-deficient.
>

Ctrl-space then shift-mouse-1 seems to work.

	Jan D.



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

* Re: Selected text -&gt; system clipboard on NS?
  2010-12-13 21:09               ` Selected text -&gt; " Adrian Robert
@ 2010-12-13 21:36                 ` David De La Harpe Golden
  0 siblings, 0 replies; 16+ messages in thread
From: David De La Harpe Golden @ 2010-12-13 21:36 UTC (permalink / raw)
  To: Adrian Robert; +Cc: emacs-devel

On 13/12/10 21:09, Adrian Robert wrote:
> David De La Harpe Golden<david<at>  harpegolden.net>  writes:
>
>>
>> On 13/12/10 17:28, Adrian Robert wrote:
>>
>>> My old method, now broken, was to hit Ctrl-spc, page up or down to roughly
> the other
>>   >  >  end of where I wanted, then click the mouse to the exact place.
>>
>> We-ell, the usual Ctrl-SPC then mouse-3 (right mouse button) should
>> still be working (untested latest trunk though)
>
>
> This works under NS in transient-mark-mode, but not otherwise.  It's late and my
> X build is not working.  Is this how it works under X as well?  I cannot see
> anything in the related doc strings that seems to indicate this difference in
> behavior.
>

Hmm. with transient-mark-mode off, it goes from the last position of the 
_point_ on X11 to wherever you clicked mouse-3, going into temporarily 
active mode.  Since emacs famously keeps the point onscreen 
come-hell-or-high-water, that doesn't help for larger-than-screen.

That is pretty similar behaviour to X11 emacs 22.3 with t-m-m off, mind!

And x11 emacs 22.3 also deactivates when transient-mark-mode is on and 
you c-spc then mouse-1 in my testing, so maybe this was some NS-specific 
adjustment that's been lost?







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

* Re: Selected text -> system clipboard on NS?
  2010-12-13 21:17               ` Selected text -> " Jan Djärv
@ 2010-12-13 21:43                 ` David De La Harpe Golden
  2010-12-13 21:45                   ` David De La Harpe Golden
  2010-12-13 21:57                   ` Jan Djärv
  0 siblings, 2 replies; 16+ messages in thread
From: David De La Harpe Golden @ 2010-12-13 21:43 UTC (permalink / raw)
  To: emacs-devel

On 13/12/10 21:17, Jan Djärv wrote:


>Ctrl-space then shift-mouse-1 seems to work.

Of course, shift-mouse-1 pops up a menu on X11.

That was something of a symmetry, actually:

            emacs          other-apps
S-mouse-1  menu           adjust sel.
mouse-3    adjust sel.    menu

(though the menu for other-apps is typically a "context menu" and 
heavily used whereas for emacs it's a font select thing  ...and then 
certain emacs major modes hijack mouse-3 to imitate other-app's context 
menus, leaving you without a mouse-3 and two different menus, sigh).











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

* Re: Selected text -> system clipboard on NS?
  2010-12-13 21:43                 ` David De La Harpe Golden
@ 2010-12-13 21:45                   ` David De La Harpe Golden
  2010-12-13 21:57                   ` Jan Djärv
  1 sibling, 0 replies; 16+ messages in thread
From: David De La Harpe Golden @ 2010-12-13 21:45 UTC (permalink / raw)
  To: emacs-devel

On 13/12/10 21:43, David De La Harpe Golden wrote:
> without a mouse-3
without a adjust sel, I mean..



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

* Re: Selected text -> system clipboard on NS?
  2010-12-13 21:43                 ` David De La Harpe Golden
  2010-12-13 21:45                   ` David De La Harpe Golden
@ 2010-12-13 21:57                   ` Jan Djärv
  1 sibling, 0 replies; 16+ messages in thread
From: Jan Djärv @ 2010-12-13 21:57 UTC (permalink / raw)
  To: David De La Harpe Golden; +Cc: emacs-devel



David De La Harpe Golden skrev 2010-12-13 22.43:
> On 13/12/10 21:17, Jan Djärv wrote:
>
>
>> Ctrl-space then shift-mouse-1 seems to work.
>
> Of course, shift-mouse-1 pops up a menu on X11.
>

Yes, it is ns-specific.  In ns-win.el:
;; Allow shift-clicks to work similarly to under Nextstep.
(define-key global-map [S-mouse-1] 'mouse-save-then-kill)
(global-unset-key [S-down-mouse-1])

I guess the context menu isn't available for NS, not that I missed it.


> That was something of a symmetry, actually:
>
> emacs other-apps
> S-mouse-1 menu adjust sel.
> mouse-3 adjust sel. menu
>
> (though the menu for other-apps is typically a "context menu" and heavily used
> whereas for emacs it's a font select thing ...and then certain emacs major
> modes hijack mouse-3 to imitate other-app's context menus, leaving you without
> a mouse-3 and two different menus, sigh).

I think this was discussed a while back (a long while...).

	Jan D.




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

end of thread, other threads:[~2010-12-13 21:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 13:09 Selected text -> system clipboard on NS? Adrian Robert
2010-12-06 17:17 ` Jan Djärv
2010-12-07 12:36   ` Adrian Robert
2010-12-07 17:09     ` Chong Yidong
2010-12-08  5:23       ` Miles Bader
2010-12-08  5:47       ` Adrian Robert
2010-12-11  9:38       ` Adrian Robert
2010-12-11 12:13         ` Jan Djärv
2010-12-13 17:28           ` Adrian Robert
2010-12-13 20:42             ` David De La Harpe Golden
2010-12-13 21:09               ` Selected text -&gt; " Adrian Robert
2010-12-13 21:36                 ` David De La Harpe Golden
2010-12-13 21:17               ` Selected text -> " Jan Djärv
2010-12-13 21:43                 ` David De La Harpe Golden
2010-12-13 21:45                   ` David De La Harpe Golden
2010-12-13 21:57                   ` Jan Djärv

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