कुछ इसी अंक की खुदाई करने के बाद, मुझे विश्वास है कि इस मुद्दे को वास्तव में Emacs x-select-text
समारोह है, जो स्पष्ट रूप से पर x-select-enable-clipboard
का मूल्य पर ध्यान नहीं देता में निहित है नेक्स्टस्टेप (और ओएस एक्स एक नेक्स्टस्टेप है)।
मैं एक नहीं सेशन समारोह के साथ x-select-text
की जगह है, तो स्पष्ट रूप से ns- का उपयोग करके इस समस्या "हल" किया है {, मिल सेट} {interprogram कट, पेस्ट} समारोह के लिए पेस्टबोर्ड:
; Override the default x-select-text function because it doesn't
; respect x-select-enable-clipboard on OS X.
(defun x-select-text (text))
(setq x-select-enable-clipboard nil)
(setq x-select-enable-primary nil)
(setq mouse-drag-copy-region nil)
(setq interprogram-cut-function 'ns-set-pasteboard)
(setq interprogram-paste-function 'ns-get-pasteboard)
यहाँ मूल x-select-text
कोड है:
(defun x-select-text (text)
"Select TEXT, a string, according to the window system.
On X, if `x-select-enable-clipboard' is non-nil, copy TEXT to the
clipboard. If `x-select-enable-primary' is non-nil, put TEXT in
the primary selection.
On MS-Windows, make TEXT the current selection. If
`x-select-enable-clipboard' is non-nil, copy the text to the
clipboard as well.
On Nextstep, put TEXT in the pasteboard (`x-select-enable-clipboard'
is not used)."
(cond ((eq (framep (selected-frame)) 'w32)
(if x-select-enable-clipboard
(w32-set-clipboard-data text))
(setq x-last-selected-text text))
((featurep 'ns) ; This is OS X
;; Don't send the pasteboard too much text.
;; It becomes slow, and if really big it causes errors.
(ns-set-pasteboard text)
(setq ns-last-selected-text text))
(t
;; With multi-tty, this function may be called from a tty frame.
(when (eq (framep (selected-frame)) 'x)
(when x-select-enable-primary
(x-set-selection 'PRIMARY text)
(setq x-last-selected-text-primary text))
(when x-select-enable-clipboard
(x-set-selection 'CLIPBOARD text)
(setq x-last-selected-text-clipboard text))))))
स्रोत
2014-04-23 20:39:00
कोई कारण यह उत्तर बेहतर है? – justingordon
यह सिर्फ ऐविल से नहीं, बल्कि हर जगह कीबोर्ड पर चुने गए चयनित पाठ की समस्या को हल करता है। –
मेरे लिए उन एनएस-सेट-पेस्टबोर्ड, एनएस-गेट-पेस्टबोर्ड मौजूद नहीं प्रतीत होते हैं इसलिए टेक्स्ट इत्यादि करते समय मुझे त्रुटियां मिलती हैं। (Emacs-mac) –