* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
@ 2010-07-20 10:13 Peter Dyballa
2010-07-20 22:18 ` David De La Harpe Golden
2010-08-18 6:22 ` Jan Djärv
0 siblings, 2 replies; 14+ messages in thread
From: Peter Dyballa @ 2010-07-20 10:13 UTC (permalink / raw)
To: 6677
Hello!
Although it obviously works to copy some text in an X client or in a
Mac OS X application and paste it into the *scratch* buffer it does
not work to mark some text in any buffer of the NS variant and either
use the Copy entry from the Edit menu or just press ⌘-C (Cmd-C) and
insert (paste) it into the X client or a Mac OS X application (the
name of the application in the bar only flashes, because some bad
content, not fitting into the text pane, is held in pasteboard?).
Additionally double-click to mark a word is interpreted as <down-
mouse-1> <mouse-1>, bound to mouse-drag-region. I don't think that
this is desirable...
In GNU Emacs 24.0.50.1 (powerpc-apple-darwin9.8.0, NS apple-
appkit-949.54)
of 2010-07-16 on Latsche.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure '--without-sound' '--without-dbus' '--
without-pop' '--without-gconf' '--with-ns' '--disable-ns-self-
contained' '--x-libraries=/usr/X11/lib' '--x-includes=/usr/X11/
include' '--enable-locallisppath=/Library/Application Support/Emacs/
calendar24:/Library/Application Support/Emacs' 'CFLAGS=-g -H -Wno-
pointer-sign -pipe -fPIC -fno-common -mcpu=7450 -mtune=7450 -O0'
'CPPFLAGS=' 'LDFLAGS=' 'PKG_CONFIG_PATH=/sw/lib/pango-ft219/lib/
pkgconfig:/sw/lib/xft2/lib/pkgconfig:/sw/lib/fontconfig2/lib/
pkgconfig:/sw/lib/freetype219/lib/pkgconfig:/sw/lib/pkgconfig:/sw/
share/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig:/usr/X11/
share/pkgconfig''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: de_DE.UTF-8
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: de_DE.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: nXML
Minor modes in effect:
image-minor-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<down-mouse-1> <mouse-1> C-h v i m a g e - t y <tab>
s <return> <help-echo> C-x C-f s-v <backspace> <return>
C-c C-c <tool-bar> <help>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Type C-x 1 to delete the help window.
Note: file is write protected
Using vacuous schema
Type C-c C-c to view the image as an image.
Cannot display image: (Invalid image type `svg')
Using vacuous schema
Type C-c C-c to view the image as an image.
Cannot display image: (Invalid image type `svg')
Load-path shadows:
/Library/Application Support/Emacs/calendar24/solar hides /usr/local/
share/emacs/24.0.50/lisp/calendar/solar
/Library/Application Support/Emacs/calendar24/lunar hides /usr/local/
share/emacs/24.0.50/lisp/calendar/lunar
/Library/Application Support/Emacs/calendar24/holidays hides /usr/
local/share/emacs/24.0.50/lisp/calendar/holidays
/Library/Application Support/Emacs/calendar24/diary-lib hides /usr/
local/share/emacs/24.0.50/lisp/calendar/diary-lib
/Library/Application Support/Emacs/calendar24/calendar hides /usr/
local/share/emacs/24.0.50/lisp/calendar/calendar
/Library/Application Support/Emacs/calendar24/cal-x hides /usr/local/
share/emacs/24.0.50/lisp/calendar/cal-x
/Library/Application Support/Emacs/calendar24/cal-move hides /usr/
local/share/emacs/24.0.50/lisp/calendar/cal-move
/Library/Application Support/Emacs/calendar24/cal-menu hides /usr/
local/share/emacs/24.0.50/lisp/calendar/cal-menu
Features:
(shadow sort gnus-util mail-extr message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug
nxml-uchnm rng-xsd xsd-regexp rng-cmpct regexp-opt rng-nxml rng-valid
rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn
nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc
xmltok image-mode pp help-mode view help-fns tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)
--
Mit friedvollen Grüßen
Pete === -Q
==<__/% >>
_____________(_)____@_____________________________
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-20 10:13 bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly Peter Dyballa
@ 2010-07-20 22:18 ` David De La Harpe Golden
2010-07-21 1:47 ` David De La Harpe Golden
` (2 more replies)
2010-08-18 6:22 ` Jan Djärv
1 sibling, 3 replies; 14+ messages in thread
From: David De La Harpe Golden @ 2010-07-20 22:18 UTC (permalink / raw)
To: 6677; +Cc: Peter Dyballa, Chong Yidong
[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]
On 20/07/10 11:13, Peter Dyballa wrote:
> Hello!
>
> Although it obviously works to copy some text in an X client or in a Mac
> OS X application and paste it into the *scratch* buffer it does not work
> to mark some text in any buffer of the NS variant and either use the
> Copy entry from the Edit menu or just press ⌘-C (Cmd-C) and insert
> (paste) it into the X client or a Mac OS X application (the name of the
> application in the bar only flashes, because some bad content, not
> fitting into the text pane, is held in pasteboard?).
>
My MacOSX/GNUStep/ObjC, while not quite non-existent, is not amazing.
But it looks to me like src/nsselect.m needs some adjustment so it can
handle recent changes to defaults (and N.B. in fact to handle settings
that have been possible for a long time)
It looks like it has been mapping NSGeneralPBoard (the macosx "normal"
cut/copy/paste clipboard) to an emulated X11 PRIMARY, when in fact
NSGeneralPBoard is much more closely analagous to X11 CLIPBOARD.
*** Since x11 emacs is now actually using X11 CLIPBOARD, it is likely
that the attached _untested_ but minor patch or something very like it
is correct on nextstep.
Can you try building an emacs with the patch on macosx?
Note that even with the patch applied, it may not act quite the same as
before, but that is not necessarily a bug but rather a change.
(N.B. it should be possible to get historical behaviour back (even
though looking at nsselect.m it was probably a bit odd) by twiddling
customizations).
> Additionally double-click to mark a word is interpreted as
> <down-mouse-1> <mouse-1>, bound to mouse-drag-region. I don't think that
> this is desirable...
N.B. Mouse-drag-region calls mouse-drag-track which calls
mouse-start-end to _implement_ double-click to mark a word, perhaps not
intuitively given the name. So does double-clicking nonetheless actually
mark the word on NS?
[-- Attachment #2: ns-clipboard-pboard_r1.diff --]
[-- Type: text/x-patch, Size: 2518 bytes --]
--- src/nsselect.m.orig 2010-07-20 22:44:08.000000000 +0100
+++ src/nsselect.m 2010-07-20 22:53:05.000000000 +0100
@@ -31,51 +31,56 @@
#include <setjmp.h>
#include "lisp.h"
#include "nsterm.h"
#include "termhooks.h"
#define CUT_BUFFER_SUPPORT
-Lisp_Object QPRIMARY, QSECONDARY, QTEXT, QFILE_NAME;
+Lisp_Object QCLIPBOARD, QPRIMARY, QSECONDARY, QTEXT, QFILE_NAME;
static Lisp_Object Vns_sent_selection_hooks;
static Lisp_Object Vns_lost_selection_hooks;
static Lisp_Object Vselection_alist;
static Lisp_Object Vselection_converter_alist;
static Lisp_Object Qforeign_selection;
+/* NSGeneralPboard is pretty much analogous to X11 CLIPBOARD */
+NSString *NXPrimaryPboard;
NSString *NXSecondaryPboard;
/* ==========================================================================
Internal utility functions
========================================================================== */
static NSString *
symbol_to_nsstring (Lisp_Object sym)
{
CHECK_SYMBOL (sym);
- if (EQ (sym, QPRIMARY)) return NSGeneralPboard;
+ if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
+ if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
}
static Lisp_Object
ns_string_to_symbol (NSString *t)
{
if ([t isEqualToString: NSGeneralPboard])
+ return QCLIPBOARD;
+ if ([t isEqualToString: NXPrimaryPboard])
return QPRIMARY;
if ([t isEqualToString: NXSecondaryPboard])
return QSECONDARY;
if ([t isEqualToString: NSStringPboardType])
return QTEXT;
if ([t isEqualToString: NSFilenamesPboardType])
return QFILE_NAME;
if ([t isEqualToString: NSTabularTextPboardType])
@@ -531,22 +536,24 @@
return Qnil;
}
#endif
void
nxatoms_of_nsselect (void)
{
- NXSecondaryPboard = @"Selection";
+ NXPrimaryPboard = @"PrimarySelection";
+ NXSecondaryPboard = @"SecondarySelection";
}
void
syms_of_nsselect (void)
{
+ QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD);
QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY);
QSECONDARY = intern ("SECONDARY"); staticpro (&QSECONDARY);
QTEXT = intern ("TEXT"); staticpro (&QTEXT);
QFILE_NAME = intern ("FILE_NAME"); staticpro (&QFILE_NAME);
defsubr (&Sx_disown_selection_internal);
defsubr (&Sx_get_selection_internal);
defsubr (&Sx_own_selection_internal);
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-20 22:18 ` David De La Harpe Golden
@ 2010-07-21 1:47 ` David De La Harpe Golden
2010-07-21 10:26 ` Peter Dyballa
2010-07-25 6:56 ` David De La Harpe Golden
2 siblings, 0 replies; 14+ messages in thread
From: David De La Harpe Golden @ 2010-07-21 1:47 UTC (permalink / raw)
To: 6677; +Cc: Chong Yidong, rick frankel, Peter Dyballa
On 20/07/10 23:18, David De La Harpe Golden wrote:
> *** Since x11 emacs is now actually using X11 CLIPBOARD, it is likely
> that the attached _untested_ but minor patch or something very like it
> is correct on nextstep.
>
> Can you try building an emacs with the patch on macosx?
>
> Note that even with the patch applied, it may not act quite the same as
> before, but that is not necessarily a bug but rather a change.
Er, actually chunks of lisp/term/ns-win.el likely need rewriting too.
(the repeated use of the phrase "cut buffer" is particularly worrying -
in X11 terms, that means "obsolete thingy that basically no-one uses,
replaced by the selections mechanism many years ago").
That previous patch is probably necessary but not sufficient.
Basically someone who knows enough of both X11 and nextstep/macosx needs
to sort things out. I guess that just about includes me for these
purposes, but it isn't something I can sort out during the week, and I
don't have an extant macosx development environment either (though I
suppose gnustep is an apt-get away).
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-20 22:18 ` David De La Harpe Golden
2010-07-21 1:47 ` David De La Harpe Golden
@ 2010-07-21 10:26 ` Peter Dyballa
2010-07-21 22:35 ` David De La Harpe Golden
2010-07-25 6:56 ` David De La Harpe Golden
2 siblings, 1 reply; 14+ messages in thread
From: Peter Dyballa @ 2010-07-21 10:26 UTC (permalink / raw)
To: David De La Harpe Golden; +Cc: 6677, Chong Yidong
Am 21.07.2010 um 00:18 schrieb David De La Harpe Golden:
> Can you try building an emacs with the patch on macosx?
Yesterday, at UTC evening, I updated with bzr. The build did not copy.
Today, after a 'make clean', I applied your patch and re-compiled. No
change, still copying from the NS variant to other Mac OS X
applications or X clients does not work. One change happened, when
pasting what I marked and copied in X11 or a Mac OS X application:
Quit: "pasteboard doesn't contain valid data"
Maybe the copy&paste code could be made smaller since the X servers in
Snow Leopard have built-in a synching mechanism with the Mac OS X
pasteboard and up-to-date X servers in Leopard have it too. Only the
original Apple X server lacks this, but can be configured to work
similarly.
>
>> Additionally double-click to mark a word is interpreted as
>> <down-mouse-1> <mouse-1>, bound to mouse-drag-region. I don't think
>> that
>> this is desirable...
>
> N.B. Mouse-drag-region calls mouse-drag-track which calls mouse-
> start-end to _implement_ double-click to mark a word, perhaps not
> intuitively given the name. So does double-clicking nonetheless
> actually mark the word on NS?
Yes, it does. In the beginning I found that this did not copy the word
to the pasteboard, so I assumed some key binding might have changed,
but they haven't. A working (and installed in /Applications) copy from
middle of June describes double-click as the same – and copies the
word to Mac OS X pasteboard and X11 PRIMARY selection (or XQuartz
2.5.1 (xorg-server 1.8.99.904) from MacPorts is synching OS X and X11).
--
Greetings
Pete
The next generation of interesting software will be done on the
Macintosh, not the IBM PC.
– Bill Gates, Nov 1984)
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-21 10:26 ` Peter Dyballa
@ 2010-07-21 22:35 ` David De La Harpe Golden
2010-07-22 8:22 ` Peter Dyballa
0 siblings, 1 reply; 14+ messages in thread
From: David De La Harpe Golden @ 2010-07-21 22:35 UTC (permalink / raw)
To: Peter Dyballa; +Cc: 6677, Chong Yidong
On 21/07/10 11:26, Peter Dyballa wrote:
>> So does double-clicking nonetheless actually mark the word on NS?
> Yes, it does.
Good, thanks.
> A working (and installed in /Applications) copy from
> middle of June describes double-click as the same – and copies the word
> to Mac OS X pasteboard and X11 PRIMARY selection (or XQuartz 2.5.1
> (xorg-server 1.8.99.904) from MacPorts is synching OS X and X11).
>
Yes, Xquartz is handling syncing - IIUC native NS emacs presently knows
nothing* of real X11 selections, and only interacts with the NS pasteboard.
The Xquartz on OS X manpage documents a set of options you can use to
tune _how_ Xquartz syncs the native OS X pasteboard and the X11
clipboard and/or primary:
http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man1/Xquartz.1.html
[I haven't yet discovered equivalent tunable settings for Cygwin/X, hope
they haven't hardcoded something broken.]
* well, gnustep's gui layer, unlike macosx, sits on top of x11, and some
abstractions may be slightly leaky.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-21 22:35 ` David De La Harpe Golden
@ 2010-07-22 8:22 ` Peter Dyballa
2010-07-22 21:17 ` David De La Harpe Golden
0 siblings, 1 reply; 14+ messages in thread
From: Peter Dyballa @ 2010-07-22 8:22 UTC (permalink / raw)
To: David De La Harpe Golden; +Cc: 6677, Chong Yidong
Am 22.07.2010 um 00:35 schrieb David De La Harpe Golden:
> The Xquartz on OS X manpage documents a set of options you can use
> to tune _how_ Xquartz syncs the native OS X pasteboard and the X11
> clipboard and/or primary:
This is not the problem here since I can easily interchange data
between X clients and Mac OS X applications. The NS variant from
middle of June is among these functioning applications, the most
recent builds fail, since they even don't allow to copy data to other
Mac OS X applications.
My comment was mainly targeted to explain that you and NS Emacs don't
need to take care of X11 since up-to-date X11 has means to make the
pasteboard available for X clients. And this works fine.
--
Greetings
Pete
"Klingons do not believe in indentation - except perhaps in the skulls
of their project managers."
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-22 8:22 ` Peter Dyballa
@ 2010-07-22 21:17 ` David De La Harpe Golden
0 siblings, 0 replies; 14+ messages in thread
From: David De La Harpe Golden @ 2010-07-22 21:17 UTC (permalink / raw)
To: Peter Dyballa; +Cc: 6677, Chong Yidong
On 22/07/10 09:22, Peter Dyballa wrote:
>
> Am 22.07.2010 um 00:35 schrieb David De La Harpe Golden:
>
>> The Xquartz on OS X manpage documents a set of options you can use to
>> tune _how_ Xquartz syncs the native OS X pasteboard and the X11
>> clipboard and/or primary:
>
>
> This is not the problem here.
Indeed*.
As per my other mail to this ticket, lisp/term/ns-win.el presently needs
several updates to be able to fully handle some changes made to emacs
default settings, I guess it was not really written to deal with
settings other than the old defaults (i.e. the new settings would have
broken it whether they were default or not).
I'll be taking a look at the weekend (n.b. the set of people with enough
*step and x11 experience to fix it is probably larger than me, assuming
I'm even in it).
> My comment was mainly targeted to explain that you and NS Emacs don't
> need to take care of X11
Fair enough, I thought /you/ were unsure "(or..."
* Xquartz' configuration options in the area are something for emacs
devs looking at bug reports to be aware of though - different mac users
could easily have different sync behaviours configured which will cause
different symptoms (I'm also thinking of effects on x11 emacs running
under Xquartz).
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-20 22:18 ` David De La Harpe Golden
2010-07-21 1:47 ` David De La Harpe Golden
2010-07-21 10:26 ` Peter Dyballa
@ 2010-07-25 6:56 ` David De La Harpe Golden
2010-08-08 23:01 ` David De La Harpe Golden
2 siblings, 1 reply; 14+ messages in thread
From: David De La Harpe Golden @ 2010-07-25 6:56 UTC (permalink / raw)
To: 6677; +Cc: Peter Dyballa, Chong Yidong
On 20/07/10 23:18, David De La Harpe Golden wrote:
> *** Since x11 emacs is now actually using X11 CLIPBOARD, it is likely
> that the attached _untested_ but minor patch or something very like it
> is correct on nextstep.
>
Update: Taking a bit longer than I expected, mostly thanks to debian's
gnustep packages having some known bugs on amd64 that _I_ didn't know
about, could have saved myself a _lot_ of time just latest svn gnustep
in the first place, gah.
One work-in-progess note: Turns out that first patch wasn't quite
correct either, modern GNUstep's "gpbs" pasteboard daemon actually
supports a conventional [1] mapping to X11 selections, as follows,
visible in [2]
x11 side ns side
CLIPBOARD General Pasteboard
PRIMARY "Selection" named pasteboard
SECONDARY "Secondary" named pasteboard
(Wonder if the Xquartz guys are aware of that...)
I think it is quite obviously desirable that ns emacs adopt that scheme.
[1] At one stage gnustep did use a different scheme, there is still a
backward compat defaults setting that flips them around
("GSOldClipboard"), but the default is now the above, thankfully.
[2]
http://svn.gna.org/viewcvs/gnustep/libs/back/trunk/Tools/xpbs.m?rev=29270&view=markup
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-25 6:56 ` David De La Harpe Golden
@ 2010-08-08 23:01 ` David De La Harpe Golden
2010-08-09 23:05 ` Peter Dyballa
0 siblings, 1 reply; 14+ messages in thread
From: David De La Harpe Golden @ 2010-08-08 23:01 UTC (permalink / raw)
To: 6677; +Cc: Peter Dyballa
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
On 25/07/10 07:56, David De La Harpe Golden wrote:
> x11 side ns side
> CLIPBOARD General Pasteboard
> PRIMARY "Selection" named pasteboard
> SECONDARY "Secondary" named pasteboard
Updated patch that at least does this. There are be
remaining issues, but it should work a bit better on macosx as well.
[-- Attachment #2: ns-clipboard-pboard_r2.diff --]
[-- Type: text/x-patch, Size: 3769 bytes --]
=== modified file 'lisp/term/ns-win.el'
--- lisp/term/ns-win.el 2010-07-13 10:41:49 +0000
+++ lisp/term/ns-win.el 2010-08-08 22:40:49 +0000
@@ -998,25 +998,25 @@
;;;; Pasteboard support.
(declare-function ns-get-cut-buffer-internal "nsselect.m" (buffer))
(defun ns-get-pasteboard ()
"Returns the value of the pasteboard."
- (ns-get-cut-buffer-internal 'PRIMARY))
+ (ns-get-cut-buffer-internal 'CLIPBOARD))
(declare-function ns-store-cut-buffer-internal "nsselect.m" (buffer string))
(defun ns-set-pasteboard (string)
"Store STRING into the pasteboard of the Nextstep display server."
;; Check the data type of STRING.
(if (not (stringp string)) (error "Nonstring given to pasteboard"))
- (ns-store-cut-buffer-internal 'PRIMARY string))
+ (ns-store-cut-buffer-internal 'CLIPBOARD string))
;; We keep track of the last text selected here, so we can check the
;; current selection against it, and avoid passing back our own text
;; from x-cut-buffer-or-selection-value.
(defvar ns-last-selected-text nil)
(defun x-select-text (text &optional push)
"Select TEXT, a string, according to the window system.
=== modified file 'src/nsselect.m'
--- src/nsselect.m 2010-07-08 21:25:08 +0000
+++ src/nsselect.m 2010-08-08 20:42:05 +0000
@@ -31,51 +31,56 @@
#include <setjmp.h>
#include "lisp.h"
#include "nsterm.h"
#include "termhooks.h"
#define CUT_BUFFER_SUPPORT
-Lisp_Object QPRIMARY, QSECONDARY, QTEXT, QFILE_NAME;
+Lisp_Object QCLIPBOARD, QPRIMARY, QSECONDARY, QTEXT, QFILE_NAME;
static Lisp_Object Vns_sent_selection_hooks;
static Lisp_Object Vns_lost_selection_hooks;
static Lisp_Object Vselection_alist;
static Lisp_Object Vselection_converter_alist;
static Lisp_Object Qforeign_selection;
-NSString *NXSecondaryPboard;
+/* CLIPBOARD mapped to NSGeneralPboard */
+NSString *NXPrimaryPboard;
+NSString *NXSecondaryPboard;
/* ==========================================================================
Internal utility functions
========================================================================== */
static NSString *
symbol_to_nsstring (Lisp_Object sym)
{
CHECK_SYMBOL (sym);
- if (EQ (sym, QPRIMARY)) return NSGeneralPboard;
+ if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
+ if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
}
static Lisp_Object
ns_string_to_symbol (NSString *t)
{
if ([t isEqualToString: NSGeneralPboard])
+ return QCLIPBOARD;
+ if ([t isEqualToString: NXPrimaryPboard])
return QPRIMARY;
if ([t isEqualToString: NXSecondaryPboard])
return QSECONDARY;
if ([t isEqualToString: NSStringPboardType])
return QTEXT;
if ([t isEqualToString: NSFilenamesPboardType])
return QFILE_NAME;
if ([t isEqualToString: NSTabularTextPboardType])
@@ -531,22 +536,27 @@
return Qnil;
}
#endif
void
nxatoms_of_nsselect (void)
{
- NXSecondaryPboard = @"Selection";
+ /* These are the names GNUStep's pasteboard daemon uses,
+ using them for interoperability */
+
+ NXPrimaryPboard = @"Selection";
+ NXSecondaryPboard = @"Secondary";
}
void
syms_of_nsselect (void)
{
+ QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD);
QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY);
QSECONDARY = intern ("SECONDARY"); staticpro (&QSECONDARY);
QTEXT = intern ("TEXT"); staticpro (&QTEXT);
QFILE_NAME = intern ("FILE_NAME"); staticpro (&QFILE_NAME);
defsubr (&Sx_disown_selection_internal);
defsubr (&Sx_get_selection_internal);
defsubr (&Sx_own_selection_internal);
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-08-08 23:01 ` David De La Harpe Golden
@ 2010-08-09 23:05 ` Peter Dyballa
2010-08-09 23:58 ` David De La Harpe Golden
0 siblings, 1 reply; 14+ messages in thread
From: Peter Dyballa @ 2010-08-09 23:05 UTC (permalink / raw)
To: David De La Harpe Golden; +Cc: 6677
Am 09.08.2010 um 01:01 schrieb David De La Harpe Golden:
> Updated patch that at least does this. There are be
> remaining issues, but it should work a bit better on macosx as well.
Great work, David! It works well in both directions! I'll start
working with it tomorrow (it's now after midnight here).
--
Greetings
Pete
When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
– Rinzai, ninth century Zen master
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-08-09 23:05 ` Peter Dyballa
@ 2010-08-09 23:58 ` David De La Harpe Golden
0 siblings, 0 replies; 14+ messages in thread
From: David De La Harpe Golden @ 2010-08-09 23:58 UTC (permalink / raw)
To: Peter Dyballa; +Cc: 6677
On 10/08/10 00:05, Peter Dyballa wrote:
>
> Am 09.08.2010 um 01:01 schrieb David De La Harpe Golden:
>
>> Updated patch that at least does this. There are be
>> remaining issues, but it should work a bit better on macosx as well.
>
>
> Great work, David!
Well, thanks, though I confess it is now mostly-working because of a
reimplementation Chong Yidong did of select-active-regions, and Jan
Djärv's adjustment to term/ns-win.el in the patch.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-07-20 10:13 bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly Peter Dyballa
2010-07-20 22:18 ` David De La Harpe Golden
@ 2010-08-18 6:22 ` Jan Djärv
2010-08-18 21:56 ` David De La Harpe Golden
1 sibling, 1 reply; 14+ messages in thread
From: Jan Djärv @ 2010-08-18 6:22 UTC (permalink / raw)
To: 6677-done
I checked in the patch so we can deal with any possible remaining selection
changes that may happen in Emacs.
Jan D.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-08-18 6:22 ` Jan Djärv
@ 2010-08-18 21:56 ` David De La Harpe Golden
2010-08-19 5:57 ` Jan Djärv
0 siblings, 1 reply; 14+ messages in thread
From: David De La Harpe Golden @ 2010-08-18 21:56 UTC (permalink / raw)
To: 6677, jan.h.d
On 18/08/10 07:22, Jan Djärv wrote:
> I checked in the patch so we can deal with any possible remaining selection
> changes that may happen in Emacs.
>
Hi Jan, you seem to have checked in the earlier GNUStep-incompatible NS
pasteboard names, would you please switch in nsselect.m (line 542):
void
nxatoms_of_nsselect (void)
{
NXPrimaryPboard = @"Selection";
NXSecondaryPboard = @"Secondary";
}
As per the later version of my changes?
That way all of clipboard/primary/secondary work on gnustep/x11
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly
2010-08-18 21:56 ` David De La Harpe Golden
@ 2010-08-19 5:57 ` Jan Djärv
0 siblings, 0 replies; 14+ messages in thread
From: Jan Djärv @ 2010-08-19 5:57 UTC (permalink / raw)
To: David De La Harpe Golden; +Cc: 6677
Done.
Jan D.
David De La Harpe Golden skrev 2010-08-18 23.56:
> On 18/08/10 07:22, Jan Djärv wrote:
>> I checked in the patch so we can deal with any possible remaining selection
>> changes that may happen in Emacs.
>>
>
> Hi Jan, you seem to have checked in the earlier GNUStep-incompatible NS
> pasteboard names, would you please switch in nsselect.m (line 542):
>
> void
> nxatoms_of_nsselect (void)
> {
> NXPrimaryPboard = @"Selection";
> NXSecondaryPboard = @"Secondary";
> }
>
> As per the later version of my changes?
>
> That way all of clipboard/primary/secondary work on gnustep/x11
>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-08-19 5:57 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 10:13 bug#6677: 24.0.50; NS variant cannot copy to pasteboard correctly Peter Dyballa
2010-07-20 22:18 ` David De La Harpe Golden
2010-07-21 1:47 ` David De La Harpe Golden
2010-07-21 10:26 ` Peter Dyballa
2010-07-21 22:35 ` David De La Harpe Golden
2010-07-22 8:22 ` Peter Dyballa
2010-07-22 21:17 ` David De La Harpe Golden
2010-07-25 6:56 ` David De La Harpe Golden
2010-08-08 23:01 ` David De La Harpe Golden
2010-08-09 23:05 ` Peter Dyballa
2010-08-09 23:58 ` David De La Harpe Golden
2010-08-18 6:22 ` Jan Djärv
2010-08-18 21:56 ` David De La Harpe Golden
2010-08-19 5: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).