emacs で削除されたテキストを gnu screen で共有

emacs で削除されたテキストを gnu screen で共有

emacs で削除したテキストを自動的に画面のクリップボードに挿入したいです。逆方向の移動についてはあまり気にしません。一時ファイル経由で実行できますが、そのたびに画面のデータを取得するコマンドを実行する必要があります。

答え1

変数を変更して、interprogram-cut-function削除されたすべてのテキストを画面のクリップボードにプッシュする関数を値として設定することができます (おそらく、x-select-textデフォルト値である を介してウィンドウ システムのクリップボードにもプッシュされます)。その結果、次のようなコードをファイルに追加することになるでしょう~/.emacs

(setq interprogram-cut-function 'my-interprogram-cut-function)

(defun my-interprogram-cut-function (text)
  "... docstring here ..."

  ;; First, do the default action.
  (x-select-text text)

  ;; Next, push the killed text into screen (somehow).
  ...)

最後の部分では、おそらく を使用したプロセスの実行が必要になりますstart-process

関連情報