[ESS] Little troubles with Emacs for Windows and ESS
rsparapa at mcw.edu
Sat Feb 6 18:44:23 CET 2010
On 02/ 6/10 07:02 AM, Paul Johnson wrote:
> Thanks, but I don't understand specifically what I'm supposed to tell
> users they ought to do. You say "please don't edit ESS files" but
> then you seem to say I need to edit Ess files to make it find rterm.
> The path where I install R is the usual, except no spaces in directory
> names. I don't think that's too unusual. I'm just going by the
> INSTALL instructions in the ESS distribution itself, which has always
> recommended we revise ess-site.el to make customizations.
If I could jump in here. As an ESS developer, we used to recommend that
people make changes to ess-site.el. More recently, we have moved away
from that. We recommend that you make these types of modifications to
default behavior only to your init file (with inspiration from the
commented out examples in ess-site.el). This way we can expect that
nothing is changed under the hood when advising you and you can more
easily upgrade ESS to the latest version. Of course, bug reports and
patches are welcome if you discover something is amiss that would
require changes to ESS itself.
> Anyway, I have found one very helpful configuration change for Emacs
> on Windows. I would suggest you put this in your modified Emacs for
> Windows as a default, at least until the GTK file chooser problem is
> Adding this as a startup default:
> (setq use-file-dialog nil)
> Helps with several related problems that arise on Windows Vista and 7.
> Users can't answer requests from the file or directory chooser.
> The problem appears in these ways:
> 1 Hit the blue R button. User is not allowed to select a start
> directory for R. The menu panel directory chooser is unresponsive.
> User can type in a name, but the "OK" button does not work.
> 2 In Emacs File menu, choose "New File" and file chooser will not
> allow user to enter a file name
> The recommended line causes Emacs to revert to its traditional
> behavior of interacting with the user through the small bar at the
> bottom of the Emacs window.
Ooh, that sounds like a nice tip! But, I'm not a Windows user myself.
I'd recommend that you put these tips on the ESS Wiki
> For completeness, I do make a number of other startup settings that
> make Emacs more understandable to people around here. Most of these
> users have no interest in Emacs itself, they just want to write R
> code, and this seems to help. These changes, for the most part, help
> new Emacs adopters get past some of the most unusual characteristics
> of Emacs (the legacy from the pre X11 days).
> (require 'pc-select)
> '(cua-mode t nil (cua-base))
> '(show-paren-mode t)
> '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
> '(transient-mark-mode t))
> (setq inferior-ess-own-frame t)
> (setq inferior-ess-same-window nil)
> ;;;;;create a new frame for each help instance
> (setq ess-help-own-frame t)
> ;;;;;If you want all help
> ;;;;; buffers to go into one frame do:
> (setq ess-help-own-frame 'one)
> (setq ess-ask-for-ess-directory nil)
> (setq ess-local-process-name "R")
> (setq split-window-preferred-function nil)
> (setq ansi-color-for-comint-mode 'filter)
> (setq comint-prompt-read-only t)
> (setq comint-scroll-to-bottom-on-input t)
> (setq comint-scroll-to-bottom-on-output t)
> (setq comint-move-point-for-output t)
> (defun my-ess-eval ()
> (if (and transient-mark-mode mark-active)
> (call-interactively 'ess-eval-region)
> (call-interactively 'ess-eval-line-and-step)))
> (add-hook 'ess-mode-hook
> (local-set-key [(shift return)] 'my-ess-eval)))
> ;; http://fuhm.livejournal.com/
> ;; This hack removes the really annoying splash screen that emacs22
> ;; now displays by default, even when you're trying to edit a buffer.
> ;; This works because this function is called whenever a filename is
> ;; specified on the command line, which is almost exactly when I want
> ;; to inhibit the splashscreen. (it also catches a couple other cases
> ;; like -script, -load, and -L, but that doesn't really matter).
> ;; --jknight
> (defadvice command-line-normalize-file-name
> (before kill-stupid-startup-screen activate)
> (setq inhibit-startup-screen t))
More information about the ESS-help