From c65465698a5140a70b4e89f84450664102814ac7 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Fri, 30 Oct 2020 11:55:44 +0100 Subject: [PATCH] Add a warning referring to the builtin OSC-52 functionality --- etc/osc52.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etc/osc52.el b/etc/osc52.el index 9274500..f7aca6c 100644 --- a/etc/osc52.el +++ b/etc/osc52.el @@ -2,6 +2,11 @@ ;; Use of this source code is governed by a BSD-style license that can be ;; found in the LICENSE file. ;; +;; Warning: Starting with Emacs 26, Emacs contains builtin functionality to +;; support OSC 52. Avoid loading osc52.el under Emacs 26 or later, as it will +;; stomp over that functionality. If copying to the clipboard doesn’t work out +;; of the box, customize the variable ‘xterm-extra-capabilities.’ +;; ;; This script can be loaded during emacs initialization to automatically ;; send `kill-region' and `kill-ring-save' regions to your system clipboard. ;; The OSC 52 terminal escape sequence is used to transfer the selection from @@ -18,6 +23,13 @@ ;; free to submit patches. ;; +(when (>= emacs-major-version 26) + (display-warning 'osc52 + (concat "Emacs supports OSC-52 natively starting with " + "Emacs 26. Loading this library should no longer " + "be necessary. Also see " + "the user option ‘xterm-extra-capabilities’."))) + (defcustom osc52-max-sequence 100000 "Maximum length of the OSC 52 sequence.