Skip to content

Commit

Permalink
Merge branch 'trunk'
Browse files Browse the repository at this point in the history
  • Loading branch information
vspinu committed Dec 7, 2013
2 parents 3c5117d + 8063c35 commit 136742f
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 77 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2013-12-07 ESS Maintainers <[email protected]>

* Version 13.09-1 released.

2013-09-27 ESS Maintainers <[email protected]>

* Version 13.09 released.
Expand Down
40 changes: 20 additions & 20 deletions doc/newfeat.texi
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 14 additions & 8 deletions etc/ESSR/R/developer.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion etc/ESSR/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.3
1.1.4
12 changes: 12 additions & 0 deletions etc/slow-long-output.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions lisp/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2013-12-05 Rodney Sparapani <[email protected]>

* 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 <[email protected]>

* ess-trns.el (ess-transcript-clean-region): use t and nil, not 1
Expand Down
6 changes: 3 additions & 3 deletions lisp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 4 additions & 5 deletions lisp/ess-developer.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
55 changes: 19 additions & 36 deletions lisp/ess-inf.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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*"
Expand Down Expand Up @@ -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]"
Expand Down
6 changes: 3 additions & 3 deletions lisp/ess-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -529,16 +529,15 @@ 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

(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
Expand All @@ -561,6 +560,7 @@ ess-mode."
space "function\\s-*(" ; whitespace, function keyword, parenthesis
))
)

(defvar ess-R-function-pattern
(concat part-1
"\\s-*\\(<-\\|=\\)" ; whitespace, assign
Expand Down
1 change: 1 addition & 0 deletions lisp/ess-sas-l.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion lisp/ess-site.el
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 136742f

Please sign in to comment.