emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
617 stars 162 forks source link

R not considered ess-dialect #289

Closed r2evans closed 8 years ago

r2evans commented 8 years ago

As of cce7d02, ESS no longer considers my R as an ess-dialect. Manually running (string-equal ess-dialect "R") is t, (member ess-dialect "R") is nil.

Lines 2769-2770 seem to be the culprit. If I change it from:

  (if (member ess-dialect "R") 

to

  (if (member ess-dialect '("R") )

then the desired behavior returns.

If I'm not interpreting this correctly, is it likely that my configuration is contributing to divergence from the expected behavior? (Nothing fancy in other packages installed.)

Win10_64 Emacs (in git-for-windows SDK): GNU Emacs 24.5.1 (i686-w64-mingw32) of 2015-09-01 on WARLOCK ESS: 20160125.648 from MELPA

If it is useful, ESS-related customization:

(custom-set-variables
 '(ess-default-style (quote RStudio))
 '(ess-directory-containing-R "c:/")
 '(ess-function-template " <- function( ) {

}
")
 '(ess-history-directory "~/")
 '(ess-history-file "~/.Rhistory")
 '(ess-indent-with-fancy-comments nil)
 '(ess-roxy-str "#'")
 '(ess-roxy-template-alist
   (quote
    (("description" . ".. content for \\description{} (no empty lines) ..")
     ("details" . ".. content for \\details{} ..")
     ("param" . "")
     ("return" . ""))))
 '(ess-swv-processor (quote knitr))
 '(ess-toolbar-global nil)
 '(inferior-ess-client-command "Initial")
 '(inferior-ess-client-name "Initial")
 '(inferior-ess-ddeclient "Initial")
)

(defun my-ess-hook ()
    "more stuff to load with ess"
    (smartscan-mode 1)
    (setq ess-indent-level 2
          comment-add 0)
    )

(defun my-postinit-ess ()
  "my ess init code run after package-initialize"
  (require 'ess)
  (require 'ess-site)
  (setq-default ess-dialect "R"
                inferior-R-args "--no-save "
                ess-nuke-trailing-whitespace-p nil
                ess-ask-for-ess-directory nil)
  (add-hook 'ess-mode-hook 'my-ess-hook)
  (define-key ess-doc-map "l" 'my-list-objects)
  (define-key ess-doc-map "\C-l" 'my-list-objects)
  (setq comint-scroll-to-bottom-on-input t
        comint-scroll-to-bottom-on-output t
        comint-move-point-for-output t
        ess-indent-level 4
        )
  )
(add-hook 'after-init-hook 'my-postinit-ess)
vspinu commented 8 years ago

Thanks for this. That line was modified by mistake in that commit.