From 9bee34b12abfd2f47bf2b198c0eb5d227c4b4412 Mon Sep 17 00:00:00 2001 From: rmh Date: Mon, 3 Apr 2006 00:36:04 +0000 Subject: [PATCH] this gets most of what I need fixed. C-c C-l and C-c C-d now work correctly on S-Plus GUI, Sqpe, and Rterm. Please check that I haven't broken anything for Unix. C-c C-v needs more adjustment to work on S-Plus and SQpe on windows. git-svn-id: https://svn.r-project.org/ESS/trunk@3561 0bbaf3bd-34e0-0310-bf65-c717079852d4 --- lisp/ess-dde.el | 9 +++++++-- lisp/ess-inf.el | 19 +++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lisp/ess-dde.el b/lisp/ess-dde.el index 52995803..220bf495 100644 --- a/lisp/ess-dde.el +++ b/lisp/ess-dde.el @@ -66,7 +66,7 @@ (forward-line 1)) (widen))) - +;; C-c C-n (defun ess-eval-linewise-ddeclient (text-withtabs &optional invisibly eob even-empty) (save-excursion (set-buffer (get-buffer-create "*ESS-temporary*")) @@ -123,7 +123,7 @@ nor offer alternate buffers or editing capability." (sleep-for 2) (find-file filename)) -(defun ess-command-ddeclient (com &optional buf sleep) +(defun ess-command-ddeclient-proposed (com &optional buf sleep) "ddeclient version of real `ess-command'. Send the ESS process command COM and redirect its output to the temporary file named BUF. The temporary filename is constructed @@ -149,6 +149,11 @@ file into an emacs buffer and displays it." (revert-buffer t t) ;; this allows the user to reuse the BUF name )) +;; previous version (ESS-5.2.12 and earlier) +(defun ess-command-ddeclient (com &optional buf sleep) + "ddeclient bypass of real ess-command" + (ess-eval-linewise com)) + (provide 'ess-dde) ; Local variables section diff --git a/lisp/ess-inf.el b/lisp/ess-inf.el index c3ba25c0..6e171ad3 100644 --- a/lisp/ess-inf.el +++ b/lisp/ess-inf.el @@ -800,17 +800,17 @@ will be used in a few places where `a' is proportional to `ess-cmd-delay'." ;; Use this function when you need to evaluate some S code, and the ;; result is needed immediately. Waits until the output is ready + (if buf nil (setq buf (get-buffer-create " *ess-command-output*"))) + (save-excursion + (set-buffer buf) + (if ess-local-process-name + nil + (setq ess-local-process-name ess-current-process-name))) (if (ess-ddeclient-p) - (progn - (if buf ; Mar 01 2002 rmh - (save-excursion - (set-buffer buf) - (setq ess-local-process-name ess-current-process-name))) - (ess-force-buffer-current "Process to load into: ") - (ess-command-ddeclient com buf sleep)) - + (ess-command-ddeclient com buf sleep) + ;; else: "normal", non-DDE behavior: - + (let* ((sprocess (get-ess-process ess-current-process-name)) sbuffer do-sleep end-of-output @@ -832,7 +832,6 @@ will be used in a few places where `a' is proportional to `ess-cmd-delay'." (if (looking-at inferior-ess-primary-prompt) nil (ess-error "ESS process not ready. Finish your command before trying again."))) - (if buf nil (setq buf (get-buffer-create " *ess-command-output*"))) (setq oldpf (process-filter sprocess)) (setq oldpb (process-buffer sprocess)) (setq oldpm (marker-position (process-mark sprocess))) -- 2.11.4.GIT