diff --git a/ChangeLog b/ChangeLog index 6082662d7..80917bba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-07 ESS Maintainers + + * Version 13.09-1 released. + 2013-09-27 ESS Maintainers * Version 13.09 released. diff --git a/doc/newfeat.texi b/doc/newfeat.texi index 178231302..9eda905e7 100644 --- a/doc/newfeat.texi +++ b/doc/newfeat.texi @@ -3,39 +3,39 @@ Changes / Selected Bug Fixes in 13.09-1: @itemize @bullet -@item ess-remote and TRAMP: R suport code is now downloaded in binary form, instead +@item ess-remote and TRAMP: R support code is now downloaded in binary form instead of being injected from local machine. The R code is stored in -@code{~/.config/ESSR/} directory on the remote machine. -@item TRAMP: PAGER environment variable is now correctly set to @code{inferior-ess-pager}. -@item retrieval of help topics on remote machines was fixed +@code{~/.config/ESSR/} directory on the remote machine +@item TRAMP: PAGER environment variable is now correctly set to @code{inferior-ess-pager} +@item retrieval of help topics on remote machines is fixed @item org-babel: source references of R code executed from org files correctly point to source references in original org files (version 8.2.1 or higher of org-mode is required for this feature) @item @code{ess-execute} is now bound to @kbd{C-c C-e C-e} in @code{ess-extra-map}. @item completion works again in @code{ess-execute} -@item @ESS{[R]} @code{head} and @code{tail} methods were replaced by @code{htsummary} in +@item @ESS{[R]}: @code{head} and @code{tail} methods were replaced by @code{htsummary} in @code{ess-R-describe-object-at-point-commands} -@item @ESS{[roxygen]} evaluation commands now work in roxygen blocks. -Leading comments are automatically removed before the evaluation. +@item @ESS{[roxygen]}: evaluation commands now work in roxygen blocks. +Leading comments are automatically removed before the evaluation @item @ESS{[transcript]}: 'Clean Region' now works with multiline statements; - @code{ess-transcript-clean-region} etc, now also correctly treat - multiline statements, i.e., it no longer forgets the lines typically - preceded by ``+ ''. -@item @ESS{[SAS]} Three features/fixes with special thanks to Matthew Fidler + @code{ess-transcript-clean-region} etc. correctly treat + multiline statements, i.e., no longer forgets the lines typically + preceded by '+' +@item @ESS{[SAS]}: Three features/fixes with special thanks to Matthew Fidler @uref{https://github.com/emacs-ess/ESS/pulls/mlf176f2, https://github.com/emacs-ess/ESS/pulls/mlf176f2}. Turn on SAS log mode -and SAS listing mode when appropriate. Indent comments more -appropriately. Indent CARDS more appropriately. +when appropriate. Indent comments and CARDS statement more appropriately. @item @ESS{[SAS]}: @code{ess-sas-edit-keys-toggle} default returns to @code{nil} -@item @ESS{[R]} support for @code{prettify-symbols-mode} -A contribution of RĂ¼diger Sonderfeld @uref{https://github.com/emacs-ess/ESS/pull/65} -@item @ESS{[SWV]} knitr now evaluates in the current frame -@item @ESS{[developer]} ess-developer doesn't kill open DESCRIPTION files anymore -@item @ESS{[roxygen]} @code{ess-roxy-preview-HTML} is now on @kbd{C-c C-o C-w} and - @code{ess-roxy-preview-text} is now on @code{C-c C-o C-t}. +@item @ESS{[R]}: support for @code{prettify-symbols-mode}: +contribution from Rudiger Sonderfeld @uref{https://github.com/emacs-ess/ESS/pull/65} +@item @ESS{[SWV]}: knitr now evaluates in the current frame +@item @ESS{[developer]}: ess-developer doesn't kill open DESCRIPTION files anymore +@item @ESS{[roxygen]}: @code{ess-roxy-preview-HTML} is now on @kbd{C-c C-o C-w} and + @code{ess-roxy-preview-text} is now on @code{C-c C-o C-t} @item @ESS{}: installation with @code{make install} was simplified and should work out of the box on most *nix systems -@item @ESS{} installation instructions in ESS documentation were considerably simplified. +@item @ESS{} installation instructions simplified +@item fixed font-lock bug introduced in 13.09 that was causing very slow process output @end itemize Changes/New Features in 13.09: diff --git a/etc/ESSR/R/developer.R b/etc/ESSR/R/developer.R index f76973f7f..88f0fa22b 100644 --- a/etc/ESSR/R/developer.R +++ b/etc/ESSR/R/developer.R @@ -9,15 +9,13 @@ ## Otherwise R will call the registered (i.e. cached) S3 method instead of the ## new method that ess-developer inserted in the package environment. -.essDev_differs <- function(f1, f2) - { - if (is.function(f1) && is.function(f2)){ - !(identical(body(f1), body(f2)) && identical(args(f1), args(f2))) - }else - !identical(f1, f2) - } +.essDev.eval <- function(string, package, file = tempfile("ESSDev")){ + cat(string, file = file) + on.exit(file.remove(file)) + .essDev_source(file,, package = package) +} -.essDev_source <- function (source, expr, package = "") +.essDev_source <- function(source, expr, package = "") { ## require('methods') oldopts <- options(warn = 1) @@ -279,3 +277,11 @@ all(out) } } + + +.essDev_differs <- function(f1, f2) { + if (is.function(f1) && is.function(f2)){ + !(identical(body(f1), body(f2)) && identical(args(f1), args(f2))) + }else + !identical(f1, f2) +} diff --git a/etc/ESSR/VERSION b/etc/ESSR/VERSION index 9c1218c20..1b87bcd0b 100644 --- a/etc/ESSR/VERSION +++ b/etc/ESSR/VERSION @@ -1 +1 @@ -1.1.3 \ No newline at end of file +1.1.4 \ No newline at end of file diff --git a/etc/slow-long-output.R b/etc/slow-long-output.R index 3e5408bd3..55e5f9964 100644 --- a/etc/slow-long-output.R +++ b/etc/slow-long-output.R @@ -15,9 +15,17 @@ system.time(print(y)) ## user system elapsed ## 0.059 0.010 0.070 -- MM@lynne R CMD BATCH ## user system elapsed +## 0.120 0.138 3.225 (+/- 0.2) -- MM@lynne ESS 13.09-1 [svn: 5930] +##--- ## 0.124 0.097 52.540 -- MM@lynne ESS svn r 5909; incl font-locking, tracebug ## 0.128 0.080 57.305 ditto ## 0.139 0.088 54.770 -- sfs@lynne ESS 13.09 (emacs 24.3.1 GTK+) +## -- +## 0.102 0.075 4.685 -- MM@lynne ESS 5.14 (emacs 24.3.1 incl font-lock!) +## 0.091 0.078 4.683 -- " ESS 12.04-4 [rev. 4896 (2012-06-07)] +## 0.123 0.063 4.638 -- " ESS 12.09-2 [rev. 5395 (2013-01-10)] +## 0.117 0.118 3.358 -- " ESS 13.05 [rev. 5574 (2013-05-14)] +## ^^^^^ clearly a bit faster ! set.seed(23456) y <- mkCh(50000) @@ -26,6 +34,10 @@ system.time(print(y)) ## 0.255 0.089 0.345 -- BATCH MM@lynne ## 0.685 0.369 1664.557 -- MM@lynne ESS svn r 5909 ... ## 0.760 0.398 1643.608 -- ..@lynne ESS 13.09 +## 0.590 0.510 33.349 -- " ESS 13.05 [rev. 5574 (2013-05-14)] +## 0.565 0.548 28.251 " " +## 0.598 0.450 27.804 " " + ## Don't even think of trying this with ESS, currently: y <- mkCh(200000) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4323c86a..8b0a86157 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-12-05 Rodney Sparapani + + * ess-sas-a.el (ess-sas-edit-keys-toggle): the default returns + to nil; indentation has improved somewhat and will probably + improve a bit more in the near future + 2013-10-19 Martin Maechler * ess-trns.el (ess-transcript-clean-region): use t and nil, not 1 diff --git a/lisp/Makefile b/lisp/Makefile index 013dca07a..e59713ec5 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -70,15 +70,15 @@ install: dist -$(INSTALLDIR) $(LISPDIR) $(INSTALL) ChangeLog *.elc $(LISPDIR) export J; for I in *.elc; do J=$$I; $(INSTALL) `basename $$J .elc`.el $(LISPDIR); done - if [ -n "$(SITELISP)" ] ; \ + if [ -n "$(SITELISP)" -a ! -f "$(SITELISP)/ess-site.el" ] ; \ then \ - ln -sf $(LISPDIR)/ess-site.el $(SITELISP)/ess-site.el ; \ + ln -s $(LISPDIR)/ess-site.el $(SITELISP)/ess-site.el ; \ fi; # test "$(LISPDIR)" = "." || $(INSTALL) *.elc $(LISPDIR) uninstall: -cd $(LISPDIR) && $(UNINSTALL) ChangeLog *.elc *.el - if [ -n "$(SITELISP)" ] ; \ + if [ -n "$(SITELISP)" -a -f "$(SITELISP)/ess-site.el" ] ; \ then \ cd $(SITELISP) && $(UNINSTALL) ess-site.el ; \ fi; diff --git a/lisp/ess-developer.el b/lisp/ess-developer.el index 6781b6e24..b2f804f7f 100644 --- a/lisp/ess-developer.el +++ b/lisp/ess-developer.el @@ -221,11 +221,10 @@ otherwise call devSource." (ess-developer-devSource beg end package message)))) (defun ess-developer-devSource (beg end package &optional message) - (let* ((ess-load-command - (format ".essDev_source(source='%s',package='%s')" "%s" package)) - (ess-load-visibly-noecho-command ess-load-command) - ;; don't want string evaluation - ess-eval-command ess-eval-visibly-noecho-command) + (let* ((ess-eval-command + (format ".essDev.eval('%s', package='%s', file='%s')" "%s" package "%f")) + (ess-eval-visibly-command ess-eval-command) + (ess-eval-visibly-noecho-command ess-eval-command)) (if message (message message)) (ess-developer--command (ess--make-source-refd-command beg end) 'ess-developer--propertize-output))) diff --git a/lisp/ess-inf.el b/lisp/ess-inf.el index 5bf170080..d7d7071a1 100644 --- a/lisp/ess-inf.el +++ b/lisp/ess-inf.el @@ -308,7 +308,7 @@ Alternatively, it can appear in its own frame if ;; don't font-lock strings over process prompt (set (make-local-variable 'syntax-begin-function) - #'inferior-ess-goto-last-prompt) + #'inferior-ess-goto-last-prompt-if-close) (set (make-local-variable 'font-lock-fontify-region-function) #'inferior-ess-fontify-region) @@ -354,11 +354,21 @@ Default depends on the ESS language/dialect and hence made buffer local") ;;; local to the ESS process buffer. If required, these variables should ;;; be accessed with the function ess-get-process-variable -(defun inferior-ess-goto-last-prompt () - (let ((paragraph-start comint-prompt-regexp)) - (forward-paragraph -1) - ;; (comint-skip-prompt) - (point))) + +(defun inferior-ess-goto-last-prompt-if-close () + "If any prompt has been found on current line, go to previous primary prompt and return the position. +Otherwise stay at current position and return nil " + + (let ((new-point (save-excursion + (beginning-of-line) + (if (looking-at inferior-ess-primary-prompt) + (point) + (when (and inferior-ess-secondary-prompt + (looking-at inferior-ess-secondary-prompt)) + (re-search-backward (concat "^" inferior-ess-primary-prompt)) + (point)))))) + (when new-point + (goto-char new-point)))) (defun inferior-ess-fontify-region (beg end &optional verbose) "Fontify output by output within the beg-end region to avoid @@ -367,7 +377,8 @@ fontification spilling over prompts." (inhibit-point-motion-hooks t) (font-lock-dont-widen t) (buff (current-buffer)) - (pos (inferior-ess-goto-last-prompt)) ; expand to last prompt + (pos (or (inferior-ess-goto-last-prompt-if-close) + beg)) (pos2)) (with-silent-modifications ;; (dbg pos end) @@ -381,8 +392,7 @@ fontification spilling over prompts." ;; (redisplay) ;; (sit-for 1) (font-lock-default-fontify-region pos pos2 verbose)) - (setq pos pos2))) - )) + (setq pos pos2))))) (defun ess-gen-proc-buffer-name:simple (proc-name) "Function to generate buffer name by wrapping PROC-NAME in *proc-name*" @@ -2609,33 +2619,6 @@ A negative prefix argument gets the objects for that position ")\n"))) (ess-execute the-command invert "S objects" the-message))) -;;;; S4 Version -;;;; soup-up the interactive usage: allow modifications to a default pattern -;;(defun ess-execute-objects (posn) -;; "Send the `inferior-ess-objects-command' to the ESS process. -;;No prefix argument uses position 1 and pattern inferior-ess-objects-pattern. -;;A nonnegative prefix gets objects for that position and prompts for -;; the pattern. -;;A negative prefix also toggles ess-execute-in-process-buffer." -;; (interactive "P") -;; (ess-make-buffer-current) -;; (let* ((num-arg (if (listp posn) 1 -;; (prefix-numeric-value posn))) -;; (the-posn (if (< num-arg 0) (- num-arg) num-arg)) -;; (invert (< num-arg 0)) -;; (pattern (if current-prefix-arg (read-string "Pattern (.*): ") -;; inferior-ess-objects-pattern)) -;; (pattern (if (string= pattern "") ".*" pattern)) -;; (the-command (format inferior-ess-objects-command the-posn pattern)) -;; (the-message (concat ">>> Position " -;; the-posn -;; " (" -;; (nth (1- the-posn) (ess-search-list)) -;; ") (pattern = " -;; pattern -;; ")\n"))) -;; (ess-execute the-command invert "S objects" the-message))) - (defun ess-execute-search (invert) "Send the `inferior-ess-search-list-command' command to the `ess-language' process. [search(..) in S]" diff --git a/lisp/ess-mode.el b/lisp/ess-mode.el index 1020ddf14..6935a6271 100644 --- a/lisp/ess-mode.el +++ b/lisp/ess-mode.el @@ -529,7 +529,7 @@ ess-mode." (repl "\\(<-\\)?") ; replacement (function) (Sym-0 "\\(\\sw\\|\\s_\\)") ; symbol (Symb (concat Sym-0 "+")) - (xSymb (concat "\\[?\\[?" Sym-0 "*")); symbol / [ / [[ / [symbol / [[symbol + (xSymb "[^ \t\n\"']+") ;; (concat "\\[?\\[?" Sym-0 "*")); symbol / [ / [[ / [symbol / [[symbol ;; FIXME: allow '%foo%' but only when quoted; don't allow [_0-9] at beg. (_or_ "\\)\\|\\(") ; OR (space "\\(\\s-\\|\n\\)*") ; white space @@ -537,8 +537,7 @@ ess-mode." (part-1 (concat "\\(" ;;--------outer Either------- "\\(\\(" ; EITHER - ;; Q xSymb repl Sym-0 "*" Q ; quote ([) (replacement) symbol quote - Q "[^ \t\n\"']+" Q ;; any function name between quotes + Q xSymb Q ; any function name between quotes _or_ "\\(^\\|[ ]\\)" Symb ; (beginning of name) + Symb "\\)\\)")) ; END EITHER OR @@ -561,6 +560,7 @@ ess-mode." space "function\\s-*(" ; whitespace, function keyword, parenthesis )) ) + (defvar ess-R-function-pattern (concat part-1 "\\s-*\\(<-\\|=\\)" ; whitespace, assign diff --git a/lisp/ess-sas-l.el b/lisp/ess-sas-l.el index bf8d6b669..84b6acc50 100644 --- a/lisp/ess-sas-l.el +++ b/lisp/ess-sas-l.el @@ -127,6 +127,7 @@ A .lst file is a SAS listing file when: (when ess-automatic-sas-log-or-lst-mode (let* ((bfn (buffer-file-name)) (log (and bfn + (string-match-p "\\.lst$" bfn) (replace-regexp-in-string "\\.lst$" ".log" bfn)))) (and log (file-exists-p log) diff --git a/lisp/ess-site.el b/lisp/ess-site.el index 372d521dd..acee625ad 100644 --- a/lisp/ess-site.el +++ b/lisp/ess-site.el @@ -187,13 +187,14 @@ for ESS, such as icons.") ;;(1.2) If ess.info is not found, then ess-lisp-directory/../doc/info is added ;; resurrecting Stephen's version with a bug-fix & xemacs compatibility +(if (fboundp 'locate-file) (progn (unless (locate-file "ess.info" (if (featurep 'xemacs) Info-directory-list Info-default-directory-list)) (add-to-list (if (featurep 'xemacs) 'Info-directory-list 'Info-default-directory-list) - (expand-file-name "../doc/info/" ess-lisp-directory))) + (expand-file-name "../doc/info/" ess-lisp-directory))))) ;; ALWAYS: