Skip to content

Commit

Permalink
Merge branch 'trunk'
Browse files Browse the repository at this point in the history
  • Loading branch information
vspinu committed Sep 13, 2014
2 parents 77ddcfb + 07c7d67 commit 9c248f1
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 69 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2014-09-13 ESS Maintainers <[email protected]>

* Version 14.09 released.

2013-12-10 Rodney Sparapani <[email protected]>

* Makeconf (SITELISP): tersely documenting SITELISP
Expand Down
19 changes: 8 additions & 11 deletions Makeconf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## Specify either PREFIX or DESTDIR to over-ride /usr
DESTDIR=/usr
PREFIX=$(DESTDIR)
#

##__ GNU Emacs __
EMACS=emacs
SITELISP=$(PREFIX)/share/emacs/site-lisp
Expand All @@ -32,16 +32,14 @@ ETCDIR =$(PREFIX)/share/emacs/etc/ess
#LISPDIR=$(SITELISP)/ess
#INFODIR=$(PREFIX)/share/xemacs/site-packages/info
#ETCDIR =$(PREFIX)/share/xemacs/site-packages/etc/ess
#

##__ GNU Emacs __ for Mac OS X with NeXTstep (Cocoa or GNUstep)
# PREFIX=/Applications/Emacs.app/Contents/Resources
# EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs
# SITELISP=$(PREFIX)/site-lisp
# LISPDIR=$(SITELISP)/ess
# INFODIR=$(PREFIX)/info
# INFODIR=/usr/local/info
# ETCDIR =$(PREFIX)/etc/ess
#

##__ Aquamacs __ (donated by Dan Knoepfle, Mar 26, 2011)
# PREFIX=/Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes
Expand All @@ -50,7 +48,6 @@ ETCDIR =$(PREFIX)/share/emacs/etc/ess
# LISPDIR=$(PREFIX)/ess-mode/lisp
# INFODIR=/Applications/Aquamacs.app/Contents/Resources/info
# ETCDIR=$(PREFIX)/ess-mode/etc
#

## the following command is the same for recent versions of both Emacs and XEmacs
EMACSBATCH = $(EMACS) -batch -no-site-file -no-init-file
Expand All @@ -68,24 +65,24 @@ EMACSBATCH = $(EMACS) -batch -no-site-file -no-init-file
## 1st) source-file & 2nd) target-directory
## UNINSTALL deletes all arguments
## DOCDIR Destination of other doc files
#

SHELL = /bin/sh
#

MAKEINFO = LC_ALL=C LANG=en makeinfo
# new: MAKEHTML <output>.html <input>.texi {necessary to build 'Index'}
MAKEHTML = $(MAKEINFO) --html --no-split --css-include=atouchofstyle.css -o
## ^^^^^^^^^^ today's bandwidth is fast
#MAKETXT = $(MAKEINFO) --no-validate --no-headers --no-split -o -
MAKETXT = $(MAKEINFO) --no-validate --plaintext --no-split -o -
#

INSTALLDIR = mkdir -p
#INSTALLDIR = install -d
#

INSTALL = cp -p
#INSTALL = install
#

UNINSTALL = rm -f
#

DOCDIR=$(PREFIX)/share/doc/ess

## Section 3
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.08
14.09
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ess (14.09-1) unstable; urgency=low

* New upstream version released today

-- Dirk Eddelbuettel <[email protected]> Sat, 13 Sep 2014 09:03:04 -0500

ess (13.09-1-1) unstable; urgency=low

* New upstream version released today
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Maintainer: ESS Debian Maintainers <[email protected]>
Uploaders: Dirk Eddelbuettel <[email protected]>
Standards-Version: 3.9.5
Build-Depends: debhelper (>= 7.0.0)
Build-Depends-Indep: texlive-base, texlive-latex-base, texlive-latex-recommended, texlive-latex-extra, texlive-generic-recommended, texlive-extra-utils, texinfo, texi2html, autotools-dev
Build-Depends-Indep: texlive-base, texlive-latex-base, texlive-latex-recommended, texlive-latex-extra, texlive-generic-recommended, texlive-extra-utils, texinfo, autotools-dev
Homepage: http://ess.r-project.org

Package: ess
Expand Down
6 changes: 3 additions & 3 deletions doc/ess.texi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ESS version @ESSVER
@c @end ifhtml
@c
@author Current Documentation by The ESS Developers
@author Copyright @copyright{} 2002--2013 The ESS Developers
@author Copyright @copyright{} 2002--2014 The ESS Developers
@author Copyright @copyright{} 1996--2001 A.J. Rossini
@author Original Documentation by David M. Smith
@author Copyright @copyright{} 1992--1995 David M. Smith
Expand Down Expand Up @@ -521,7 +521,7 @@ Other ways to setup a remote ESS connection are through @code{ess-remote}.
@item Start the ESS process on the remote machine, for example with one of
the commands @samp{Splus}, or @samp{R}, or @samp{sas -stdio}.

@item Start @samp{M-x ess-remote}.
@item Start @samp{M-x ess-remote}.
You will be prompted for a program name with completion. Choose
one. Your process is now known to ESS. All the usual ESS commands
(@samp{C-c C-n} and its relatives) now work with the S language
Expand Down Expand Up @@ -2971,7 +2971,7 @@ something like:
@code{
Warning: Class "boo" is defined (with package slot ‘foo’) but no
metadata object found to revise subclass information---not exported?
}
}

You can safely ignore this warnings.

Expand Down
31 changes: 24 additions & 7 deletions doc/newfeat.texi
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
@comment @itemize @w{}
@comment @item

Changes / Selected Bug Fixes in 14.04:
Changes / Selected Bug Fixes in 14.09:
@itemize @bullet
@item @ESS{[R]}: @code{ess-execute-screen-options} uses correct screen width in terminal sessions
@item @ESS{[R]}: command cleaning with @kbd{C-u C-u C-y} was broken with lines containing " + "
@item @ESS{[Julia]}: Executable is changed to @code{julia}.
@item @ESS{[Julia]}: Completion and help system was adjusted to Julia
v.0.3.0. Julia v.0.2.x is no more supported.
@item @ESS{[R]}: Running R with @code{gdb} debugger now works as expected
@item @iESS{}: Inferior ESS buffers are now derived from @code{comint-mode}
@item @ESS{[R]}: @code{ess-execute-screen-options} uses correct screen
width in terminal sessions
@item @ESS{}: @code{ess-build-tags-for-directory} works when no TAGS file
name was provided
@item @ESS{}: @code{ess-continued-statement-offset} is now respected everywhere
except inside of the @code{if} test condition.
@item @ESS{}: New variable @code{ess-first-continued-statement-offset} for
indentation of the first line in multiline statements.
@item @ESS{R}: Starting @kbd{,} in multiline statements indentation is now
ignored to achieve a more pleasant alignment.
@item @ESS{R}: Improved behavior of @kbd{RET} in roxygen blocks.
@item @ESS{[R]}: command cleaning with @kbd{C-u C-u C-y} was broken with
lines containing " + "
@item @ESS{[R]}: fixed "empty watch window bug"
@item @ESS{[R]}: don't ask for help location on ac-quick-help (request of github #81)
@item @ESS{[R]}: "importClassesFrom" and "importMethodsFrom" were added to the list of two-parameter roxygen commands
@item @ESS{[R]}: "importClassesFrom" and "importMethodsFrom" were added to
the list of two-parameter roxygen commands
@item @ESS{[R]}: fix vignetes display and hyperlinks (were broken in 13.09-1)
@item @ESS{[Julia]}: recognize function names ending with !
@item @ESS{[Julia]}: fix indentation of "for" comprehension syntax within brackets.
Expand Down Expand Up @@ -36,15 +53,15 @@ Leading comments are automatically removed before the evaluation
@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
when appropriate. Indent comments and CARDS statement 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}:
@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
@item @ESS{}: installation with @code{make install} was simplified and should work
out of the box on most *nix systems
@item @ESS{} installation instructions simplified
@item fixed font-lock bug introduced in 13.09 that was causing very slow process output
Expand Down
1 change: 1 addition & 0 deletions ess-autoloads.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
;;; ess-autoloads.el --- Emacs Speaks Statistics: statistical programming within Emacs

;; Copyright (C) 2012 Donald E. Curtis
;; Copyright (C) 2014 The ESS Core Team

;; Original Author: Donald E. Curtis
;; Created: March 5, 2012
Expand Down
2 changes: 1 addition & 1 deletion etc/ESSR/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.6
1.1.7
4 changes: 2 additions & 2 deletions lisp/ess-custom.el
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
:prefix "ess-")
;; Variables (not user-changeable)

(defvar ess-version "14.08" ;; updated by 'make'
(defvar ess-version "14.09" ;; updated by 'make'
"Version of ESS currently loaded.")

(defvar ess-revision nil ;; set
Expand Down Expand Up @@ -751,7 +751,7 @@ If not number, the statements are indented at open-parenthesis following
(cons 'ess-arg-function-offset-new-line '(default-value 'ess-arg-function-offset-new-line))
(cons 'ess-close-brace-offset '(default-value 'ess-close-brace-offset))
)
"Default style constructed from initial values of indentation variables.")
"Style constructed from initial (default) values of ESS indentation variables.")

(defvar ess-style-alist
(cons ess-default-style-list
Expand Down
39 changes: 22 additions & 17 deletions lisp/ess-inf.el
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ If ess-plain-first-buffername, then initial process is number-free."
(= n 1))) ; if not both first and plain-first add number
(concat ":" (number-to-string n)))))

(defun inferior-ess (&optional ess-start-args)
(defun inferior-ess (&optional ess-start-args customize-alist no-wait)
"Start inferior ESS process.
Without a prefix argument, starts a new ESS process, or switches
Expand Down Expand Up @@ -133,10 +133,12 @@ Alternatively, it can appear in its own frame if

(interactive)

(let ((temp-ess-dialect (eval (cdr (assoc 'ess-dialect
ess-customize-alist))))
(temp-ess-lang (eval (cdr (assoc 'ess-language
ess-customize-alist)))))
(let* ((ess-customize-alist (or customize-alist
ess-customize-alist))
(temp-ess-dialect (eval (cdr (assoc 'ess-dialect
ess-customize-alist))))
(temp-ess-lang (eval (cdr (assoc 'ess-language
ess-customize-alist)))))

(run-hooks 'ess-pre-run-hook)
(ess-write-to-dribble-buffer
Expand Down Expand Up @@ -294,8 +296,9 @@ Alternatively, it can appear in its own frame if
;; (inferior-ess-wait-for-prompt)
(inferior-ess-mark-as-busy (get-process procname))
(process-send-string (get-process procname) "\n") ;; to be sure we catch the prompt if user comp is super-duper fast.
(ess-write-to-dribble-buffer "(inferior-ess: waiting for process to start (before hook)\n")
(ess-wait-for-process (get-process procname) nil 0.01)
(unless no-wait
(ess-write-to-dribble-buffer "(inferior-ess: waiting for process to start (before hook)\n")
(ess-wait-for-process (get-process procname) nil 0.01))

;; arguments cache
(ess-process-put 'funargs-cache (make-hash-table :test 'equal))
Expand All @@ -317,8 +320,9 @@ Alternatively, it can appear in its own frame if
;; EXTRAS
(ess-load-extras t)
;; user initialization can take some time ...
(ess-write-to-dribble-buffer "(inferior-ess 3): waiting for process after hook")
(ess-wait-for-process (get-process procname)))
(unless no-wait
(ess-write-to-dribble-buffer "(inferior-ess 3): waiting for process after hook")
(ess-wait-for-process (get-process procname))))

(with-current-buffer buf
(rename-buffer buf-name-str t))
Expand Down Expand Up @@ -428,26 +432,27 @@ Return the 'busy state."
(let ((busy (not (string-match (concat "\\(" inferior-ess-primary-prompt "\\)\\'") string))))
(process-put proc 'busy-end? (and (not busy)
(process-get proc 'busy)))
(if (not busy) (process-put proc 'running-async? nil))
(when (not busy)
(process-put proc 'running-async? nil))
(process-put proc 'busy busy)
(process-put proc 'sec-prompt
(when inferior-ess-secondary-prompt
(string-match (concat "\\(" inferior-ess-secondary-prompt "\\)\\'") string)))
(unless no-timestamp
(process-put proc 'last-eval (current-time)))
busy
))
busy))

(defun inferior-ess-mark-as-busy (proc)
(process-put proc 'busy t)
(process-put proc 'sec-prompt nil))

(defun inferior-ess-run-callback (proc string)
;; callback is stored in 'callbacks proc property. It can be either a function
;; to be called with two artuments PROC and STRING or a cons cell of the form
;; (func . suppress) where, if suppress is non-nil next process output will be
;; suppressed.
(when (process-get proc 'busy-end?)
;; callback is stored in 'callbacks proc property. Callbacks is a list that
;; can contain either functions to be called with two artuments PROC and
;; STRING, or cons cells of the form (func . suppress). If SUPPRESS is non-nil
;; next process output will be suppressed.
(unless (process-get proc 'busy)
;; only one callback is implemented for now
(let* ((cb (car (process-get proc 'callbacks)))
(listp (not (functionp cb)))
(suppress (and listp (consp cb) (cdr cb)))
Expand Down
52 changes: 32 additions & 20 deletions lisp/ess-r-d.el
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ before ess-site is loaded) for it to take effect."))
process.")

(defun ess--R-load-ESSR ()
"Load/INSTALL/Update ESSR"
"Load/INSTALL/Update ESSR."
(let* ((ESSR-directory (expand-file-name "ESSR" ess-etc-directory))
(src-dir (expand-file-name "R" ESSR-directory)))

Expand Down Expand Up @@ -351,8 +351,6 @@ Optional prefix (C-u) allows to set command line arguments, such as
If you have certain command line arguments that should always be passed
to R, put them in the variable `inferior-R-args'."
(interactive "P")
;; get settings, notably inferior-R-program-name :
(setq ess-customize-alist R-customize-alist)
(ess-write-to-dribble-buffer ;; for debugging only
(format
"\n(R): ess-dialect=%s, buf=%s, start-arg=%s\n current-prefix-arg=%s\n"
Expand All @@ -372,43 +370,57 @@ to R, put them in the variable `inferior-R-args'."
(concat " [other than '" r-always-arg "']"))
" ? "))
nil)))
(cust-alist (copy-alist R-customize-alist))
(gdbp (string-match-p "gdb" r-start-args))
use-dialog-box)

(when gdbp
(setcdr (assoc 'inferior-ess-secondary-prompt cust-alist)
(format "\\(%s\\)\\|\\((gdb) \\)"
(cdr (assoc 'inferior-ess-secondary-prompt cust-alist)))))

(when (or ess-microsoft-p
(eq system-type 'cygwin))
(setq use-dialog-box nil)
(if ess-microsoft-p ;; default-process-coding-system would break UTF locales on Unix
(setq default-process-coding-system '(undecided-dos . undecided-dos))))
(when ess-microsoft-p ;; default-process-coding-system would break UTF locales on Unix
(setq default-process-coding-system '(undecided-dos . undecided-dos))))

(inferior-ess r-start-args)
(inferior-ess r-start-args cust-alist gdbp)

(ess-process-put 'funargs-pre-cache ess-R--funargs-pre-cache)
;; We need to use callback, because R might start with a gdb process
(ess-process-put 'callbacks '(R-initialize-on-start))
;; trigger the callback
(process-send-string (get-process ess-local-process-name) "\n")

(remove-hook 'completion-at-point-functions 'ess-filename-completion 'local) ;; should be first
(add-hook 'completion-at-point-functions 'ess-R-object-completion nil 'local)
(add-hook 'completion-at-point-functions 'ess-filename-completion nil 'local)

;;-------------------------
(setq comint-input-sender 'inferior-R-input-sender)

(ess-write-to-dribble-buffer
(format "(R): inferior-ess-language-start=%s\n"
inferior-ess-language-start))
inferior-ess-language-start))))

(when ess-can-eval-in-background
(ess-async-command-delayed
"invisible(installed.packages())\n" nil (get-process ess-local-process-name)
;; "invisible(Sys.sleep(10))\n" nil (get-process ess-local-process-name) ;; test only
(lambda (proc) (process-put proc 'packages-cached? t))))
(defun R-initialize-on-start (&optional proc string)
"This function is run after the first R prompt.
Executed in process buffer."
(interactive)

(ess--R-load-ESSR)
(when ess-can-eval-in-background
(ess-async-command-delayed
"invisible(installed.packages())\n" nil (get-process ess-local-process-name)
;; "invisible(Sys.sleep(10))\n" nil (get-process ess-local-process-name) ;; test only
(lambda (proc) (process-put proc 'packages-cached? t))))

(if inferior-ess-language-start
(ess-eval-linewise inferior-ess-language-start
nil nil nil 'wait-prompt))
(ess--R-load-ESSR)

(with-ess-process-buffer nil
(run-mode-hooks 'ess-R-post-run-hook))))
(when inferior-ess-language-start
(ess-eval-linewise inferior-ess-language-start
nil nil nil 'wait-prompt))

(with-ess-process-buffer nil
(run-mode-hooks 'ess-R-post-run-hook)))


;; (defun ess--R-cache-installed-packages ()
Expand Down
Loading

0 comments on commit 9c248f1

Please sign in to comment.