update packages
This commit is contained in:
@@ -6,6 +6,6 @@
|
||||
(bug-reference-url-format . "https://github.com/emacs-ess/ess/issues/%s")
|
||||
(sentence-end-double-space))
|
||||
(emacs-lisp-mode
|
||||
(outline-regexp . "\f\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*")
|
||||
(outline-regexp . "\f\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvum]\\|(setq\\|;;;;\\*")
|
||||
(indent-tabs-mode))
|
||||
(ess-r-mode . ((ess-style . RRR))))
|
||||
|
||||
@@ -3,6 +3,55 @@ allnews.texi.
|
||||
|
||||
Changes and New Features in 19.04 (unreleased):
|
||||
|
||||
* ESS[R]: 'ess-get-help-aliases-list' now caches the aliases on the R
|
||||
side. This should speed up help lookup when the search path has
|
||||
changed and the aliases are read again.
|
||||
|
||||
* ESS: 'ess-command' now uses a default timeout of 1 second. It
|
||||
should normally be used for instantaneous background tasks since it
|
||||
is synchronous and causes Emacs to block while the command is
|
||||
running. If the timeout is reached, an error is thrown to avoid
|
||||
hanging Emacs. An interrupt is sent to the process in case of
|
||||
early exit.
|
||||
|
||||
This is a behaviour change: you will now have to explicitly opt in
|
||||
blocking the whole Emacs UI for more than 2 seconds by supplying a
|
||||
larger timeout (use 'most-positive-fixnum' for infinity).
|
||||
|
||||
* ESS: 'ess-wait-for-process' now returns nil if a timeout is
|
||||
reached.
|
||||
|
||||
* ESS: 'ess-get-words-from-vector' gains a 'timeout' argument.
|
||||
|
||||
* ESS[R]: Fixed performance issue with argument completions. The
|
||||
help summary for the argument is no longer displayed in the echo
|
||||
area. This fixes delays and hangs (#1062).
|
||||
|
||||
* ESS[R]: 'ess-command' is now more robust and resilient to hangs and
|
||||
custom prompts (#1043).
|
||||
|
||||
* ESS[R]: 'ess-command' now handles sinked consoles correctly.
|
||||
|
||||
* ESS[R]: 'ess-command' no longer changes '.Last.value'. As a
|
||||
result, background tasks like completions no longer affect the last
|
||||
value binding (#1058).
|
||||
|
||||
* ESS[R]: Namespaced evaluation is disable in roxygen examples
|
||||
(#1026). Part of this change is that namespaced evaluation has
|
||||
become a buffer-local rather than process-local setting (#1046).
|
||||
This makes it possible to disable namespaced evaluation in specific
|
||||
buffers or contexts.
|
||||
|
||||
* iESS: Inferior processes can now properly reuse frames (#987).
|
||||
Fixed issue that caused the current buffer to be incorrectly
|
||||
displayed in the new frame when 'display-buffer' is set to pop up
|
||||
frames.
|
||||
|
||||
* ESS[R]: Better support for tramp. Fixed package evaluation on
|
||||
remote servers with Tramp (#950); process reloading (#1001); and an
|
||||
evaluation issue (#1024). These fixes were contributed by David
|
||||
Pritchard.
|
||||
|
||||
* ESS[R]: Automatic offsetting of R process output is now disabled by
|
||||
default because it produces undesirable output in some situations.
|
||||
To re-enable, set 'inferior-ess-fix-misaligned-output' to t.
|
||||
|
||||
@@ -1,768 +0,0 @@
|
||||
This is announc.info, produced by makeinfo version 6.5 from
|
||||
announc.texi.
|
||||
|
||||
|
||||
File: announc.info, Node: Announce
|
||||
|
||||
1 ANNOUNCING ESS
|
||||
****************
|
||||
|
||||
The ESS Developers proudly announce the release of ESS 18.10.3snapshot
|
||||
|
||||
Emacs Speaks Statistics (ESS) provides an intelligent, consistent
|
||||
interface between the user and the software. ESS interfaces with
|
||||
R/S-PLUS, SAS, BUGS/JAGS, Stata and other statistical analysis packages
|
||||
under the UNIX, GNU Linux, Microsoft Windows, macOS and other operating
|
||||
systems. ESS is a package for the GNU Emacs text editor whose features
|
||||
ESS uses to streamline the creation and use of statistical software.
|
||||
ESS knows the syntax and grammar of statistical analysis packages and
|
||||
provides consistent display and editing features based on that
|
||||
knowledge. ESS assists in interactive and batch execution of statements
|
||||
written in these statistical analysis languages.
|
||||
|
||||
ESS is freely available under the GNU General Public License (GPL).
|
||||
Please read the file COPYING which comes with the distribution, for more
|
||||
information about the license. For more detailed information, please
|
||||
read the README files that come with ESS.
|
||||
|
||||
* Menu:
|
||||
|
||||
* Latest Version::
|
||||
* Current Features::
|
||||
* Requirements::
|
||||
* Mailing List::
|
||||
* Reporting Bugs::
|
||||
* Authors::
|
||||
* License::
|
||||
* New Features::
|
||||
|
||||
|
||||
File: announc.info, Node: Latest Version, Next: Current Features, Prev: Announce, Up: Announce
|
||||
|
||||
1.1 Getting the Latest Version
|
||||
==============================
|
||||
|
||||
ESS supports GNU Emacs versions 25.1 and newer.
|
||||
|
||||
ESS is most likely to work with current/recent versions of the
|
||||
following statistical packages: R/S-PLUS, SAS, Stata, OpenBUGS and JAGS.
|
||||
|
||||
To build the PDF documentation, you will need a version of TeX Live
|
||||
or texinfo that includes texi2dvi.
|
||||
|
||||
There are two main methods used for installing ESS. You may install
|
||||
from a third-party repository or from source code. Once you install it,
|
||||
you must also activate or load ESS in each Emacs session, though
|
||||
installation from a third-party repository likely takes care of that for
|
||||
you. See *note Activating and Loading ESS:: for more details.
|
||||
|
||||
* Menu:
|
||||
|
||||
* Installing from a third-party repository::
|
||||
* Installing from source::
|
||||
* Activating and Loading ESS::
|
||||
* Check Installation::
|
||||
|
||||
|
||||
File: announc.info, Node: Installing from a third-party repository, Next: Installing from source
|
||||
|
||||
1.2 Installing from a third-party repository
|
||||
============================================
|
||||
|
||||
ESS is packaged by many third party repositories. Many GNU/Linux
|
||||
distributions package it, usually with the name "emacs-ess" or similar.
|
||||
|
||||
ESS is also available through Milkypostman’s Emacs Lisp Package
|
||||
Archive (MELPA), a popular repository for Emacs packages. Instructions
|
||||
on how to do so are found on MELPA's website (https://melpa.org/).
|
||||
MELPA also hosts MELPA-stable with stable ESS builds. You may choose
|
||||
between MELPA with the latest and greatest features (and bugs) or
|
||||
MELPA-stable, which may lag a bit behind but should be more stable.
|
||||
|
||||
After installing, users should make sure ESS is activated or loaded
|
||||
in each Emacs session. See *note Activating and Loading ESS::.
|
||||
Depending on install method, this may be taken care of automatically.
|
||||
|
||||
|
||||
File: announc.info, Node: Installing from source, Next: Activating and Loading ESS, Prev: Installing from a third-party repository
|
||||
|
||||
1.3 Installing from source
|
||||
==========================
|
||||
|
||||
Stable versions of ESS are available at the ESS web page
|
||||
(https://ess.r-project.org) as a .tgz file or .zip file. ESS releases
|
||||
are GPG-signed, you should check the signature by downloading the
|
||||
accompanying '.sig' file and doing:
|
||||
|
||||
gpg --verify ess-18.10.tgz.sig
|
||||
|
||||
Alternatively, you may download the git repository. ESS is currently
|
||||
hosted on GitHub: <https://github.com/emacs-ess/ESS>. 'git clone
|
||||
https://github.com/emacs-ess/ESS.git' will download it to a new
|
||||
directory 'ESS' in the current working directory.
|
||||
|
||||
We will refer to the location of the ESS source files as
|
||||
'/path/to/ESS/' hereafter.
|
||||
|
||||
After installing, users should make sure they activate or load ESS in
|
||||
each Emacs session, see *note Activating and Loading ESS::
|
||||
|
||||
Optionally, compile elisp files, build the documentation, and the
|
||||
autoloads:
|
||||
cd /path/to/ESS/
|
||||
make
|
||||
Without this step the documentation, reference card, and autoloads
|
||||
will not be available. Uncompiled ESS will also run slower.
|
||||
|
||||
Optionally, you may make ESS available to all users of a machine by
|
||||
installing it site-wide. To do so, run 'make install'. You might need
|
||||
administrative privileges:
|
||||
|
||||
make install
|
||||
|
||||
The files are installed into '/usr/share/emacs' directory. For this
|
||||
step to run correctly on macOS, you will need to adjust the 'PREFIX'
|
||||
path in 'Makeconf'. The necessary code and instructions are commented
|
||||
in that file.
|
||||
|
||||
|
||||
File: announc.info, Node: Activating and Loading ESS, Next: Check Installation, Prev: Installing from source
|
||||
|
||||
1.4 Activating and Loading ESS
|
||||
==============================
|
||||
|
||||
After installing ESS, you must activate or load it each Emacs session.
|
||||
ESS can be autoloaded, and if you used a third-party repository (such as
|
||||
your Linux distribution or MELPA) to install, you can likely skip this
|
||||
section and proceed directly to *note Check Installation::
|
||||
|
||||
Otherwise, you may need to add the path to ESS to 'load-path' with:
|
||||
|
||||
(add-to-list 'load-path "/path/to/ESS/lisp")
|
||||
|
||||
You then need to decide whether to take advantage of deferred loading
|
||||
(which will result in a faster Emacs startup time) or require ESS when
|
||||
Emacs is loaded. To autoload ESS when needed (note that if installed
|
||||
from source, you must have run 'make'):
|
||||
|
||||
(load "ess-autoloads")
|
||||
|
||||
To require ESS on startup, you can either put
|
||||
|
||||
(require 'ess-site)
|
||||
|
||||
or
|
||||
|
||||
(require 'ess-r-mode)
|
||||
|
||||
In your configuration file, depending on whether you want all ESS
|
||||
features or only R related features.
|
||||
|
||||
|
||||
File: announc.info, Node: Check Installation, Prev: Activating and Loading ESS
|
||||
|
||||
1.5 Check Installation
|
||||
======================
|
||||
|
||||
Restart Emacs and check that ESS was loaded from a correct location with
|
||||
'M-x ess-version'.
|
||||
|
||||
|
||||
File: announc.info, Node: Current Features, Next: Requirements, Prev: Latest Version, Up: Announce
|
||||
|
||||
1.6 Current Features
|
||||
====================
|
||||
|
||||
* Languages Supported:
|
||||
* S family (R, S, and S+ AKA S-PLUS)
|
||||
* SAS
|
||||
* BUGS/JAGS
|
||||
* Stata
|
||||
* Julia
|
||||
* Editing source code (S family, SAS, BUGS/JAGS, Stata, Julia)
|
||||
* Syntactic indentation and highlighting of source code
|
||||
* Partial evaluation of code
|
||||
* Loading and error-checking of code
|
||||
* Source code revision maintenance
|
||||
* Batch execution (SAS, BUGS/JAGS)
|
||||
* Use of imenu to provide links to appropriate functions
|
||||
* Interacting with the process (S family, SAS, Stata, Julia)
|
||||
* Command-line editing
|
||||
* Searchable Command history
|
||||
* Command-line completion of S family object names and file
|
||||
names
|
||||
* Quick access to object lists and search lists
|
||||
* Transcript recording
|
||||
* Interface to the help system
|
||||
* Transcript manipulation (S family, Stata)
|
||||
* Recording and saving transcript files
|
||||
* Manipulating and editing saved transcripts
|
||||
* Re-evaluating commands from transcript files
|
||||
* Interaction with Help Pages and other Documentation (R)
|
||||
* Fast Navigation
|
||||
* Sending Examples to running ESS process.
|
||||
* Fast Transfer to Further Help Pages
|
||||
* Help File Editing (R)
|
||||
* Syntactic indentation and highlighting of source code.
|
||||
* Sending Examples to running ESS process.
|
||||
* Previewing
|
||||
|
||||
|
||||
File: announc.info, Node: Requirements, Next: Mailing List, Prev: Current Features, Up: Announce
|
||||
|
||||
1.7 Requirements
|
||||
================
|
||||
|
||||
ESS supports GNU Emacs versions 25.1 and newer.
|
||||
|
||||
ESS is most likely to work with current/recent versions of the
|
||||
following statistical packages: R/S-PLUS, SAS, Stata, OpenBUGS and JAGS.
|
||||
|
||||
To build the PDF documentation, you will need a version of TeX Live
|
||||
or texinfo that includes texi2dvi.
|
||||
|
||||
|
||||
File: announc.info, Node: Mailing List, Next: Reporting Bugs, Prev: Requirements, Up: Announce
|
||||
|
||||
1.8 Mailing List
|
||||
================
|
||||
|
||||
There is a mailing list for discussions and announcements relating to
|
||||
ESS. Join the list by sending an e-mail with "subscribe ess-help" (or
|
||||
"help") in the body to <ess-help-request@r-project.org>; contributions
|
||||
to the list may be mailed to <ess-help@r-project.org>. Rest assured,
|
||||
this is a fairly low-volume mailing list.
|
||||
|
||||
The purposes of the mailing list include
|
||||
|
||||
* helping users of ESS to get along with it.
|
||||
* discussing aspects of using ESS.
|
||||
* suggestions for improvements.
|
||||
* announcements of new releases of ESS.
|
||||
* posting small patches to ESS.
|
||||
|
||||
|
||||
File: announc.info, Node: Reporting Bugs, Next: Authors, Prev: Mailing List, Up: Announce
|
||||
|
||||
1.9 Reporting Bugs
|
||||
==================
|
||||
|
||||
Please send bug reports, suggestions etc. to <ESS-bugs@r-project.org>,
|
||||
or post them on our github issue tracker
|
||||
(https://github.com/emacs-ess/ESS/issues)
|
||||
|
||||
The easiest way to do this is within Emacs by typing
|
||||
|
||||
'M-x ess-submit-bug-report'
|
||||
|
||||
This also gives the maintainers valuable information about your
|
||||
installation which may help us to identify or even fix the bug.
|
||||
|
||||
If Emacs reports an error, backtraces can help us debug the problem.
|
||||
Type "M-x set-variable RET debug-on-error RET t RET". Then run the
|
||||
command that causes the error and you should see a *Backtrace* buffer
|
||||
containing debug information; send us that buffer.
|
||||
|
||||
Note that comments, suggestions, words of praise and large cash
|
||||
donations are also more than welcome.
|
||||
|
||||
|
||||
File: announc.info, Node: Authors, Next: License, Prev: Reporting Bugs, Up: Announce
|
||||
|
||||
1.10 Authors
|
||||
============
|
||||
|
||||
* A.J. Rossini (mailto:blindglobe@gmail.com)
|
||||
* Richard M. Heiberger (mailto:rmh@temple.edu)
|
||||
* Kurt Hornik (mailto:Kurt.Hornik@R-project.org)
|
||||
* Martin Maechler (mailto:maechler@stat.math.ethz.ch)
|
||||
* Rodney A. Sparapani (mailto:rsparapa@mcw.edu)
|
||||
* Stephen Eglen (mailto:stephen@gnu.org)
|
||||
* Sebastian P. Luque (mailto:spluque@gmail.com)
|
||||
* Henning Redestig (mailto:henning.red@googlemail.com)
|
||||
* Vitalie Spinu (mailto:spinuvit@gmail.com)
|
||||
* Lionel Henry (mailto:lionel.hry@gmail.com)
|
||||
* J. Alexander Branham (mailto:alex.branham@gmail.com)
|
||||
|
||||
|
||||
File: announc.info, Node: License, Next: New Features, Prev: Authors, Up: Announce
|
||||
|
||||
1.11 License
|
||||
============
|
||||
|
||||
The source and documentation of ESS is free software. You can
|
||||
redistribute it and/or modify it under the terms of the GNU General
|
||||
Public License as published by the Free Software Foundation; either
|
||||
version 2, or (at your option) any later version.
|
||||
|
||||
ESS is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in
|
||||
the file COPYING in the same directory as this file for more details.
|
||||
|
||||
|
||||
File: announc.info, Node: New Features, Prev: License, Up: Announce
|
||||
|
||||
1.12 New Features
|
||||
=================
|
||||
|
||||
Changes and New Features in 19.04 (unreleased):
|
||||
|
||||
* ESS[R]: Automatic offsetting of R process output is now disabled by
|
||||
default because it produces undesirable output in some situations.
|
||||
To re-enable, set 'inferior-ess-fix-misaligned-output' to t.
|
||||
|
||||
* ESS[R]: Improved 'xref' lookup ('M-.'). Function locations are now
|
||||
always detected for package libraries listed in
|
||||
'ess-r-package-library-paths'.
|
||||
|
||||
* ESS[R]: Evaluated lines starting with the Roxygen prefix are now
|
||||
always stripped from the prefix, so they can be sent to the process
|
||||
easily. Previously, this was only the case inside the 'examples'
|
||||
field. Since roxygen is switching to R markdown, it becomes useful
|
||||
to evaluate chunks of R outside examples.
|
||||
|
||||
* stata support is now obsolete since we were unable to elicit FSF
|
||||
paperwork from some of the original authors: see the lisp/obsolete
|
||||
sub-directory on the ESS github repo
|
||||
|
||||
* 'ess-set-working-directory' no longer changes the active directory
|
||||
(as defined by the buffer-local variable 'default-directory') of
|
||||
the buffer where the command is called. Instead, the active
|
||||
directory of the inferior buffer is updated to the new working
|
||||
directory.
|
||||
|
||||
* The default of ess-eval-visibly is now ''nowait'. With this change
|
||||
you should no longer experience freezes while evaluating code.
|
||||
|
||||
* ESS[R]: There is a new menu entry for reloading the R process. It
|
||||
is otherwise bound to 'C-c C-e C-r'. Reloading now reuses the same
|
||||
process name and start arguments that were used to start the
|
||||
process.
|
||||
|
||||
* iESS: Process runners now return the inferior buffer. Note that
|
||||
callers of inferior runners should not assume that the current
|
||||
buffer has been set to the inferior buffer. Instead, use
|
||||
'with-current-buffer' with the return value of the inferior.
|
||||
|
||||
* iESS[SAS]: The SAS keymap was only set in iESS buffers called
|
||||
'*SAS*'. This is now fixed.
|
||||
|
||||
* ESS[R]: Fixed longstanding indentation issues involving '::' and
|
||||
':::' operators.
|
||||
|
||||
* Implement a more reliable check for the process busy state.
|
||||
Background actions such as completion and directory synchronization
|
||||
should not block the process and should not cause printing of the
|
||||
extraneous output to the interpreter.
|
||||
|
||||
* Activate 'goto-address-mode' for url and email highlighting in
|
||||
inferior buffers.
|
||||
|
||||
* 'smart-underscore' and 'ess-smart-S-assign-key' have been removed.
|
||||
Users who liked the previous behavior (i.e. underscore inserting
|
||||
"<-") should bind 'ess-insert-assign' to the underscore in their
|
||||
Emacs initialization file. For example, '(define-key
|
||||
ess-r-mode-map "_" #'ess-insert-assign)' and '(define-key
|
||||
inferior-ess-r-mode-map "_" #'ess-insert-assign)' will activate it
|
||||
in all ESS R buffers.
|
||||
|
||||
* ESS major modes are now defined using 'define-derived-mode'. This
|
||||
makes ESS major modes respect modern conventions such as having
|
||||
<language>-mode-hook and <language>-mode-map. Users are encouraged
|
||||
to place customizations under the appropriate mode.
|
||||
|
||||
* New option ess-auto-width controls setting the width option on
|
||||
window changes. Users can change it to 'frame, 'window, or an
|
||||
integer. See the documentation for details.
|
||||
'ess-auto-width-visible' controls visibility.
|
||||
|
||||
* ESS now respects 'display-buffer-alist'. Users can now use
|
||||
'display-buffer-alist' to manage how and where windows appear. For
|
||||
more information and examples, see *Note (ess)Controlling buffer
|
||||
display::.
|
||||
|
||||
* 'ess-roxy-mode' can now be enabled in non-R buffers. This is
|
||||
primarily intended to support roxygen documentation for cpp
|
||||
buffers. Preview functionality is not supported outside R buffers.
|
||||
|
||||
* ESS[R]: DESCRIPTION files now open in 'conf-colon-mode'.
|
||||
|
||||
* 'ess-style' now has effects when set as a file or directory local
|
||||
variable.
|
||||
|
||||
* 'ess-default-style' is now obsolete, use 'ess-style' instead.
|
||||
|
||||
* Options for 'ess-gen-proc-buffer-name-function' have been renamed.
|
||||
ess-gen-proc-buffer-name:projectile-or-simple was renamed to
|
||||
ess-gen-proc-buffer-name:project-or-simple and
|
||||
ess-gen-proc-buffer-name:projectile-or-directory was renamed to
|
||||
ess-gen-proc-buffer-name:project-or-directory. As the name
|
||||
suggests, these now rely on project.el (included with Emacs) rather
|
||||
than projectile.el, which is a third-party package.
|
||||
|
||||
* Eldoc fully honors 'eldoc-echo-area-use-multiline-p'
|
||||
|
||||
* ESS[R]: 'ess-r-rhub-check-package' gained new 'RECOMMENDED'.
|
||||
|
||||
* ESS[R]: devtools commands ask about saving modified buffers before
|
||||
running. Users can disable the questioning with
|
||||
'ess-save-silently'.
|
||||
|
||||
* ESS[R] help pages now provide links to other help topics. This is
|
||||
similar with what you would see with, for example
|
||||
'options(help_type = ``html'')' but works with the plain-text
|
||||
version as well. This only works with 'options(useFancyQuotes =
|
||||
TRUE)' (the default).
|
||||
|
||||
* 'ess-rdired' buffers now derive from tabulated-list-mode. They
|
||||
should look better and be a bit faster overall. The size column
|
||||
now displays object sizes in bytes.
|
||||
|
||||
* 'ess-rdired' buffers now auto-update. The frequency is governed by
|
||||
the new option 'ess-rdired-auto-update-interval'.
|
||||
|
||||
* ESS[R]: 'electric-layout-mode' is now supported. This
|
||||
automatically inserts a newline after an opening curly brace in R
|
||||
buffers. To enable it, customize 'ess-r-mode-hook'.
|
||||
|
||||
* ESS[R]: imenu now supports assignment with the equals sign.
|
||||
|
||||
* ESS[Rd]: Rd no longer writes abbrevs to user's abbrev file.
|
||||
|
||||
* ESS removed support for many unused languages. This includes old
|
||||
versions of S+, ARC, OMG, VST, and XLS.
|
||||
|
||||
* ess-r-runner-prefixes was modified to find R-4 and later.
|
||||
|
||||
The following have been made obsolete or removed, see their
|
||||
documentation for more detail:
|
||||
|
||||
* Libraries for literate data analysis are obsolete and not loaded by
|
||||
default. This includes 'ess-noweb', 'ess-swv', and related
|
||||
functionality like 'Rnw-mode'. Users are encouraged to switch to
|
||||
one of several other packages that deal with these modes. For
|
||||
example, polymode <https://github.com/polymode/poly-R/>,
|
||||
<https://polymode.github.io/>, or markdown-mode with edit-indirect
|
||||
<https://jblevins.org/projects/markdown-mode>.
|
||||
|
||||
* Support for 'auto-complete' is obsolete. The 'auto-complete'
|
||||
package is unmaintained and so ESS support is now obsolete. Users
|
||||
are encouraged to switch to 'company-mode' instead.
|
||||
|
||||
* User options for controlling display of buffers. This includes
|
||||
'ess-show-buffer-action', 'inferior-ess-same-window',
|
||||
'inferior-ess-own-frame', and 'inferior-ess-frame-alist'. See
|
||||
above about ESS respecting 'display-buffer-alist'.
|
||||
|
||||
* Variables 'ess-tab-always-indent' and 'ess-tab-complete-in-script'.
|
||||
Use the Emacs-wide setting of 'tab-always-indent' instead.
|
||||
|
||||
* 'inferior-ess-*-start-file' variables. All modes except Stata did
|
||||
not respect customization of this variable. In order to load a
|
||||
file on startup, you should put a function on
|
||||
'ess-*-post-run-hook'.
|
||||
|
||||
Bug Fixes in 18.10.3:
|
||||
* More 'Makefile' fixes, notably installing '*.el's.
|
||||
|
||||
Bug Fixes in 18.10.2:
|
||||
* ESS[R] Fix namespace evaluation in non-installed packages.
|
||||
Evaluation is directed into GlobalEnv as originally intended.
|
||||
* 'Makefile' fixes, notably for 'make install' and including full
|
||||
docs in the tarballs.
|
||||
|
||||
Bug Fixes in 18.10-1:
|
||||
* New functions 'ess-eval-line-visibly-and-step' ('C-c C-n' and
|
||||
'ess-eval-region-or-line-visibly-and-step' ('C-RET') which behave
|
||||
as the old versions of 'ess-eval-line-and-step' and
|
||||
'ess-eval-region-or-line-and-step'.
|
||||
|
||||
Changes and New Features in 18.10:
|
||||
|
||||
* This is the last release to support Emacs older than 25.1. Going
|
||||
forward, only GNU Emacs 25.1 and newer will be supported. Soon
|
||||
after this release, support for older Emacs versions will be
|
||||
dropped from the git master branch. Note that MELPA uses the git
|
||||
master branch to produce ESS snapshots, so if you are using Emacs <
|
||||
25.1 from MELPA and are unable to upgrade, you should switch to
|
||||
MELPA-stable.
|
||||
|
||||
* ESS now displays the language dialect in the mode-line. So, for
|
||||
example, R buffers will now show ESS[R] rather than ESS[S].
|
||||
|
||||
* The ESS manual has been updated and revised.
|
||||
|
||||
* The ESS initialization process has been further streamlined. If
|
||||
you update the autoloads (which installation from 'package-install'
|
||||
does), you should not need to '(require 'ess-site)' at all, as
|
||||
autoloads should automatically load ESS when it is needed (e.g.
|
||||
the first time an R buffer is opened). In order to defer loading
|
||||
your ESS config, you may want to do something like
|
||||
'(with-require-after-load "ess" <ess-config-here>)' in your Emacs
|
||||
init file. Users of the popular 'use-package' Emacs package can
|
||||
now do '(use-package ess :defer t)' to take advantage of this
|
||||
behavior. For more information on this feature, see *Note
|
||||
(ess)Activating and Loading ESS::.
|
||||
|
||||
* ESS now respects Emacs conventions for keybindings. This means
|
||||
that The 'C-c [letter]' bindings have been removed. This affects
|
||||
'C-c h', which was bound to 'ess-eval-line-and-step-invisibly' in
|
||||
'sas-mode-local-map'; 'C-c f', which was bound to
|
||||
'ess-insert-function-outline' in 'ess-add-MM-keys'; and 'C-c h',
|
||||
which was bound to 'ess-handy-commands' in 'Rd-mode-map',
|
||||
'ess-noweb-minor-mode-map', and 'ess-help-mode-map'
|
||||
|
||||
* Functions 'ess-eval-line-and-step' and
|
||||
'ess-eval-region-or-line-and-step' now behave consistently with
|
||||
other evaluation function inside a package.
|
||||
|
||||
* ESS[R]: 'ess-r-package-use-dir' now works with any mode. This sets
|
||||
the working directory to the root of the current package including
|
||||
for example C or C++ files within '/src').
|
||||
|
||||
* ESS[R]: Long + + prompts in the inferior no longer offset output.
|
||||
|
||||
* ESS[R]: New option 'strip' for 'inferior-ess-replace-long+'. This
|
||||
strips the entire + + sequence.
|
||||
|
||||
* ESS modes now inherit from 'prog-mode'. In the next release, ESS
|
||||
modes will use 'define-derived-mode' so that each mode will have
|
||||
(for example) its own hooks and keymaps.
|
||||
|
||||
* ESS[R]: Supports flymake in R buffers for Emacs 26 and newer.
|
||||
Users need to install the 'lintr' package to use it. Customizable
|
||||
options include 'ess-use-flymake', 'ess-r-flymake-linters', and
|
||||
'ess-r-flymake-lintr-cache'.
|
||||
|
||||
* ESS[R]: Gained support for xref in Emacs 25+ *Note (emacs)Xref::.
|
||||
|
||||
* ESS[R]: The startup screen is cleaner. It also displays the
|
||||
startup directory with an explicit 'setwd()'.
|
||||
|
||||
* ESS[R]: Changing the working directory is now always reflected in
|
||||
the process buffer.
|
||||
|
||||
* ESS[R]: 'Makevars' files open with 'makefile-mode'.
|
||||
|
||||
* New variable 'ess-write-to-dribble'. This allows users to disable
|
||||
the dribble ('*ESS*') buffer if they wish.
|
||||
|
||||
* All of the '*-program-name' variables have been renamed to
|
||||
'*-program'. Users who previously customized e.g.
|
||||
'inferior-ess-R-program-name' will need to update their
|
||||
customization to 'inferior-ess-R-program'. These variables are
|
||||
treated as risky variables.
|
||||
|
||||
* 'ess-smart-S-assign' was renamed to 'ess-insert-assign'. It
|
||||
provides similar functionality but for any keybinding, not just
|
||||
'_'. For instance if you bind it to ';', repeated invocations
|
||||
cycle through between assignment and inserting ';'.
|
||||
|
||||
* 'C-c C-=' is now bound to 'ess-cycle-assign' by default. See the
|
||||
documentation for details. New user customization option
|
||||
'ess-assign-list' controls which assignment operators are cycled.
|
||||
|
||||
* ESS[R] In remote sessions, the ESSR package is now fetched from
|
||||
GitHub.
|
||||
|
||||
* Commands that send the region to the inferior process now deal with
|
||||
rectangular regions. See the documentation of 'ess-eval-region'
|
||||
for details. This only works on Emacs 25.1 and newer.
|
||||
|
||||
* ESS[R]: Improvements to interacting with iESS in non-R files.
|
||||
Interaction with inferior process in non-R files within packages
|
||||
(for instance C or C++ files) has been improved. This is a work in
|
||||
progress.
|
||||
|
||||
* ESS[R]: Changing the working directory is now always reflected in
|
||||
the process buffer.
|
||||
|
||||
* ESS[JAGS]: *.jog and *.jmd files no longer automatically open in
|
||||
JAGS mode.
|
||||
|
||||
Many improvements to fontification:
|
||||
|
||||
* Improved customization for faces. ESS now provides custom faces
|
||||
for (nearly) all faces used and places face customization options
|
||||
into their own group. Users can customize these options using 'M-x
|
||||
customize-group RET ess-faces'.
|
||||
|
||||
* Many new keywords were added to 'ess-R-keywords' and
|
||||
'ess-R-modifiers'. See the documentation for details.
|
||||
|
||||
* ESS[R]: 'in' is now only fontified when inside a 'for' construct.
|
||||
This avoids spurious fontification, especially in the output buffer
|
||||
where 'in' is a common English word.
|
||||
|
||||
* ESS: Font-lock keywords are now generated lazily. That means you
|
||||
can now add or remove keywords from variables like 'ess-R-keywords'
|
||||
in your Emacs configuration file after loading ESS (i.e. in the
|
||||
':config' section for 'use-package' users).
|
||||
|
||||
* ESS[R]: Fontification of roxygen '@param' keywords now supports
|
||||
comma-separated parameters.
|
||||
|
||||
* ESS[R]: Certain keywords are only fontified if followed by a
|
||||
parenthesis. Function-like keywords such as 'if ()' or 'stop()'
|
||||
are no longer fontified as keyword if not followed by an opening
|
||||
parenthesis. The same holds for search path modifiers like
|
||||
'library()' or 'require()'.
|
||||
|
||||
* ESS[R]: Fixed fontification toggling. Especially certain syntactic
|
||||
elements such as '%op%' operators and backquoted function
|
||||
definitions.
|
||||
|
||||
* ESS[R]: 'ess-font-lock-toggle-keyword' can be called interactively.
|
||||
This command asks with completion for a font-lock group to toggle.
|
||||
This functionality is equivalent to the font-lock menu.
|
||||
|
||||
Notable bug fixes:
|
||||
|
||||
* 'prettify-symbols-mode' no longer breaks indentation. This is
|
||||
accomplished by having the pretty symbols occupy the same number of
|
||||
characters as their non-pretty cousins. You may customize the new
|
||||
variable 'ess-r-prettify-symbols' to control this behavior.
|
||||
|
||||
* ESS: Inferior process buffers are now always displayed on startup.
|
||||
Additionally, they don't hang Emacs on failures.
|
||||
|
||||
Obsolete libraries, functions, and variables:
|
||||
|
||||
* The 'ess-r-args.el' library has been obsoleted and will be removed
|
||||
in the next release. Use 'eldoc-mode' instead, which is on by
|
||||
default.
|
||||
|
||||
* Functions and options dealing with the smart assign key are
|
||||
obsolete. The following functions have been made obsolete and will
|
||||
be removed in the next release of ESS: 'ess-smart-S-assign',
|
||||
'ess-toggle-S-assign', 'ess-toggle-S-assign-key',
|
||||
'ess-disable-smart-S-assign'.
|
||||
|
||||
The variable 'ess-smart-S-assign-key' is now deprecated and will be
|
||||
removed in the next release. If you would like to continue using
|
||||
'_' for inserting assign in future releases, please bind
|
||||
'ess-insert-assign' in 'ess-mode-map' the normal way.
|
||||
|
||||
* ESS[S]: Variable 'ess-s-versions-list' is obsolete and ignored.
|
||||
Use 'ess-s-versions' instead. You may pass arguments by starting
|
||||
the inferior process with the universal argument.
|
||||
|
||||
Changes and New Features in 17.11:
|
||||
|
||||
* The ESS initialization process has been streamlined. You can now
|
||||
load the R and Stata modes independently from the rest of ESS. Just
|
||||
put '(require 'ess-r-mode)' or '(require 'ess-stata-mode)' in your
|
||||
init file. This is for experienced Emacs users as this requires
|
||||
setting up autoloads for '.R' files manually. We will keep
|
||||
maintaining 'ess-site' for easy loading of all ESS features.
|
||||
|
||||
* Reloading and quitting the process is now more robust. If no
|
||||
process is attached, ESS now switches automatically to one
|
||||
(prompting you for selection if there are several running).
|
||||
Reloading and quitting will now work during a debug session or when
|
||||
R is prompting for input (for instance after a crash). Finally,
|
||||
the window configuration is saved and restored after reloading to
|
||||
prevent the buffer of the new process from capturing the cursor.
|
||||
|
||||
* ESS[R]: New command 'ess-r-package-use-dir'. It sets the working
|
||||
directory of the current process to the current package directory.
|
||||
|
||||
* ESS[R] Lookup for references in inferior buffers has been improved.
|
||||
New variable 'ess-r-package-source-roots' contains package
|
||||
sub-directories which are searched recursively during the file
|
||||
lookup point. Directories in 'ess-tracebug-search-path' are now
|
||||
also searched recursively.
|
||||
|
||||
* ESS[R] Namespaced evaluation is now automatically enabled only in
|
||||
the 'R/' directory. This way ESS will not attempt to update
|
||||
function definitions from a package if you are working from e.g. a
|
||||
test file.
|
||||
|
||||
Changes and New Features in 16.10:
|
||||
|
||||
* ESS[R]: Syntax highlighting is now more consistent. Backquoted
|
||||
names are not fontified as strings (since they really are
|
||||
identifiers). Furthermore they are now correctly recognized when
|
||||
they are function definitions or function calls.
|
||||
* ESS[R]: Backquoted names and '%op%' operators are recognized as
|
||||
sexp. This is useful for code navigation, e.g. with 'C-M-f' and
|
||||
'C-M-b'.
|
||||
* ESS[R]: Integration of outline mode with roxygen examples fields.
|
||||
You can use outline mode's code folding commands to fold the
|
||||
examples field. This is especially nice to use with well
|
||||
documented packages with long examples set. Set
|
||||
'ess-roxy-fold-examples' to non-nil to automatically fold the
|
||||
examples field when you open a buffer.
|
||||
* ESS[R]: New experimental feature: syntax highlighting in roxygen
|
||||
examples fields. This is turned off by default. Set
|
||||
'ess-roxy-fontify-examples' to non-nil to try it out.
|
||||
* ESS[R]: New package development command 'ess-r-devtools-ask' bound
|
||||
to 'C-c C-w C-a'. It asks with completion for any devtools command
|
||||
that takes 'pkg' as argument.
|
||||
* ESS[R]: New command 'C-c C-e C-r' to reload the inferior process.
|
||||
Currently only implemented for R. The R method runs
|
||||
'inferior-ess-r-reload-hook' on reloading.
|
||||
* ESS[R]: 'ess-r-package-mode' is now activated in non-file buffers
|
||||
as well.
|
||||
|
||||
Bug fixes in 16.10:
|
||||
* ESS[R]: Fix broken (un)flagging for debugging inside packages
|
||||
* ESS[R]: Fixes (and improvements) in Package development
|
||||
* ESS[R]: Completion no longer produces '...=' inside 'list( )'.
|
||||
* ESS[R]: Better debugging and tracing in packages.
|
||||
* ESS[R]: Better detection of symbols at point.
|
||||
* ESS[R]: No more spurious warnings on deletion of temporary files.
|
||||
* ESS[julia]: help and completion work (better)
|
||||
* ESS[julia]: available via 'ess-remote'
|
||||
|
||||
Changes and New Features in 16.04:
|
||||
|
||||
* ESS[R]: 'developer' functionality has been refactored. The new
|
||||
user interface consists of a single command
|
||||
'ess-r-set-evaluation-env' bound by default to 'C-c C-t C-s'. Once
|
||||
an evaluation environment has been set with, all subsequent ESS
|
||||
evaluation will source the code into that environment. By default,
|
||||
for file within R packages the evaluation environment is set to the
|
||||
package environment. Set 'ess-r-package-auto-set-evaluation-env'
|
||||
to 'nil' to disable this.
|
||||
* ESS[R]: New 'ess-r-package-mode' This development mode provides
|
||||
features to make package development easier. Currently, most of
|
||||
the commands are based on the 'devtools' packages and are
|
||||
accessible with 'C-c C-w' prefix. See the documentation of
|
||||
'ess-r-package-mode' function for all available commands. With
|
||||
'C-u' prefix each command asks for extra arguments to the
|
||||
underlying devtools function. This mode is automatically enabled
|
||||
in all files within R packages and is indicated with '[pkg:NAME]'
|
||||
in the mode-line.
|
||||
* ESS[R]: Help lookup has been improved. It is now possible to get
|
||||
help for namespaced objects such as pkg::foobar. Furthermore, ESS
|
||||
recognizes more reliably when you change 'options('html_type')'.
|
||||
* ESS[R]: New specialized breakpoints for debugging magrittr pipes
|
||||
* ESS: ESS now implements a simple message passing interface to
|
||||
communicate between ESS and inferior process.
|
||||
|
||||
Bug fixes in 16.04:
|
||||
* ESS[R]: Roxygen blocks with backtics are now correctly filled
|
||||
* ESS[R]: Don't skip breakpoints in magrittr's 'debug_pipe'
|
||||
* ESS[R]: Error highlighting now understands 'testthat' type errors
|
||||
* ESS[Julia]: Added getwd and setwd generic commands
|
||||
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Announce75
|
||||
Node: Latest Version1298
|
||||
Node: Installing from a third-party repository2241
|
||||
Node: Installing from source3192
|
||||
Node: Activating and Loading ESS4788
|
||||
Node: Check Installation5866
|
||||
Node: Current Features6090
|
||||
Node: Requirements7633
|
||||
Node: Mailing List8068
|
||||
Node: Reporting Bugs8774
|
||||
Node: Authors9654
|
||||
Node: License10338
|
||||
Node: New Features10988
|
||||
|
||||
End Tag Table
|
||||
@@ -15,5 +15,5 @@ File: dir, Node: Top, This is the top of the INFO tree
|
||||
* Menu:
|
||||
|
||||
Emacs
|
||||
* ESS: (ess). Emacs Speaks Statistics (R/S/S+, SAS,
|
||||
BUGS/JAGS and Stata).
|
||||
* ESS: (ess). Emacs Speaks Statistics
|
||||
(S/S+/R, SAS, BUGS, Stata, XLisp-Stat).
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
(defvar ess--help-frame nil
|
||||
"Stores the frame used for displaying R help buffers.")
|
||||
|
||||
(defvar ess-help--aliases-timeout 10
|
||||
"The large timeout is necessary for some users (#1025, #1081).")
|
||||
|
||||
; ess-help-mode
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;; In this section:
|
||||
@@ -132,8 +135,8 @@ supplied, it is used instead of `inferior-ess-help-command'."
|
||||
(interactive
|
||||
(progn
|
||||
(ess-force-buffer-current)
|
||||
(when current-prefix-arg ;update cache if prefix
|
||||
(ess-process-put 'sp-for-help-changed? t))
|
||||
(when current-prefix-arg
|
||||
(ess-help--reset-cache))
|
||||
(list (ess-find-help-file "Help on"))))
|
||||
(let* ((hb-name (concat "*help[" ess-current-process-name "]("
|
||||
(replace-regexp-in-string "^\\?\\|`" "" object) ")*"))
|
||||
@@ -151,6 +154,13 @@ supplied, it is used instead of `inferior-ess-help-command'."
|
||||
(unless (ess--help-kill-bogus-buffer-maybe tbuffer)
|
||||
(ess-display-help tbuffer))))
|
||||
|
||||
(defun ess-help--reset-cache ()
|
||||
"Reset all cached help files."
|
||||
(ess-process-put 'sp-for-help-changed? t)
|
||||
(ess-help--reset-cache-override))
|
||||
|
||||
(cl-defgeneric ess-help--reset-cache-override ())
|
||||
|
||||
(defun ess-help-revert-buffer (_ignore-auto _noconfirm)
|
||||
"Revert the current help buffer.
|
||||
This reloads the documentation. IGNORE-AUTO and NOCONFIRM are
|
||||
@@ -171,7 +181,9 @@ ignored."
|
||||
(let ((command (if (and command (string-match-p "%s" command))
|
||||
(format command object)
|
||||
command)))
|
||||
(ess-command (or command (ess-build-help-command object)) (current-buffer)))
|
||||
(ess-command (or command (ess-build-help-command object))
|
||||
(current-buffer)
|
||||
nil nil nil nil nil ess-help--aliases-timeout))
|
||||
(ess-help-underline)
|
||||
(unless (string= ess-language "STA")
|
||||
(ess-nuke-help-bs))
|
||||
@@ -294,7 +306,7 @@ REG-START gives the start location from where to search linkifying, and HELP-OBJ
|
||||
(ess-setq-vars-local (eval alist))
|
||||
(setq ess-help-object help-object
|
||||
ess-help-sec-regex "\\(^\\s-.*\n\\)\\|\\(^\n\\)")
|
||||
(ess-command command buff)
|
||||
(ess--foreground-command command buff)
|
||||
(ess-help-underline)
|
||||
(set-buffer-modified-p 'nil)
|
||||
(goto-char (point-min))
|
||||
@@ -681,7 +693,9 @@ nil otherwise."
|
||||
;; ess-command locks display, make sure the above message is visible
|
||||
(redisplay t)
|
||||
(ess-write-to-dribble-buffer "Processing RDS files ...\n")
|
||||
(prog1 (ess-get-words-from-vector ".ess.getHelpAliases()\n")
|
||||
;; FIXME: This should be run asynchronously
|
||||
(prog1 (ess-get-words-from-vector ".ess.getHelpAliases()\n"
|
||||
nil nil nil ess-help--aliases-timeout)
|
||||
(message "Retrieving RDS aliases...done")))
|
||||
|
||||
(defun ess-nuke-help-bs ()
|
||||
|
||||
@@ -332,12 +332,12 @@ name. Abbreviation is performed by `abbreviate-file-name'. See
|
||||
(defun ess-gen-proc-buffer-name:project-or-simple (proc-name)
|
||||
"Function to generate buffer name in the form *PROC-NAME:PROJECT-ROOT*.
|
||||
PROC-NAME is a string representing an internal process name.
|
||||
PROJECT-ROOT is directory name returned by `project-roots'. If no
|
||||
PROJECT-ROOT is directory name returned by `ess-project-root'. If no
|
||||
project directory has been found use
|
||||
`ess-gen-proc-buffer-name:simple'. See
|
||||
`ess-gen-proc-buffer-name-function'."
|
||||
(if-let ((p (project-current))
|
||||
(proj (car (project-roots p))))
|
||||
(proj (ess-project-root p)))
|
||||
(format "*%s:%s*" proc-name (file-name-nondirectory
|
||||
(directory-file-name proj)))
|
||||
(ess-gen-proc-buffer-name:simple proc-name)))
|
||||
@@ -345,12 +345,12 @@ project directory has been found use
|
||||
(defun ess-gen-proc-buffer-name:project-or-directory (proc-name)
|
||||
"Function to generate buffer name in the form *PROC-NAME:PROJECT-ROOT*.
|
||||
PROC-NAME is a string representing an internal process name.
|
||||
PROJECT-ROOT is directory name returned by `project-roots' if
|
||||
PROJECT-ROOT is directory name returned by `ess-project-root' if
|
||||
defined. If no project directory has been found, use
|
||||
`ess-gen-proc-buffer-name:directory'. See
|
||||
`ess-gen-proc-buffer-name-function'."
|
||||
(if-let ((p (project-current))
|
||||
(proj (car (project-roots p))))
|
||||
(proj (ess-project-root p)))
|
||||
(format "*%s:%s*" proc-name (file-name-nondirectory
|
||||
(directory-file-name proj)))
|
||||
(ess-gen-proc-buffer-name:directory proc-name)))
|
||||
@@ -407,6 +407,24 @@ Return non-nil if the process is in a ready (not busy) state."
|
||||
(string-match (concat "\\(" inferior-ess-secondary-prompt "\\)\\'") string)))
|
||||
ready))
|
||||
|
||||
(defun inferior-ess--set-status-sentinel (proc output-buf sentinel)
|
||||
(with-current-buffer output-buf
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
;; The only assumption is that the prompt finishes with "> "
|
||||
(goto-char (- (point-max) 2))
|
||||
(when (looking-at inferior-ess-primary-prompt)
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward (inferior-ess--sentinel-start-re sentinel) nil t)
|
||||
(delete-region (match-beginning 0) (1+ (match-end 0))))
|
||||
(when (re-search-forward (concat "^\\(" sentinel "-END[\n\r]+\\)") nil t)
|
||||
(delete-region (match-beginning 0) (match-end 0))
|
||||
(process-put proc 'busy nil)
|
||||
(process-put proc 'ess-output-sentinel nil)))))))
|
||||
|
||||
(defun inferior-ess--sentinel-start-re (sentinel)
|
||||
(concat "^\\(" sentinel "-START$\\)"))
|
||||
|
||||
(defun inferior-ess-mark-as-busy (proc)
|
||||
"Put PROC's busy value to t."
|
||||
(process-put proc 'busy t)
|
||||
@@ -719,26 +737,35 @@ LANGUAGE is ignored."
|
||||
(error "No ESS processes running; not yet implemented to start (%s,%s)"
|
||||
language dialect)))))
|
||||
|
||||
(defmacro ess--with-no-pop-to-buffer (&rest body)
|
||||
"Disable some effects of `pop-to-buffer'.
|
||||
Prevent `display-buffer' from performing an action and save the
|
||||
current buffer to prevent `pop-to-buffer' from setting a new
|
||||
current buffer."
|
||||
;; `pop-to-buffer' might still raise windows and frames so it may be
|
||||
;; better to have our own configurable `ess--pop-to-buffer' wrapper.
|
||||
(declare (indent 0)
|
||||
(debug (&rest form)))
|
||||
`(let ((display-buffer-overriding-action '(display-buffer-no-window (allow-no-window . t))))
|
||||
(save-current-buffer
|
||||
,@body)))
|
||||
|
||||
(defun ess-request-a-process (message &optional noswitch ask-if-1)
|
||||
"Ask for a process, and make it the current ESS process.
|
||||
If there is exactly one process, only ask if ASK-IF-1 is non-nil.
|
||||
Also switches to the process buffer unless NOSWITCH is non-nil. Interactively,
|
||||
NOSWITCH can be set by giving a prefix argument.
|
||||
Returns the name of the selected process."
|
||||
(interactive
|
||||
(list "Switch to which ESS process? " current-prefix-arg))
|
||||
; prefix sets 'noswitch
|
||||
(ess-write-to-dribble-buffer "ess-request-a-process: {beginning}\n")
|
||||
Also switches to the process buffer unless NOSWITCH is non-nil.
|
||||
Interactively, NOSWITCH can be set by giving a prefix argument.
|
||||
Returns the name of the selected process. MESSAGE may get passed
|
||||
to `ess-completing-read'."
|
||||
(interactive (list "Switch to which ESS process? " current-prefix-arg))
|
||||
(update-ess-process-name-list)
|
||||
|
||||
(setq ess-dialect (or ess-dialect
|
||||
(ess-completing-read
|
||||
"Set `ess-dialect'"
|
||||
(delete-dups (list "R" "S+" (or (bound-and-true-p S+-dialect-name) "S+")
|
||||
"stata" (or (bound-and-true-p STA-dialect-name) "stata")
|
||||
"julia" "SAS" "XLS" "ViSta")))))
|
||||
|
||||
(let* ((pname-list (delq nil ;; keep only those matching dialect
|
||||
(let* ((ess-dialect (or ess-dialect
|
||||
(ess-completing-read
|
||||
"Set `ess-dialect'"
|
||||
(delete-dups (list "R" "S+" (or (bound-and-true-p S+-dialect-name) "S+")
|
||||
"stata" (or (bound-and-true-p STA-dialect-name) "stata")
|
||||
"julia" "SAS")))))
|
||||
(pname-list (delq nil ;; keep only those matching dialect
|
||||
(append
|
||||
(mapcar (lambda (lproc)
|
||||
(and (equal ess-dialect
|
||||
@@ -752,56 +779,47 @@ Returns the name of the selected process."
|
||||
(when (assoc ess-local-process-name ess-process-name-list)
|
||||
(list ess-local-process-name)))))
|
||||
(num-processes (length pname-list))
|
||||
(auto-started?))
|
||||
(if (or (= 0 num-processes)
|
||||
(and (= 1 num-processes)
|
||||
(not (equal ess-dialect ;; don't auto connect if from different dialect
|
||||
(buffer-local-value
|
||||
'ess-dialect
|
||||
(process-buffer (get-process
|
||||
(car pname-list))))))))
|
||||
;; try to start "the appropriate" process
|
||||
(progn
|
||||
(ess-write-to-dribble-buffer
|
||||
(concat " ... request-a-process:\n "
|
||||
(format
|
||||
"major mode %s; current buff: %s; ess-language: %s, ess-dialect: %s\n"
|
||||
major-mode (current-buffer) ess-language ess-dialect)))
|
||||
(ess-start-process-specific ess-language ess-dialect)
|
||||
(ess-write-to-dribble-buffer
|
||||
(format " ... request-a-process: buf=%s\n" (current-buffer)))
|
||||
(setq num-processes 1
|
||||
pname-list (car ess-process-name-list)
|
||||
auto-started? t)))
|
||||
proc auto-started?)
|
||||
(when (or (= 0 num-processes)
|
||||
(and (= 1 num-processes)
|
||||
(not (equal ess-dialect ;; don't auto connect if from different dialect
|
||||
(buffer-local-value
|
||||
'ess-dialect
|
||||
(process-buffer (get-process
|
||||
(car pname-list))))))))
|
||||
;; try to start "the appropriate" process, don't show the buffer
|
||||
;; since we handle that explicitly with no-switch
|
||||
(ess--with-no-pop-to-buffer
|
||||
(ess-start-process-specific ess-language ess-dialect))
|
||||
(setq num-processes 1
|
||||
pname-list (car ess-process-name-list)
|
||||
auto-started? t))
|
||||
;; now num-processes >= 1 :
|
||||
(let* ((proc-buffers (mapcar (lambda (lproc)
|
||||
(buffer-name (process-buffer (get-process lproc))))
|
||||
pname-list))
|
||||
(proc
|
||||
pname-list)))
|
||||
(setq proc
|
||||
(if (or auto-started?
|
||||
(and (not ask-if-1) (= 1 num-processes)))
|
||||
(progn
|
||||
(message "using process '%s'" (car proc-buffers))
|
||||
(car pname-list))
|
||||
;; else
|
||||
(and (not ask-if-1)
|
||||
(= 1 num-processes)
|
||||
(message "Using process `%s'" (car proc-buffers))))
|
||||
(car pname-list)
|
||||
(unless (and ess-current-process-name
|
||||
(get-process ess-current-process-name))
|
||||
(setq ess-current-process-name nil))
|
||||
(when message
|
||||
(setq message (replace-regexp-in-string ": +\\'" "" message))) ;; <- why is this here??
|
||||
;; ask for buffer name not the *real* process name:
|
||||
(let ((buf (ess-completing-read message (append proc-buffers (list "*new*")) nil t nil nil)))
|
||||
(if (equal buf "*new*")
|
||||
(progn
|
||||
(ess-start-process-specific ess-language ess-dialect) ;; switches to proc-buff
|
||||
(caar ess-process-name-list))
|
||||
(process-name (get-buffer-process buf))
|
||||
))
|
||||
)))
|
||||
(if noswitch
|
||||
(pop-to-buffer (current-buffer)) ;; VS: this is weird, but is necessary
|
||||
(pop-to-buffer (buffer-name (process-buffer (get-process proc)))))
|
||||
proc)))
|
||||
(if (not (equal buf "*new*"))
|
||||
(process-name (get-buffer-process buf))
|
||||
;; Prevent new process buffer from being popped
|
||||
;; because we handle display depending on the value
|
||||
;; of `no-switch`
|
||||
(ess--with-no-pop-to-buffer
|
||||
(ess-start-process-specific ess-language ess-dialect))
|
||||
(caar ess-process-name-list))))))
|
||||
(unless noswitch
|
||||
(pop-to-buffer (ess-get-process-buffer proc)))
|
||||
proc))
|
||||
|
||||
(defun ess-force-buffer-current (&optional prompt force no-autostart ask-if-1)
|
||||
"Make sure the current buffer is attached to an ESS process.
|
||||
@@ -900,9 +918,10 @@ toggled."
|
||||
(message "Found no buffers for `ess-dialect' %s associated with process %s"
|
||||
dialect proc-name)))
|
||||
(ess-switch-to-ESS eob))
|
||||
(set-transient-map (let ((map (make-sparse-keymap))
|
||||
(key (vector last-command-event)))
|
||||
(define-key map key #'ess-switch-to-inferior-or-script-buffer) map))))
|
||||
(when (called-interactively-p 'any)
|
||||
(set-transient-map (let ((map (make-sparse-keymap))
|
||||
(key (vector last-command-event)))
|
||||
(define-key map key #'ess-switch-to-inferior-or-script-buffer) map)))))
|
||||
|
||||
|
||||
(defun ess-get-process-buffer (&optional name)
|
||||
@@ -956,7 +975,9 @@ is non-nil wait for WAIT seconds for process output before the
|
||||
prompt check, default 0.002s. When FORCE-REDISPLAY is non-nil
|
||||
force redisplay. You better use WAIT >= 0.1 if you need
|
||||
FORCE-REDISPLAY to avoid excessive redisplay. If TIMEOUT is
|
||||
non-nil stop waiting for output after TIMEOUT seconds."
|
||||
non-nil stop waiting for output after TIMEOUT seconds.
|
||||
|
||||
Returns nil if TIMEOUT was reached, non-nil otherwise."
|
||||
(setq proc (or proc (get-process ess-local-process-name)))
|
||||
(setq wait (or wait 0.005))
|
||||
(setq timeout (or timeout most-positive-fixnum))
|
||||
@@ -977,14 +998,20 @@ non-nil stop waiting for output after TIMEOUT seconds."
|
||||
(redisplay 'force))
|
||||
(setq elapsed (- (float-time) start-time))
|
||||
(when (> elapsed .3)
|
||||
(setq wait .3))))))
|
||||
(setq wait .3))))
|
||||
(< elapsed timeout)))
|
||||
|
||||
(defun inferior-ess-ordinary-filter (proc string)
|
||||
(inferior-ess--set-status proc string)
|
||||
(ess--if-verbose-write-process-state proc string "ordinary-filter")
|
||||
(inferior-ess-run-callback proc string)
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(insert string)))
|
||||
(let ((sentinel (process-get proc 'ess-output-sentinel)))
|
||||
(unless sentinel
|
||||
(inferior-ess--set-status proc string)
|
||||
(inferior-ess-run-callback proc string))
|
||||
(ess--if-verbose-write-process-state proc string "ordinary-filter")
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(insert string))
|
||||
(when sentinel
|
||||
(inferior-ess--set-status-sentinel proc (process-buffer proc) sentinel)
|
||||
(inferior-ess-run-callback proc string))))
|
||||
|
||||
(defvar ess-presend-filter-functions nil
|
||||
"List of functions to call before sending the input string to the process.
|
||||
@@ -1191,16 +1218,45 @@ This handles Tramp when working on a remote."
|
||||
(user-error "ESS process not ready. Finish your command before trying again")))
|
||||
proc)
|
||||
|
||||
(defun ess-command (cmd &optional out-buffer _sleep no-prompt-check wait proc force-redisplay)
|
||||
(defvar-local ess-format-command-alist nil
|
||||
"Alist of mode-specific parameters for formatting a command.
|
||||
All elements are optional.
|
||||
|
||||
- `fun': A formatting function for running a command. First
|
||||
argument is the background command to run. Must include a
|
||||
catch-all `&rest` parameter for extensibility.
|
||||
|
||||
- `use-sentinel' : Whether to wait for an output sentinel. If
|
||||
non-nil, `fun' should get the `output-sentinel' element of the
|
||||
alist of parameters and ensure the sentinel is written to the
|
||||
process output at the end of the command.")
|
||||
|
||||
(defvar inferior-ess--output-sentinel-count 0)
|
||||
(defun inferior-ess--output-sentinel ()
|
||||
(setq inferior-ess--output-sentinel-count (1+ inferior-ess--output-sentinel-count))
|
||||
(format "ess-output-sentinel%s" inferior-ess--output-sentinel-count))
|
||||
|
||||
;; NOTE: We might want to switch to somethig like `cl-defun' with
|
||||
;; keyword arguments given the length of the signature. Would also
|
||||
;; make it easier to deprecate arguments.
|
||||
(defun ess-command (cmd &optional out-buffer _sleep no-prompt-check wait proc
|
||||
force-redisplay timeout)
|
||||
"Send the ESS process CMD and delete the output from the ESS process buffer.
|
||||
If an optional second argument OUT-BUFFER exists save the output
|
||||
in that buffer. OUT-BUFFER is erased before use. CMD should have
|
||||
a terminating newline. Guarantees that the value of `.Last.value'
|
||||
will be preserved.
|
||||
|
||||
SLEEP is deprecated and no longer has any effect. WAIT and
|
||||
FORCE-REDISPLAY are as in `ess-wait-for-process' and are passed
|
||||
to `ess-wait-for-process'.
|
||||
`ess-command' is executes CMD in the background synchronously,
|
||||
meaning that the Emacs UI blocks while CMD is running. Make sure
|
||||
that CMD returns immediately. Blocking the UI for more than 0.1
|
||||
seconds should generally be considered a bug.
|
||||
|
||||
SLEEP is deprecated and no longer has any effect. WAIT,
|
||||
FORCE-REDISPLAY, and TIMEOUT are as in `ess-wait-for-process' and
|
||||
are passed to `ess-wait-for-process'. The default timeout is 1
|
||||
second. The process is interrupted with `interrupt-process' when
|
||||
the timeout is reached or when an error occurs.
|
||||
|
||||
PROC should be a process, if nil the process name is taken from
|
||||
`ess-local-process-name'. This command doesn't set 'last-eval
|
||||
@@ -1219,47 +1275,78 @@ wrapping the code into:
|
||||
;; Set `inhibit-quit' to t to avoid dumping R output to the
|
||||
;; process buffer if `ess-command' gets interrupted for some
|
||||
;; reason. See bugs #794 and #842
|
||||
(inhibit-quit t))
|
||||
(inhibit-quit t)
|
||||
(sentinel (inferior-ess--output-sentinel))
|
||||
(timeout (or timeout 1)))
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(let ((primary-prompt inferior-ess-primary-prompt)
|
||||
(let ((proc-alist (ess--alist (ess-local-process-name
|
||||
inferior-ess-primary-prompt)))
|
||||
(oldpb (process-buffer proc))
|
||||
(oldpf (process-filter proc))
|
||||
(oldpm (marker-position (process-mark proc))))
|
||||
(oldpm (marker-position (process-mark proc)))
|
||||
(use-sentinel (alist-get 'use-sentinel ess-format-command-alist))
|
||||
(rich-cmd (if-let ((cmd-fun (alist-get 'fun ess-format-command-alist)))
|
||||
(funcall cmd-fun
|
||||
(ess--strip-final-newlines cmd)
|
||||
(cons 'output-sentinel sentinel))
|
||||
cmd))
|
||||
(early-exit t))
|
||||
(ess-if-verbose-write (format "(ess-command %s ..)" cmd))
|
||||
;; Swap the process buffer with the output buffer before
|
||||
;; sending the command
|
||||
(unwind-protect
|
||||
(progn
|
||||
(when use-sentinel
|
||||
(process-put proc 'ess-output-sentinel sentinel))
|
||||
(set-process-buffer proc out-buffer)
|
||||
(set-process-filter proc 'inferior-ess-ordinary-filter)
|
||||
(with-current-buffer out-buffer
|
||||
(setq inferior-ess-primary-prompt primary-prompt)
|
||||
(ess-setq-vars-local proc-alist)
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(set-marker (process-mark proc) (point-min))
|
||||
(inferior-ess-mark-as-busy proc)
|
||||
(process-send-string proc cmd)
|
||||
(process-send-string proc rich-cmd)
|
||||
;; Need time for ess-create-object-name-db on PC
|
||||
(if no-prompt-check
|
||||
(sleep-for 0.02) ; 0.1 is noticeable!
|
||||
(ess-wait-for-process proc nil wait force-redisplay)
|
||||
;; Should (almost) never be incomplete unless the message
|
||||
;; contains "> " and was accidentally split by the process
|
||||
;; right there.
|
||||
(while (eq :incomplete (ess-mpi-handle-messages (current-buffer)))
|
||||
(ess-wait-for-process proc nil wait force-redisplay))
|
||||
;; Remove prompt
|
||||
;; If output is cat(..)ed this deletes the output
|
||||
(unless (ess-wait-for-process proc nil wait force-redisplay timeout)
|
||||
(error "Timeout during background ESS command '%s'"
|
||||
(ess--strip-final-newlines cmd)))
|
||||
;; Remove prompt. If output is cat(..)ed without a
|
||||
;; final newline, this deletes the last line of output.
|
||||
(goto-char (point-max))
|
||||
(delete-region (point-at-bol) (point-max)))
|
||||
(ess-if-verbose-write " .. ok{ess-command}")))
|
||||
(ess-if-verbose-write " .. exiting{ess-command}\n")
|
||||
(delete-region (point-at-bol) (point-max))))
|
||||
(setq early-exit nil))
|
||||
;; Restore the process buffer in its previous state
|
||||
(when early-exit
|
||||
(with-current-buffer out-buffer
|
||||
(goto-char (point-min))
|
||||
(when (and use-sentinel
|
||||
(not (re-search-forward
|
||||
(inferior-ess--sentinel-start-re sentinel)
|
||||
nil t)))
|
||||
;; CMD probably failed to parse if the start sentinel
|
||||
;; can't be found in the output. Disable the sentinel
|
||||
;; before interrupt to avoid a freeze.
|
||||
(process-put proc 'ess-output-sentinel nil))
|
||||
(goto-char (point-max))
|
||||
(ess-interrupt)))
|
||||
(process-put proc 'ess-output-sentinel nil)
|
||||
(set-process-buffer proc oldpb)
|
||||
(set-process-filter proc oldpf)
|
||||
(set-marker (process-mark proc) oldpm))))
|
||||
out-buffer))
|
||||
|
||||
;; TODO: Needs some Julia tests as well
|
||||
(defun ess--foreground-command (cmd &optional out-buffer _sleep no-prompt-check wait proc)
|
||||
"Same as `ess-command' but does not timeout.
|
||||
Currently blocks the Emacs UI. Eventually it would make sense to
|
||||
lock the inferior to prevent interactions and use
|
||||
`ess-async-command' with a callback."
|
||||
(let ((timeout most-positive-fixnum))
|
||||
(ess-command cmd out-buffer nil no-prompt-check wait proc nil timeout)))
|
||||
|
||||
(defun ess-boolean-command (com &optional buf wait)
|
||||
"Like `ess-command' but expects COM to print TRUE or FALSE.
|
||||
If TRUE (or true) is found return non-nil otherwise nil.
|
||||
@@ -1357,40 +1444,38 @@ similar to `load-library' Emacs function."
|
||||
|
||||
;;*;; Evaluating lines, paragraphs, regions, and buffers.
|
||||
|
||||
(defun ess-eval-linewise
|
||||
(text &optional invisibly eob even-empty wait-last-prompt sleep-sec wait-sec)
|
||||
(defun ess-eval-linewise (text &optional invisibly eob even-empty
|
||||
wait-last-prompt sleep-sec wait-sec)
|
||||
"Evaluate TEXT in the ESS process buffer as if typed in w/o tabs.
|
||||
Waits for prompt after each line of input, so won't break on large texts.
|
||||
|
||||
If optional second arg INVISIBLY is non-nil, don't echo commands.
|
||||
If it is a string, just include that string. If optional third
|
||||
arg EOB is non-nil go to end of ESS process buffer after
|
||||
evaluation. If optional 4th arg EVEN-EMPTY is non-nil, also send
|
||||
empty text (e.g. an empty line). If 5th arg WAIT-LAST-PROMPT is
|
||||
arg EOB is non-nil, display ESS process buffer after evaluation.
|
||||
If optional 4th arg EVEN-EMPTY is non-nil, also send empty
|
||||
text (e.g. an empty line). If 5th arg WAIT-LAST-PROMPT is
|
||||
non-nil, also wait for the prompt after the last line; if 6th arg
|
||||
SLEEP-SEC is a number, ESS will call '(\\[sleep-for] SLEEP-SEC)
|
||||
at the end of this function. If the 7th arg WAIT-SEC is set, it
|
||||
at the end of this function. If the 7th arg WAIT-SEC is set, it
|
||||
will be used instead of the default .001s and be passed to
|
||||
\\[ess-wait-for-process].
|
||||
|
||||
Run `comint-input-filter-functions' and
|
||||
`ess-presend-filter-functions' of the associated PROCESS on the
|
||||
TEXT."
|
||||
(unless (numberp wait-sec)
|
||||
(setq wait-sec 0.001))
|
||||
(ess-force-buffer-current "Process to use: ")
|
||||
;; Use this to evaluate some code, but don't wait for output.
|
||||
(let* ((deactivate-mark) ; keep local {do *not* deactivate wrongly}
|
||||
(sprocess (ess-get-process ess-current-process-name))
|
||||
(sbuffer (process-buffer sprocess))
|
||||
(win (get-buffer-window sbuffer t)))
|
||||
(inf-proc (ess-get-process ess-current-process-name))
|
||||
(inf-buf (process-buffer inf-proc))
|
||||
(win (get-buffer-window inf-buf t)))
|
||||
(setq text (ess--concat-new-line-maybe
|
||||
(ess--run-presend-hooks sprocess text)))
|
||||
(with-current-buffer sbuffer
|
||||
(ess--run-presend-hooks inf-proc text)))
|
||||
(with-current-buffer inf-buf
|
||||
(setq text (propertize text 'field 'input 'front-sticky t))
|
||||
(goto-char (marker-position (process-mark sprocess)))
|
||||
(if (stringp invisibly)
|
||||
(insert-before-markers (concat "*** " invisibly " ***\n")))
|
||||
(goto-char (marker-position (process-mark inf-proc)))
|
||||
(when (stringp invisibly)
|
||||
(insert-before-markers (concat "*** " invisibly " ***\n")))
|
||||
;; dbg:
|
||||
;; dbg (ess-write-to-dribble-buffer
|
||||
;; dbg (format "(eval-visibly 2): text[%d]= '%s'\n" (length text) text))
|
||||
@@ -1401,26 +1486,30 @@ TEXT."
|
||||
"\n"
|
||||
(concat (substring text 0 pos) "\n"))))
|
||||
(setq text (substring text (min (length text) (1+ pos))))
|
||||
(goto-char (marker-position (process-mark sprocess)))
|
||||
(if win (set-window-point win (process-mark sprocess)))
|
||||
(goto-char (marker-position (process-mark inf-proc)))
|
||||
(when win
|
||||
(set-window-point win (process-mark inf-proc)))
|
||||
(unless invisibly
|
||||
;; for consistency with comint :(
|
||||
(insert (propertize input 'font-lock-face 'comint-highlight-input))
|
||||
(set-marker (process-mark sprocess) (point)))
|
||||
(inferior-ess-mark-as-busy sprocess)
|
||||
(process-send-string sprocess input))
|
||||
(set-marker (process-mark inf-proc) (point)))
|
||||
(inferior-ess-mark-as-busy inf-proc)
|
||||
(process-send-string inf-proc input))
|
||||
(when (or (> (length text) 0)
|
||||
wait-last-prompt)
|
||||
(ess-wait-for-process sprocess t wait-sec)))
|
||||
(if eob (with-temp-buffer (buffer-name sbuffer)))
|
||||
(goto-char (marker-position (process-mark sprocess)))
|
||||
(ess-wait-for-process inf-proc t (or wait-sec 0.001))))
|
||||
(when eob
|
||||
(display-buffer inf-buf))
|
||||
;; This used to be conditioned on EOB but this is no longer the
|
||||
;; case since commit fd90550d in 2012 (probably an accident)
|
||||
(goto-char (marker-position (process-mark inf-proc)))
|
||||
(when win
|
||||
(with-selected-window win
|
||||
(goto-char (point))
|
||||
;; this is crucial to avoid resetting window-point
|
||||
(recenter (- -1 scroll-margin))))))
|
||||
(if (numberp sleep-sec)
|
||||
(sleep-for sleep-sec)))
|
||||
(when (numberp sleep-sec)
|
||||
(sleep-for sleep-sec)))
|
||||
|
||||
|
||||
;;;*;;; Evaluate only
|
||||
@@ -2173,18 +2262,18 @@ method, see `ess-quit--override'."
|
||||
This sends an interrupt and quits a debugging session."
|
||||
(interactive)
|
||||
(inferior-ess-force)
|
||||
(let ((proc (ess-get-process)))
|
||||
(let ((proc (ess-get-process))
|
||||
(timeout 1))
|
||||
;; Interrupt current task before reloading. Useful if the process is
|
||||
;; prompting for input, for instance in R in case of a crash
|
||||
(interrupt-process proc comint-ptyp)
|
||||
;; Workaround for Windows terminals
|
||||
(unless (memq system-type '(gnu/linux darwin))
|
||||
(process-send-string nil "\n"))
|
||||
(ess-wait-for-process proc)
|
||||
;; Quit debugging session before reloading
|
||||
(when (ess-debug-active-p)
|
||||
(ess-debug-command-quit)
|
||||
(ess-wait-for-process proc))))
|
||||
(unless (ess-wait-for-process proc nil nil nil timeout)
|
||||
(error "Timeout while interrupting process"))
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(goto-char (process-mark proc)))))
|
||||
|
||||
(defun ess-abort ()
|
||||
"Kill the ESS process, without executing .Last or terminating devices.
|
||||
@@ -2240,12 +2329,16 @@ START-ARGS gets passed to the dialect-specific
|
||||
(start-args (or start-args (cdr inf-start-data))))
|
||||
;; Interrupt early so we can get working directory
|
||||
(ess-interrupt)
|
||||
;; Quit debugging session before reloading
|
||||
(when (ess-debug-active-p)
|
||||
(ess-debug-command-quit)
|
||||
(ess-wait-for-process inf-proc nil nil nil 1))
|
||||
(save-window-excursion
|
||||
;; Make sure we don't ask for directory again
|
||||
;; Use current working directory as default
|
||||
(let ((project-find-functions nil)
|
||||
(ess-directory-function nil)
|
||||
(ess-startup-directory (ess-get-working-directory))
|
||||
(ess-startup-directory (ess-get-process-variable 'default-directory))
|
||||
(ess-ask-for-ess-directory nil))
|
||||
(ess-quit 'no-save)
|
||||
(inferior-ess--wait-for-exit inf-proc)
|
||||
@@ -2342,11 +2435,13 @@ non-nil, don't return objects in first positon (.GlobalEnv)."
|
||||
(setq i (1+ i)))
|
||||
(setq ess-object-list (delete-dups result))))))
|
||||
|
||||
(defun ess-get-words-from-vector (command &optional no-prompt-check wait proc)
|
||||
(defun ess-get-words-from-vector (command &optional no-prompt-check wait proc
|
||||
timeout)
|
||||
"Evaluate the S command COMMAND, which returns a character vector.
|
||||
Return the elements of the result of COMMAND as an alist of
|
||||
strings. COMMAND should have a terminating newline.
|
||||
NO-PROMPT-CHECK, WAIT, and PROC are passed to `ess-command'.
|
||||
NO-PROMPT-CHECK, WAIT, PROC, and TIMEOUT are passed to `ess-command'.
|
||||
|
||||
FILTER may be the keyword 'non-... or nil. To avoid truncation of
|
||||
long vectors, wrap your command (%s) like this, or a version with
|
||||
explicit options(max.print=1e6): \"local({ out <- try({%s});
|
||||
@@ -2365,7 +2460,7 @@ print(out, max=1e6) })\n\"."
|
||||
"\\( \\|$\\)"; space or end
|
||||
))
|
||||
words)
|
||||
(ess-command command tbuffer 'sleep no-prompt-check wait proc)
|
||||
(ess-command command tbuffer 'sleep no-prompt-check wait proc nil timeout)
|
||||
(with-current-buffer tbuffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward full-word-regexp nil t)
|
||||
@@ -2377,6 +2472,10 @@ print(out, max=1e6) })\n\"."
|
||||
(format " |-> words= '%s'\n" words)))
|
||||
(reverse words)))
|
||||
|
||||
(defun ess-get-words-from-vector--foreground (command &optional no-prompt-check wait proc)
|
||||
(let ((timeout most-positive-fixnum))
|
||||
(ess-get-words-from-vector command no-prompt-check wait proc timeout)))
|
||||
|
||||
(defun ess-compiled-dir (dir)
|
||||
"Return non-nil if DIR is an S object directory with special files.
|
||||
I.e. if the filenames in DIR are not representative of the objects in DIR."
|
||||
@@ -2800,8 +2899,9 @@ To be used in `ess-idle-timer-functions'."
|
||||
(inferior-ess-available-p))
|
||||
(ess-when-new-input last-sync-dirs
|
||||
(ess-if-verbose-write "\n(ess-synchronize-dirs)\n")
|
||||
(setq default-directory
|
||||
(car (ess-get-words-from-vector ess-getwd-command)))
|
||||
(let ((lpath (car (ess-get-words-from-vector ess-getwd-command))))
|
||||
(setq default-directory
|
||||
(ess--derive-connection-path default-directory lpath)))
|
||||
default-directory)))
|
||||
|
||||
(defun ess-dirs ()
|
||||
@@ -2810,9 +2910,19 @@ To be used in `ess-idle-timer-functions'."
|
||||
;; default-directory and subprocess working directory are
|
||||
;; synchronized automatically.
|
||||
(interactive)
|
||||
(let ((dir (car (ess-get-words-from-vector "getwd()\n"))))
|
||||
(let* ((dir (car (ess-get-words-from-vector "getwd()\n")))
|
||||
(new-default-dir (ess--derive-connection-path default-directory dir)))
|
||||
(message "(ESS / default) directory: %s" dir)
|
||||
(setq default-directory (file-name-as-directory dir))))
|
||||
(setq default-directory (file-name-as-directory new-default-dir))))
|
||||
|
||||
(defun ess--derive-connection-path (old new)
|
||||
"Derive a (possibly remote) path with an updated local filename.
|
||||
A new connection path is derived from OLD (a path) and NEW (a
|
||||
path), in such a way that the host and connection information (if
|
||||
any) in OLD is retained in the NEW path. NEW must be an absolute
|
||||
path, and can be a remote path"
|
||||
(concat (file-remote-p old)
|
||||
(or (file-remote-p new 'localname) new)))
|
||||
|
||||
;; search path
|
||||
(defun ess--mark-search-list-as-changed ()
|
||||
|
||||
@@ -68,7 +68,7 @@ VISIBLY is not currently used."
|
||||
|
||||
;;; HELP
|
||||
(cl-defmethod ess-help-get-topics (proc &context (ess-dialect "julia"))
|
||||
(append (with-current-buffer (ess-command "ESS.all_help_topics()\n")
|
||||
(append (with-current-buffer (ess--foreground-command "ESS.all_help_topics()\n")
|
||||
(split-string (buffer-string) "\n"))
|
||||
(ess-julia--get-objects proc)))
|
||||
|
||||
@@ -191,8 +191,8 @@ objects from that MODULE."
|
||||
(process-put proc 'last-objects-cache (current-time)))))))))
|
||||
|
||||
(defun ess-julia--get-components (proc obj &optional cache?)
|
||||
(with-current-buffer (ess-command (format "ESS.components(%s)\n" obj)
|
||||
nil nil nil nil proc)
|
||||
(with-current-buffer (ess--foreground-command (format "ESS.components(%s)\n" obj)
|
||||
nil nil nil nil proc)
|
||||
(goto-char (point-min))
|
||||
(let (list)
|
||||
(while (re-search-forward
|
||||
@@ -258,7 +258,7 @@ objects from that MODULE."
|
||||
|
||||
|
||||
;;; ELDOC
|
||||
(defun ess-julia-eldoc-function ()
|
||||
(defun ess-julia-eldoc-function (&rest _ignored)
|
||||
"Return the doc string, or nil.
|
||||
If an ESS process is not associated with the buffer, do not try
|
||||
to look up any doc strings. Honors `eldoc-echo-area-use-multiline-p'."
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
(require 'ess-inf)
|
||||
|
||||
;; Silence the byte compiler
|
||||
(declare-function run-ess-r "ess-r-mode" (&optional start-args))
|
||||
(declare-function R "ess-r-mode" (&optional start-args))
|
||||
(declare-function S+ "ess-sp6-d" (&optional proc-name))
|
||||
(declare-function SAS "ess-sas-d" ())
|
||||
|
||||
@@ -665,7 +665,7 @@ Function defined using `ess-define-runner'."
|
||||
(cond ((string= dialect "R")
|
||||
(let ((inferior-ess-r-program (or path name)))
|
||||
(require 'ess-r-mode)
|
||||
(run-ess-r start-args)))
|
||||
(R start-args)))
|
||||
((string= dialect "S")
|
||||
(let ((inferior-S+-program (or path name)))
|
||||
(require 'ess-sp6-d)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(define-package "ess" "20200623.1908" "Emacs Speaks Statistics"
|
||||
(define-package "ess" "20210106.1141" "Emacs Speaks Statistics"
|
||||
'((emacs "25.1"))
|
||||
:commit "ccc01edb7ad8db9cb43a45ac8ec023c80347c33d" :authors
|
||||
:commit "9cc5520e1998d03f5dec0fbb1fe71b7cdec38b65" :authors
|
||||
'(("David Smith" . "dsmith@stats.adelaide.edu.au")
|
||||
("A.J. Rossini" . "blindglobe@gmail.com")
|
||||
("Richard M. Heiberger" . "rmh@temple.edu")
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;; ElDoc
|
||||
|
||||
(require 'cl-lib)
|
||||
(require 'ess-inf)
|
||||
(require 'ess-help)
|
||||
@@ -49,7 +46,10 @@
|
||||
:group 'ess-R
|
||||
:type 'string)
|
||||
|
||||
(defun ess-r-eldoc-function ()
|
||||
|
||||
;;;*;;; ElDoc
|
||||
|
||||
(defun ess-r-eldoc-function (&rest _ignored)
|
||||
"Return the doc string, or nil.
|
||||
If an ESS process is not associated with the buffer, do not try
|
||||
to look up any doc strings."
|
||||
@@ -142,7 +142,7 @@ to look up any doc strings."
|
||||
(format "%s: %s" (propertize funname 'face 'font-lock-function-name-face) doc))))
|
||||
|
||||
|
||||
;;; OBJECTS
|
||||
;;;*;;; OBJECTS
|
||||
|
||||
(defun ess-r-object-completion ()
|
||||
"Return completions at point in a format required by `completion-at-point-functions'."
|
||||
@@ -297,7 +297,7 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
(mapcar 'cddr ess--cached-sp-objects)))))
|
||||
|
||||
|
||||
;;; ARGUMENTS
|
||||
;;;*;;; ARGUMENTS
|
||||
|
||||
(defvar ess-r--funargs-pre-cache
|
||||
'(("plot"
|
||||
@@ -321,7 +321,7 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
"Alist of cached arguments for time consuming functions.")
|
||||
|
||||
|
||||
;;; HELP
|
||||
;;;*;;; HELP
|
||||
|
||||
(defun ess-r-get-object-help-string (sym)
|
||||
"Help string for ac."
|
||||
@@ -353,8 +353,8 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
(buffer-substring-no-properties (point) (point-max)))))))
|
||||
|
||||
|
||||
;;; COMPANY
|
||||
;;; https://company-mode.github.io/
|
||||
;;;*;;; COMPANY
|
||||
;; https://company-mode.github.io
|
||||
|
||||
(defun company-R-objects (command &optional arg &rest ignored)
|
||||
(interactive (list 'interactive))
|
||||
@@ -388,14 +388,17 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0."
|
||||
(args (mapcar (lambda (a) (concat a ess-R-argument-suffix))
|
||||
args)))
|
||||
(all-completions arg args)))
|
||||
(meta (let ((proc (ess-get-next-available-process)))
|
||||
(when (and proc
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(not (file-remote-p default-directory))))
|
||||
;; fixme: ideally meta should be fetched with args
|
||||
(let ((doc (ess-r-get-arg-help-string arg proc)))
|
||||
(replace-regexp-in-string "^ +\\| +$" ""
|
||||
(replace-regexp-in-string "[ \t\n]+" " " doc))))))
|
||||
;; Displaying help for the argument in the echo area is disabled
|
||||
;; by default for performance reasons. It causes delays or hangs (#1062).
|
||||
(meta (when (bound-and-true-p ess-r--company-meta)
|
||||
(let ((proc (ess-get-next-available-process)))
|
||||
(when (and proc
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(not (file-remote-p default-directory))))
|
||||
;; fixme: ideally meta should be fetched with args
|
||||
(let ((doc (ess-r-get-arg-help-string arg proc)))
|
||||
(replace-regexp-in-string "^ +\\| +$" ""
|
||||
(replace-regexp-in-string "[ \t\n]+" " " doc)))))))
|
||||
(sorted t)
|
||||
(require-match 'never)
|
||||
(doc-buffer (company-doc-buffer (ess-r-get-arg-help-string arg)))))
|
||||
@@ -427,8 +430,8 @@ Return format suitable for `completion-at-point-functions'."
|
||||
(lambda (_) " <pkg>"))))
|
||||
|
||||
|
||||
;;; AC SOURCES
|
||||
;;; http://cx4a.org/software/auto-complete/index.html
|
||||
;;;*;;; AC SOURCES
|
||||
;; http://cx4a.org/software/auto-complete/index.html
|
||||
;; auto-complete is de-facto unmaintained, users should switch to `company-mode'.
|
||||
|
||||
(defvar ac-source-R
|
||||
|
||||
@@ -103,8 +103,8 @@ the user's home directory. Return nil if we couldn't find a .lintr file."
|
||||
(ess-r-package-project)
|
||||
(expand-file-name ".lintr" (cdr (ess-r-package-project)))))
|
||||
(proj-file (and (project-current)
|
||||
(project-roots (project-current))
|
||||
(expand-file-name ".lintr" (car (project-roots (project-current))))))
|
||||
(ess-project-root (project-current))
|
||||
(expand-file-name ".lintr" (ess-project-root (project-current)))))
|
||||
(home-file (expand-file-name ".lintr" (getenv "HOME"))))
|
||||
(cond (;; current directory
|
||||
(file-readable-p cur-dir-file)
|
||||
@@ -113,7 +113,7 @@ the user's home directory. Return nil if we couldn't find a .lintr file."
|
||||
((and ess-proj-file
|
||||
(file-readable-p ess-proj-file))
|
||||
ess-proj-file)
|
||||
;; Project root according to `project-roots'
|
||||
;; Project root according to `ess-project-root'
|
||||
((and proj-file
|
||||
(file-readable-p proj-file)))
|
||||
;; Home directory
|
||||
|
||||
@@ -383,6 +383,7 @@ To be used as part of `font-lock-defaults' keywords."
|
||||
'((ess-local-customize-alist . 'ess-r-customize-alist)
|
||||
(ess-dialect . "R")
|
||||
(ess-suffix . "R")
|
||||
(ess-format-command-alist . ess-r-format-command-alist)
|
||||
(ess-traceback-command . ess-r-traceback-command)
|
||||
(ess-call-stack-command . ess-r-call-stack-command)
|
||||
(ess-mode-completion-syntax-table . ess-r-completion-syntax-table)
|
||||
@@ -418,6 +419,14 @@ fill=TRUE); try(traceback(), silent=TRUE)})\n")
|
||||
|
||||
(defvar ess-r-call-stack-command "traceback(1)\n")
|
||||
|
||||
(defun ess-r-format-command (cmd &rest args)
|
||||
(let ((sentinel (alist-get 'output-sentinel args)))
|
||||
(format ".ess.command(%s, '%s')\n" cmd sentinel)))
|
||||
|
||||
(defvar ess-r-format-command-alist
|
||||
'((fun . ess-r-format-command)
|
||||
(use-sentinel . t)))
|
||||
|
||||
(defvar ess-r-dump-filename-template
|
||||
(replace-regexp-in-string
|
||||
"S$" "R" ess-dump-filename-template-proto))
|
||||
@@ -540,11 +549,13 @@ will be prompted to enter arguments interactively."
|
||||
(ess-write-to-dribble-buffer
|
||||
(format "(R): inferior-ess-language-start=%s\n"
|
||||
inferior-ess-language-start)))
|
||||
;; FIXME: Current ob-R expects current buffer set to process buffer
|
||||
(set-buffer inf-buf))))
|
||||
inf-buf)))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'R #'run-ess-r)
|
||||
(defun R (&optional start-args)
|
||||
(interactive "P")
|
||||
;; FIXME: Current ob-R expects current buffer set to process buffer
|
||||
(set-buffer (run-ess-r start-args)))
|
||||
|
||||
(defun inferior-ess-r--adjust-startup-directory (dir dialect)
|
||||
"Adjust startup directory DIR if DIALECT is R.
|
||||
@@ -564,14 +575,25 @@ the package directory was selected in the first place."
|
||||
(defun inferior-ess-r--init-callback (_proc _name)
|
||||
(R-initialize-on-start))
|
||||
|
||||
(defmacro ess-r--without-format-command (&rest body)
|
||||
(declare (indent 0)
|
||||
(debug (&rest form)))
|
||||
`(with-current-buffer (process-buffer (ess-command--get-proc nil nil))
|
||||
(let ((old-alist ess-format-command-alist))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(setq ess-format-command-alist nil)
|
||||
,@body)
|
||||
(setq ess-format-command-alist old-alist)))))
|
||||
|
||||
(defun R-initialize-on-start ()
|
||||
"This function is run after the first R prompt.
|
||||
Executed in process buffer."
|
||||
(ess-command (format
|
||||
"if(identical(getOption('pager'),
|
||||
file.path(R.home(), 'bin', 'pager')))
|
||||
options(pager='%s')\n"
|
||||
inferior-ess-pager))
|
||||
(ess-r--without-format-command
|
||||
(ess-command (format
|
||||
"if (identical(getOption('pager'), file.path(R.home(), 'bin', 'pager')))
|
||||
options(pager = '%s')\n"
|
||||
inferior-ess-pager)))
|
||||
(ess-r-load-ESSR)
|
||||
(when inferior-ess-language-start
|
||||
(ess-command (concat inferior-ess-language-start "\n")))
|
||||
@@ -879,7 +901,10 @@ prompt for command line arguments."
|
||||
(let ((inferior-ess-r-program ess-newest-R))
|
||||
(run-ess-r start-args)))
|
||||
|
||||
(defalias 'R-newest 'run-ess-r-newest)
|
||||
(defun R-newest (&optional start-args)
|
||||
(interactive "P")
|
||||
;; FIXME: Current ob-R expects current buffer set to process buffer
|
||||
(set-buffer (run-ess-r-newest start-args)))
|
||||
|
||||
;; (ess-r-version-date "R-2.5.1") (ess-r-version-date "R-patched")
|
||||
;; (ess-r-version-date "R-1.2.1") (ess-r-version-date "R-1.8.1")
|
||||
@@ -1039,7 +1064,7 @@ With argument UPDATE, update cached packages list."
|
||||
(not ess--packages-cache))
|
||||
(message "Fetching R packages ... ")
|
||||
(setq ess--packages-cache
|
||||
(ess-get-words-from-vector "print(rownames(available.packages()), max=1e6)\n")))
|
||||
(ess-get-words-from-vector--foreground "print(rownames(available.packages()), max=1e6)\n")))
|
||||
(let* ((ess-eval-visibly-p t)
|
||||
(package (or package
|
||||
(ess-completing-read "Package to install" ess--packages-cache))))
|
||||
@@ -1092,7 +1117,7 @@ Placed into `ess-presend-filter-functions' for R dialects."
|
||||
|
||||
(cl-defmethod ess-installed-packages (&context (ess-dialect "R"))
|
||||
;;; FIXME? .packages() does not cache; installed.packages() does but is slower first time
|
||||
(ess-get-words-from-vector "print(.packages(T), max=1e6)\n"))
|
||||
(ess-get-words-from-vector--foreground "print(.packages(T), max=1e6)\n"))
|
||||
|
||||
(cl-defmethod ess-load-library--override (pack &context (ess-dialect "R"))
|
||||
"Load an R package."
|
||||
@@ -1159,9 +1184,7 @@ variable.")
|
||||
|
||||
(defun ess-r-get-evaluation-env ()
|
||||
"Get current evaluation env."
|
||||
(or ess-r-evaluation-env
|
||||
(and ess-current-process-name
|
||||
(ess-get-process-variable 'ess-r-evaluation-env))))
|
||||
ess-r-evaluation-env)
|
||||
|
||||
(defun ess-r-set-evaluation-env (&optional arg)
|
||||
"Select a package namespace for evaluation of R code.
|
||||
@@ -1179,7 +1202,6 @@ attached packages."
|
||||
(t "*none*"))))
|
||||
(if (equal env "*none*")
|
||||
(let ((cur-env (ess-r-get-evaluation-env)))
|
||||
;; fixme: does not work if env is set at process level
|
||||
(setq ess-r-evaluation-env nil)
|
||||
(delq 'ess-r--evaluation-env-mode-line ess--local-mode-line-process-indicator)
|
||||
(message (format "Evaluation in %s disabled" (propertize cur-env 'face font-lock-function-name-face))))
|
||||
@@ -1269,7 +1291,7 @@ selected (see `ess-r-set-evaluation-env')."
|
||||
(command (format inferior-ess-r-help-command object)))
|
||||
(if pkg-dir
|
||||
;; Invoking `print.help_files_with_topic'
|
||||
(format "do.call(structure, c('%s', attributes(%s)))\n" pkg-dir command)
|
||||
(format "base::evalq(do.call(structure, c('%s', attributes(%s))), base::as.environment('ESSR'))\n" pkg-dir command)
|
||||
command))))
|
||||
|
||||
(cl-defmethod ess-build-help-command (object &context (ess-dialect "R"))
|
||||
@@ -1334,16 +1356,20 @@ selected (see `ess-r-set-evaluation-env')."
|
||||
|
||||
(defun ess-r-load-ESSR ()
|
||||
"Load ESSR functionality."
|
||||
(cond
|
||||
((file-remote-p (ess-get-process-variable 'default-directory))
|
||||
(if (eq ess-r-fetch-ESSR-on-remotes t)
|
||||
(ess-r--fetch-ESSR-remote)
|
||||
(ess-r--load-ESSR-remote)))
|
||||
((and (bound-and-true-p ess-remote))
|
||||
(if ess-r-fetch-ESSR-on-remotes
|
||||
(ess-r--fetch-ESSR-remote)
|
||||
(ess-r--load-ESSR-remote t)))
|
||||
(t (ess-r--load-ESSR-local))))
|
||||
;; `.ess.command()` is not defined until ESSR is loaded so disable
|
||||
;; it temporarily. Would be helpful to implement an `inferior-ess-let'
|
||||
;; macro .
|
||||
(ess-r--without-format-command
|
||||
(cond
|
||||
((file-remote-p (ess-get-process-variable 'default-directory))
|
||||
(if (eq ess-r-fetch-ESSR-on-remotes t)
|
||||
(ess-r--fetch-ESSR-remote)
|
||||
(ess-r--load-ESSR-remote)))
|
||||
((and (bound-and-true-p ess-remote))
|
||||
(if ess-r-fetch-ESSR-on-remotes
|
||||
(ess-r--fetch-ESSR-remote)
|
||||
(ess-r--load-ESSR-remote t)))
|
||||
(t (ess-r--load-ESSR-local)))))
|
||||
|
||||
(defun ess-r--load-ESSR-local ()
|
||||
(let* ((src-dir (expand-file-name "ESSR/R" ess-etc-directory))
|
||||
@@ -1352,7 +1378,7 @@ selected (see `ess-r-set-evaluation-env')."
|
||||
.ess.load.ESSR('%s')
|
||||
})\n"
|
||||
src-dir src-dir)))
|
||||
(with-current-buffer (ess-command cmd)
|
||||
(with-current-buffer (ess-command cmd nil nil nil nil nil nil 5)
|
||||
(let ((msg (buffer-string)))
|
||||
(when (> (length msg) 1)
|
||||
(message (format "Messages while loading ESSR: %s" msg)))))))
|
||||
@@ -2324,13 +2350,14 @@ If the current buffer does not have a usage section, return nil."
|
||||
(forward-line -1)
|
||||
(narrow-to-region usage-beg (point))
|
||||
(goto-char (point-min))
|
||||
;; Match objects until a parens
|
||||
(while (re-search-forward (rx bol (0+ whitespace) (not (syntax comment-delimiter))
|
||||
(group (1+ (not (any "(")))))
|
||||
usage-end t)
|
||||
(push (match-string-no-properties 1) usage-objects)
|
||||
;; Skip past function arguments
|
||||
(forward-list)))
|
||||
(forward-whitespace 1)
|
||||
(while (not (eobp))
|
||||
(if (looking-at (rx (group (1+ (not (any whitespace)))) "("))
|
||||
(progn
|
||||
(push (match-string-no-properties 1) usage-objects)
|
||||
;; Skip past function arguments
|
||||
(forward-list))
|
||||
(forward-whitespace 1))))
|
||||
(when usage-objects
|
||||
;; Get arguments:
|
||||
(setq usage-objects
|
||||
@@ -2457,7 +2484,11 @@ from all installed packages, which can be very slow."
|
||||
(define-key map "l" #'ess-r-package-list-local-packages)
|
||||
(define-key map "r" #'ess-r-package-list-available-packages)
|
||||
(define-key map "u" #'ess-r-package-update-packages)
|
||||
(define-key map "a" #'ess-display-help-apropos)
|
||||
(define-key map "m" #'ess-rutils-rm-all)
|
||||
(define-key map "o" #'ess-rdired)
|
||||
(define-key map "w" #'ess-rutils-load-workspace)
|
||||
(define-key map "s" #'ess-rutils-save-workspace)
|
||||
(define-key map "d" #'ess-change-directory)
|
||||
(define-key map "H" #'ess-rutils-html-docs)
|
||||
map))
|
||||
@@ -2641,15 +2672,17 @@ needed."
|
||||
(when (y-or-n-p "Delete all objects? ")
|
||||
(ess-execute "rm(list=ls())" 'buffer)))
|
||||
|
||||
(defun ess-rutils-load-wkspc (file)
|
||||
(defun ess-rutils-load-workspace (file)
|
||||
"Load workspace FILE into R."
|
||||
(interactive "fFile with workspace to load: ")
|
||||
(ess-execute (concat "load('" file "')") 'buffer))
|
||||
(define-obsolete-function-alias 'ess-rutils-load-wkspc #'ess-rutils-load-workspace "ESS 19.04")
|
||||
|
||||
(defun ess-rutils-save-wkspc (file)
|
||||
(defun ess-rutils-save-workspace (file)
|
||||
"Save FILE workspace as file.RData."
|
||||
(interactive "FSave workspace to file (no extension): ")
|
||||
(ess-execute (concat "save.image('" file ".RData')") 'buffer))
|
||||
(define-obsolete-function-alias 'ess-rutils-save-wkspc #'ess-rutils-save-workspace "ESS 19.04")
|
||||
|
||||
(defun ess-rutils-quit ()
|
||||
"Kill the ess-rutils buffer and return to the iESS buffer."
|
||||
|
||||
@@ -108,6 +108,10 @@ is searched from that directory instead of `default-directory'."
|
||||
"Return the project root for ESS R packages"
|
||||
(list (cdr project)))
|
||||
|
||||
(cl-defmethod project-root ((project (head ess-r-package)))
|
||||
"Return the project root for ESS R packages"
|
||||
(cdr project))
|
||||
|
||||
(defun ess-r-package-name (&optional dir)
|
||||
"Return the name of the current package as a string."
|
||||
(plist-get (ess-r-package-info dir) :name))
|
||||
@@ -122,9 +126,12 @@ efficiency reasons."
|
||||
(let* ((path (ess-r-package--find-package-path (or dir default-directory)))
|
||||
(name (when path
|
||||
(ess-r-package--find-package-name path)))
|
||||
(local (if (and path (file-remote-p path))
|
||||
(tramp-file-name-localname (tramp-dissect-file-name path))
|
||||
path))
|
||||
(info (if name
|
||||
(list :name name
|
||||
:root path)
|
||||
:root local)
|
||||
'(nil))))
|
||||
;; If DIR was supplied we cannot cache in the current buffer.
|
||||
(if dir
|
||||
@@ -169,8 +176,7 @@ return all physically present directories."
|
||||
"Get the root of R package in directory DIR.
|
||||
DIR defaults to the current buffer's file name (if non-nil) or
|
||||
`default-directory'. Root is determined by locating
|
||||
`ess-r-package-root-file'. If the path looks like a tramp file,
|
||||
remove the remote information."
|
||||
`ess-r-package-root-file'."
|
||||
(when-let ((path (cond
|
||||
(dir)
|
||||
((buffer-file-name)
|
||||
@@ -194,9 +200,7 @@ remove the remote information."
|
||||
(setq presumptive-path known-path)
|
||||
(setq path (ess--parent-dir path 1))))
|
||||
presumptive-path)))))
|
||||
(if (file-remote-p pkg-path)
|
||||
(tramp-file-name-localname (tramp-dissect-file-name pkg-path))
|
||||
(directory-file-name pkg-path))))
|
||||
(directory-file-name pkg-path)))
|
||||
|
||||
(defun ess-r-package--find-package-name (path)
|
||||
(let ((file (expand-file-name ess-r-package-root-file path))
|
||||
@@ -573,7 +577,7 @@ package mode. Use this function if state of the buffer such as
|
||||
(error "As of ESS 16.04, `ess-developer' is deprecated. Use `ess-r-set-evaluation-env' instead"))
|
||||
|
||||
(defalias 'ess-toggle-developer 'ess-developer)
|
||||
(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder)
|
||||
(define-obsolete-function-alias 'ess-r-devtools-check-package-buildwin 'ess-r-devtools-check-with-winbuilder "18.04")
|
||||
(define-obsolete-function-alias 'ess-r-devtools-ask 'ess-r-devtools-execute-command "18.04")
|
||||
|
||||
(make-obsolete-variable 'ess-developer "Please use `ess-developer-select-package' and `ess-r-set-evaluation-env' instead." "16.04")
|
||||
|
||||
@@ -67,7 +67,7 @@ srcrefs point to temporary locations."
|
||||
|
||||
(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql ess-r)))
|
||||
(inferior-ess-r-force)
|
||||
(ess-get-words-from-vector ".ess_all_functions()\n"))
|
||||
(ess-get-words-from-vector--foreground ".ess_all_functions()\n"))
|
||||
|
||||
(defun ess-r-xref--srcref (symbol)
|
||||
(inferior-ess-r-force)
|
||||
|
||||
@@ -129,16 +129,19 @@ All Rd mode abbrevs start with a grave accent (`)."
|
||||
;; "Alpha" "Gamma" "alpha" "beta" "epsilon" "lambda" "mu" "pi" "sigma"
|
||||
;; "ge" "le" "left" "right"
|
||||
;;
|
||||
"R" "RdOpts" "S3method" "S4method" "Sexpr" "acronym"
|
||||
"RdOpts" "R" "S3method" "S4method" "Sexpr" "acronym"
|
||||
"bold" "cite" "code" "command" "cr" "dQuote" "deqn" "dfn" "dontrun"
|
||||
"dontshow" "donttest" "dots" "email" "emph" "enc" "env" "eqn" "figure" "file"
|
||||
"href" "if" "ifelse"
|
||||
"href"
|
||||
"ifelse" "if"
|
||||
"item" "kbd" "ldots" "linkS4class" "link" "method"
|
||||
"newcommand" "option" "out"
|
||||
"pkg" "sQuote" "renewcommand"
|
||||
"samp" "strong" "tab" "url" "var" "verb"
|
||||
;; System macros (from <R>/share/Rd/macros/system.Rd ):
|
||||
"CRANpkg" "PR" "sspace" "doi"
|
||||
"LaTeX"
|
||||
"proglang"
|
||||
"packageTitle" "packageDescription" "packageAuthor"
|
||||
"packageMaintainer" "packageDESCRIPTION" "packageIndices"
|
||||
))
|
||||
|
||||
@@ -600,11 +600,11 @@ point. Place it in a buffer and return that buffer."
|
||||
(R-old-roxy
|
||||
(concat
|
||||
"..results <- roxygen2:::roc_process(rd_roclet(), parse.files(P), \"\");"
|
||||
"cat(vapply(..results, function(x) roxygen2:::rd_out_cache$compute(x, format(x)), character(1)))" ))
|
||||
"cat(vapply(..results, function(x) roxygen2:::rd_out_cache$compute(x, format(x)), character(1)), \"\\n\")" ))
|
||||
(R-new-roxy
|
||||
(concat
|
||||
"..results <- roc_proc_text(rd_roclet(), readChar(P, file.info(P)$size));"
|
||||
"cat(vapply(..results, format, character(1)), \"\n\")" ))
|
||||
"cat(vapply(..results, format, character(1)), \"\\n\")" ))
|
||||
(out-rd-roclet
|
||||
(cond ((string= "roxygen" ess-roxy-package)
|
||||
"make.Rd2.roclet()$parse")
|
||||
@@ -1024,6 +1024,17 @@ Only do this if in a roxygen block and
|
||||
(with-eval-after-load "cc-mode"
|
||||
(add-hook 'c++-mode-hook #'ess-roxy-enable-in-cpp))
|
||||
|
||||
(defun ess-roxy--region-p (beg end)
|
||||
(when ess-roxy-re
|
||||
(save-excursion
|
||||
(goto-char beg)
|
||||
(catch 'ess-r-not-roxy
|
||||
(while (< (point) end)
|
||||
(unless (looking-at-p ess-roxy-re)
|
||||
(throw 'ess-r-not-roxy nil))
|
||||
(forward-line))
|
||||
t))))
|
||||
|
||||
(provide 'ess-roxy)
|
||||
|
||||
;;; ess-roxy.el ends here
|
||||
|
||||
@@ -507,6 +507,10 @@ return it. Otherwise, return `ess-help-topics-list'."
|
||||
(t
|
||||
ess-help-topics-list))))
|
||||
|
||||
(cl-defmethod ess-help--reset-cache-override (&context (ess-dialect "R"))
|
||||
(ess-command ".ess.getHelpAliases(reset = TRUE)\n"
|
||||
nil nil nil nil nil nil ess-help--aliases-timeout))
|
||||
|
||||
(defalias 'S 'S+)
|
||||
(defalias 's-mode 'S+-mode)
|
||||
(defalias 's-transcript-mode 'S+-transcript-mode)
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
(declare-function ess-get-process "ess-inf")
|
||||
(declare-function ess-get-process-variable "ess-inf")
|
||||
(declare-function ess-get-words-from-vector "ess-inf")
|
||||
(declare-function ess-get-words-from-vector--foreground "ess-inf")
|
||||
(declare-function ess-process-get "ess-inf")
|
||||
(declare-function ess-process-live-p "ess-inf")
|
||||
(declare-function ess-process-put "ess-inf")
|
||||
@@ -88,6 +89,7 @@
|
||||
(declare-function ess-r-package--all-source-dirs "ess-r-package")
|
||||
(declare-function ess-r-package-name "ess-r-package")
|
||||
(declare-function ess-r-package-source-dirs "ess-r-package")
|
||||
(declare-function ess-roxy--region-p "ess-roxy")
|
||||
|
||||
;; Do not require tramp at runtime. It is expensive to load. Instead,
|
||||
;; guard calls with (require 'tramp) and silence the byte compiler
|
||||
@@ -319,20 +321,28 @@ command conforms to VISIBLY."
|
||||
(defun ess-process-buffer-substring (process start end)
|
||||
(ess--run-presend-hooks process (buffer-substring-no-properties start end)))
|
||||
|
||||
;; Declare globally so that the bytecode compiler let-binds it
|
||||
;; properly
|
||||
(defvar-local ess-r-evaluation-env nil)
|
||||
|
||||
(defun ess-tracebug-send-region (process start end &optional visibly message type)
|
||||
"Send region to process adding source references as specified
|
||||
by `ess-inject-source' variable."
|
||||
(ess-eval-region--normalise-region start end)
|
||||
(let* ((inject-p (cond ((eq type 'function)
|
||||
;; Disable evaluation env if we're sending a roxy region. This is
|
||||
;; not the ideal place to do this.
|
||||
(let* ((ess-r-evaluation-env (unless (ess-roxy--region-p start end)
|
||||
(ess-r-get-evaluation-env)))
|
||||
(inject-p (cond ((eq type 'function)
|
||||
ess-inject-source)
|
||||
((eq type 'buffer)
|
||||
(or (eq ess-inject-source t)
|
||||
(eq ess-inject-source 'function-and-buffer)))
|
||||
(t (or (eq ess-inject-source t)
|
||||
;; We need to always inject with namespaced
|
||||
;; evaluation (fixme: not right place for
|
||||
;; this).
|
||||
(ess-r-get-evaluation-env)))))
|
||||
((eq ess-inject-source t))
|
||||
;; We need to always inject with namespaced
|
||||
;; evaluation (FIXME: not right place for
|
||||
;; this).
|
||||
(ess-r-evaluation-env)))
|
||||
(ess--dbg-del-empty-p (unless inject-p ess--dbg-del-empty-p))
|
||||
(string (if inject-p
|
||||
(ess-make-source-refd-command start end visibly process)
|
||||
@@ -572,12 +582,13 @@ can use `ess--busy-slash', `ess--busy-B',`ess--busy-stars',
|
||||
(defcustom inferior-ess-replace-long+ t
|
||||
"Determines if ESS replaces long + sequences in output.
|
||||
If 'strip, remove all such instances. Otherwise, if non-nil, '+
|
||||
+ + + ' containing more than 4 + is replaced by
|
||||
`ess-long+replacement'."
|
||||
+ + + ' containing 3 or more + is replaced by
|
||||
`ess-long+replacement'.
|
||||
This variable can be process-local but not buffer-local."
|
||||
:group 'ess-tracebug
|
||||
:type '(choice (const nil :tag "No replacement")
|
||||
(const 'strip :tag "Replace all")
|
||||
(const t :tag "Replace 4 or more +")))
|
||||
(const t :tag "Replace 3 or more +")))
|
||||
|
||||
(defvar ess-long+replacement ". + "
|
||||
"Replacement used for long + prompt.
|
||||
@@ -1285,13 +1296,16 @@ ends with an incomplete message."
|
||||
(setq out :incomplete))))
|
||||
out)))
|
||||
|
||||
(defun ess--replace-long+-in-prompt (prompt is-final)
|
||||
(defun ess--replace-long+-in-prompt (proc prompt is-final)
|
||||
"Replace long + + + in PROMPT based on `inferior-ess-replace-long+' value.
|
||||
If IS-FINAL means that PROMPT occurs at the end of the process
|
||||
chunk. If non-nil, special care is taken not to drop last '+'
|
||||
value as it might be a continuation prompt."
|
||||
;; see #576 for interesting input examples
|
||||
(let ((len (length prompt)))
|
||||
(let ((len (length prompt))
|
||||
(inferior-ess-replace-long+ (buffer-local-value
|
||||
'inferior-ess-replace-long+
|
||||
(process-buffer proc))))
|
||||
(if (or (null inferior-ess-replace-long+)
|
||||
(< len 2))
|
||||
prompt
|
||||
@@ -1391,7 +1405,7 @@ prompts."
|
||||
(setq pos2 tpos)
|
||||
(setq prompt (let ((prompt (buffer-substring pos1 pos2)))
|
||||
(if do-clean
|
||||
(ess--replace-long+-in-prompt prompt (eq pos2 (point-max)))
|
||||
(ess--replace-long+-in-prompt proc prompt (eq pos2 (point-max)))
|
||||
prompt)))
|
||||
;; Cannot bypass this trivial call to comint-output-filter because
|
||||
;; external tools could rely on prompts (org-babel [#598] for
|
||||
@@ -2699,7 +2713,7 @@ for signature and trace it with browser tracer."
|
||||
(ess-force-buffer-current "Process to use: ")
|
||||
(let* ((tbuffer (get-buffer-create " *ess-command-output*")) ;; output buffer name is hard-coded in ess-inf.el
|
||||
(pkg (ess-r-package-name))
|
||||
(all-functions (ess-get-words-from-vector
|
||||
(all-functions (ess-get-words-from-vector--foreground
|
||||
(if pkg
|
||||
(format ".ess_all_functions(c('%s'))\n" pkg)
|
||||
".ess_all_functions()\n")))
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
(require 'cl-lib)
|
||||
(require 'comint)
|
||||
(require 'project)
|
||||
(eval-when-compile
|
||||
(require 'tramp))
|
||||
;; The only ESS file this file should depend on is ess-custom.el
|
||||
@@ -266,7 +267,7 @@ process to avoid excessive requests."
|
||||
out)))))
|
||||
|
||||
|
||||
;;; Emacs Integration
|
||||
;;*;; Emacs Integration
|
||||
|
||||
(defun ess-derived-mode-p ()
|
||||
"Non-nil if the current major mode is an ESS major mode."
|
||||
@@ -364,7 +365,7 @@ ess-[dialect]-font-lock-keywords variable."
|
||||
t])))
|
||||
|
||||
|
||||
;;; External modes
|
||||
;;*;; External modes
|
||||
|
||||
;; Define these here for the byte compiler since ido dynamically
|
||||
;; let-binds them:
|
||||
@@ -489,7 +490,7 @@ formats: one for directory and another for the output file."
|
||||
nil)
|
||||
|
||||
|
||||
;;; Emacs itself
|
||||
;;*;; Emacs itself
|
||||
|
||||
(defun ess-yank-cleaned-commands ()
|
||||
"Yank and strip the code, leaving only (R/S/Lsp/..) commands.
|
||||
@@ -569,7 +570,7 @@ GTags file (default TAGS): ")
|
||||
(message "Building tags .. ok!")))))
|
||||
|
||||
|
||||
;;; UI
|
||||
;;*;; UI
|
||||
|
||||
(defvar ess-current-region-overlay
|
||||
(let ((overlay (make-overlay (point) (point))))
|
||||
@@ -668,7 +669,7 @@ Copied almost verbatim from gnus-utils.el (but with test for mac added)."
|
||||
(define-obsolete-function-alias 'ess-do-auto-fill 'do-auto-fill "ESS 19.04")
|
||||
|
||||
|
||||
;;; Syntax
|
||||
;;*;; Syntax
|
||||
|
||||
(defun ess-containing-sexp-position ()
|
||||
"Return the `cadr' of `syntax-ppss'."
|
||||
@@ -848,7 +849,7 @@ also return t if inside curly brackets."
|
||||
r)))
|
||||
|
||||
|
||||
;;; String manipulation
|
||||
;;*;; String manipulation
|
||||
|
||||
(defun ess-quote-special-chars (string)
|
||||
"Quote special characters in STRING."
|
||||
@@ -994,8 +995,11 @@ nil and not t, query for each instance."
|
||||
;; always return nil, in case this is on write-file-hooks.
|
||||
nil))
|
||||
|
||||
(defun ess--strip-final-newlines (string)
|
||||
(replace-regexp-in-string "\n+" "" string))
|
||||
|
||||
|
||||
;;; Debugging tools
|
||||
;;*;; Debugging tools
|
||||
|
||||
(defun ess-write-to-dribble-buffer (text)
|
||||
"Write TEXT to `ess-dribble-buffer'."
|
||||
@@ -1028,12 +1032,28 @@ nil and not t, query for each instance."
|
||||
(put (car pair) 'permanent-local t))) ;; hack for Rnw
|
||||
alist))
|
||||
|
||||
(defmacro ess--alist (vars)
|
||||
"Build a self-named alist from VARS.
|
||||
VARS must be a list of symbols."
|
||||
(declare (debug 0))
|
||||
`(list ,@(mapcar (lambda (var) `(cons ',var ,var)) vars)))
|
||||
|
||||
(defvar ess-error-regexp "^\\(Syntax error: .*\\) at line \\([0-9]*\\), file \\(.*\\)$"
|
||||
"Regexp to search for errors.")
|
||||
|
||||
(define-obsolete-function-alias 'ess-beginning-of-function 'beginning-of-defun "ESS 19.04")
|
||||
(define-obsolete-function-alias 'ess-end-of-function 'end-of-defun "ESS 19.04")
|
||||
|
||||
(with-no-warnings
|
||||
(defalias 'ess-project-root
|
||||
;; TODO: Remove once we drop support for Emacs 27
|
||||
(if (and (fboundp 'project-root)
|
||||
;; Issues caused unless we confirm `project-roots' is obsolete, see bug#1052
|
||||
(get 'project-roots 'byte-obsolete-info))
|
||||
'project-root
|
||||
(lambda (project) "See `project-roots'."
|
||||
(car (project-roots project))))))
|
||||
|
||||
(provide 'ess-utils)
|
||||
|
||||
;;; ess-utils.el ends here
|
||||
|
||||
5032
lisp/ess/ess.info
5032
lisp/ess/ess.info
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/Rscript
|
||||
#!/usr/bin/env Rscript
|
||||
## -*- mode: R -*-
|
||||
## code to build ESSR environemnt.
|
||||
## Assume that current directory is etc/ESSR
|
||||
|
||||
@@ -44,18 +44,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
.ess.getHelpAliases <- function(){
|
||||
readrds <-
|
||||
if(.ess.Rversion >= '2.13.0') readRDS
|
||||
else .readRDS
|
||||
rds.files <- paste(searchpaths(), "/help/aliases.rds", sep = "")
|
||||
unlist(lapply(rds.files,
|
||||
function(f){
|
||||
if( file.exists(f) )
|
||||
try(names(readrds(f)))
|
||||
}),
|
||||
use.names = FALSE)
|
||||
}
|
||||
.ess.getHelpAliases <- local({
|
||||
readrds <- if (.ess.Rversion >= '2.13.0') readRDS else .readRDS
|
||||
aliasesCache <- new.env()
|
||||
|
||||
getAliases <- function(file) {
|
||||
cached <- aliasesCache[[file]]
|
||||
if (!is.null(cached))
|
||||
return(cached)
|
||||
|
||||
aliases <- tryCatch(
|
||||
error = function(...) NULL,
|
||||
if (file.exists(file))
|
||||
names(readrds(file))
|
||||
else
|
||||
NULL
|
||||
)
|
||||
|
||||
aliasesCache[[file]] <- aliases
|
||||
aliases
|
||||
}
|
||||
|
||||
function(reset = FALSE) {
|
||||
if (reset)
|
||||
aliasesCache <<- new.env()
|
||||
|
||||
rdsFiles <- paste(searchpaths(), "/help/aliases.rds", sep = "")
|
||||
unlist(lapply(rdsFiles, getAliases), use.names = FALSE)
|
||||
}
|
||||
})
|
||||
|
||||
### SOURCING
|
||||
.ess.eval <- function(string, visibly = TRUE, output = FALSE,
|
||||
@@ -132,3 +149,45 @@ if(.ess.Rversion < "1.8")
|
||||
|
||||
unquote(substitute(expr))
|
||||
}
|
||||
|
||||
.ess.command <- function(expr, sentinel) {
|
||||
## It is possible that the REPL is marked as non-busy when the
|
||||
## output is sinked because prompts are not sinked. In that case,
|
||||
## redirect the sinked output temporarily to ESS.
|
||||
sinked <- sink.number() != 0
|
||||
if (sinked)
|
||||
sink(.ess.stdout)
|
||||
|
||||
on.exit({
|
||||
writeLines(paste0(sentinel, "-END"))
|
||||
if (sinked)
|
||||
sink(NULL)
|
||||
})
|
||||
|
||||
writeLines(paste0(sentinel, "-START"))
|
||||
|
||||
## Don't interrupt `browser()` sessions (#1081)
|
||||
restart <- function(...) {
|
||||
if (!is.null(findRestart("browser")))
|
||||
invokeRestart("browser")
|
||||
}
|
||||
|
||||
out <- withCallingHandlers(
|
||||
interrupt = restart,
|
||||
withVisible(expr)
|
||||
)
|
||||
|
||||
## Print result manually because we can't rely on auto-print
|
||||
## without changing the last value
|
||||
if (out$visible)
|
||||
print(out$value)
|
||||
|
||||
## Keep `.Last.value` stable
|
||||
invisible(.Last.value)
|
||||
}
|
||||
|
||||
## stdout() always returns the current file where output is sinked to.
|
||||
## If there is any sink, it returns that file rather than connection 1.
|
||||
## Since we can't get the default stdout connection when a sink is
|
||||
## active we save it here.
|
||||
.ess.stdout <- stdout()
|
||||
|
||||
@@ -2,6 +2,55 @@ This is news.info, produced by makeinfo version 6.5 from news.texi.
|
||||
|
||||
Changes and New Features in 19.04 (unreleased):
|
||||
|
||||
* ESS[R]: 'ess-get-help-aliases-list' now caches the aliases on the R
|
||||
side. This should speed up help lookup when the search path has
|
||||
changed and the aliases are read again.
|
||||
|
||||
* ESS: 'ess-command' now uses a default timeout of 1 second. It
|
||||
should normally be used for instantaneous background tasks since it
|
||||
is synchronous and causes Emacs to block while the command is
|
||||
running. If the timeout is reached, an error is thrown to avoid
|
||||
hanging Emacs. An interrupt is sent to the process in case of
|
||||
early exit.
|
||||
|
||||
This is a behaviour change: you will now have to explicitly opt in
|
||||
blocking the whole Emacs UI for more than 2 seconds by supplying a
|
||||
larger timeout (use 'most-positive-fixnum' for infinity).
|
||||
|
||||
* ESS: 'ess-wait-for-process' now returns nil if a timeout is
|
||||
reached.
|
||||
|
||||
* ESS: 'ess-get-words-from-vector' gains a 'timeout' argument.
|
||||
|
||||
* ESS[R]: Fixed performance issue with argument completions. The
|
||||
help summary for the argument is no longer displayed in the echo
|
||||
area. This fixes delays and hangs (#1062).
|
||||
|
||||
* ESS[R]: 'ess-command' is now more robust and resilient to hangs and
|
||||
custom prompts (#1043).
|
||||
|
||||
* ESS[R]: 'ess-command' now handles sinked consoles correctly.
|
||||
|
||||
* ESS[R]: 'ess-command' no longer changes '.Last.value'. As a
|
||||
result, background tasks like completions no longer affect the last
|
||||
value binding (#1058).
|
||||
|
||||
* ESS[R]: Namespaced evaluation is disable in roxygen examples
|
||||
(#1026). Part of this change is that namespaced evaluation has
|
||||
become a buffer-local rather than process-local setting (#1046).
|
||||
This makes it possible to disable namespaced evaluation in specific
|
||||
buffers or contexts.
|
||||
|
||||
* iESS: Inferior processes can now properly reuse frames (#987).
|
||||
Fixed issue that caused the current buffer to be incorrectly
|
||||
displayed in the new frame when 'display-buffer' is set to pop up
|
||||
frames.
|
||||
|
||||
* ESS[R]: Better support for tramp. Fixed package evaluation on
|
||||
remote servers with Tramp (#950); process reloading (#1001); and an
|
||||
evaluation issue (#1024). These fixes were contributed by David
|
||||
Pritchard.
|
||||
|
||||
* ESS[R]: Automatic offsetting of R process output is now disabled by
|
||||
default because it produces undesirable output in some situations.
|
||||
To re-enable, set 'inferior-ess-fix-misaligned-output' to t.
|
||||
|
||||
@@ -1,775 +0,0 @@
|
||||
This is readme.info, produced by makeinfo version 6.5 from readme.texi.
|
||||
|
||||
|
||||
File: readme.info, Node: General Information
|
||||
|
||||
1 General Information: README
|
||||
*****************************
|
||||
|
||||
This is the README file for the distribution of ESS version
|
||||
18.10.3snapshot
|
||||
|
||||
ESS is a GNU Emacs package for interactive statistical programming
|
||||
and data analysis. Languages supported: the S family (S, S-PLUS and R),
|
||||
SAS, BUGS/JAGS and Stata. ESS grew out of the desire for bug fixes and
|
||||
extensions to S-mode and SAS-mode as well as a consistent union of their
|
||||
features in one package.
|
||||
|
||||
Installation instructions are provided in sections for both Unix and
|
||||
Windows; see below.
|
||||
|
||||
The current development team is led by Martin Maechler since August
|
||||
2004. Former project leader A.J. (Tony) Rossini
|
||||
(<rossini@blindglobe.net>) did the initial port to XEmacs and has been
|
||||
the primary coder. Martin Maechler (<maechler@stat.math.ethz.ch>) and
|
||||
Kurt Hornik (<Kurt.Hornik@R-project.org>) have assisted with the S
|
||||
family and XLispStat. Stephen Eglen (<stephen@gnu.org>) has worked
|
||||
mostly on R support. Richard M. Heiberger (<rmh@temple.edu>) has
|
||||
assisted with S/S-PLUS development for Windows. Richard and Rodney A.
|
||||
Sparapani (<rsparapa@mcw.edu>) have done much of the work improving SAS
|
||||
batch and interactive support. Rodney has also extended ESS to support
|
||||
BUGS/JAGS and has an interest in improving Stata support.
|
||||
|
||||
We are grateful to the previous developers of S-mode (Doug Bates, Ed
|
||||
Kademan, Frank Ritter, David M. Smith), SAS-mode (Tom Cook) and
|
||||
Stata-mode (Thomas Lumley).
|
||||
|
||||
* Menu:
|
||||
|
||||
* License::
|
||||
* Installation::
|
||||
* Starting up::
|
||||
* Current Features::
|
||||
* New Features::
|
||||
* Reporting Bugs::
|
||||
* Mailing Lists::
|
||||
* Authors::
|
||||
|
||||
|
||||
File: readme.info, Node: License, Next: Installation, Prev: General Information, Up: General Information
|
||||
|
||||
1.1 License
|
||||
===========
|
||||
|
||||
The source and documentation of ESS is free software. You can
|
||||
redistribute it and/or modify it under the terms of the GNU General
|
||||
Public License as published by the Free Software Foundation; either
|
||||
version 2, or (at your option) any later version.
|
||||
|
||||
ESS is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in
|
||||
the file COPYING in the same directory as this file for more details.
|
||||
|
||||
|
||||
File: readme.info, Node: Installation, Next: Starting up, Prev: License, Up: General Information
|
||||
|
||||
1.2 Installation
|
||||
================
|
||||
|
||||
ESS supports GNU Emacs versions 25.1 and newer.
|
||||
|
||||
ESS is most likely to work with current/recent versions of the
|
||||
following statistical packages: R/S-PLUS, SAS, Stata, OpenBUGS and JAGS.
|
||||
|
||||
To build the PDF documentation, you will need a version of TeX Live
|
||||
or texinfo that includes texi2dvi.
|
||||
|
||||
There are two main methods used for installing ESS. You may install
|
||||
from a third-party repository or from source code. Once you install it,
|
||||
you must also activate or load ESS in each Emacs session, though
|
||||
installation from a third-party repository likely takes care of that for
|
||||
you. See *note Activating and Loading ESS:: for more details.
|
||||
|
||||
* Menu:
|
||||
|
||||
* Installing from a third-party repository::
|
||||
* Installing from source::
|
||||
* Activating and Loading ESS::
|
||||
* Check Installation::
|
||||
|
||||
|
||||
File: readme.info, Node: Installing from a third-party repository, Next: Installing from source
|
||||
|
||||
1.3 Installing from a third-party repository
|
||||
============================================
|
||||
|
||||
ESS is packaged by many third party repositories. Many GNU/Linux
|
||||
distributions package it, usually with the name "emacs-ess" or similar.
|
||||
|
||||
ESS is also available through Milkypostman’s Emacs Lisp Package
|
||||
Archive (MELPA), a popular repository for Emacs packages. Instructions
|
||||
on how to do so are found on MELPA's website (https://melpa.org/).
|
||||
MELPA also hosts MELPA-stable with stable ESS builds. You may choose
|
||||
between MELPA with the latest and greatest features (and bugs) or
|
||||
MELPA-stable, which may lag a bit behind but should be more stable.
|
||||
|
||||
After installing, users should make sure ESS is activated or loaded
|
||||
in each Emacs session. See *note Activating and Loading ESS::.
|
||||
Depending on install method, this may be taken care of automatically.
|
||||
|
||||
|
||||
File: readme.info, Node: Installing from source, Next: Activating and Loading ESS, Prev: Installing from a third-party repository
|
||||
|
||||
1.4 Installing from source
|
||||
==========================
|
||||
|
||||
Stable versions of ESS are available at the ESS web page
|
||||
(https://ess.r-project.org) as a .tgz file or .zip file. ESS releases
|
||||
are GPG-signed, you should check the signature by downloading the
|
||||
accompanying '.sig' file and doing:
|
||||
|
||||
gpg --verify ess-18.10.tgz.sig
|
||||
|
||||
Alternatively, you may download the git repository. ESS is currently
|
||||
hosted on GitHub: <https://github.com/emacs-ess/ESS>. 'git clone
|
||||
https://github.com/emacs-ess/ESS.git' will download it to a new
|
||||
directory 'ESS' in the current working directory.
|
||||
|
||||
We will refer to the location of the ESS source files as
|
||||
'/path/to/ESS/' hereafter.
|
||||
|
||||
After installing, users should make sure they activate or load ESS in
|
||||
each Emacs session, see *note Activating and Loading ESS::
|
||||
|
||||
Optionally, compile elisp files, build the documentation, and the
|
||||
autoloads:
|
||||
cd /path/to/ESS/
|
||||
make
|
||||
Without this step the documentation, reference card, and autoloads
|
||||
will not be available. Uncompiled ESS will also run slower.
|
||||
|
||||
Optionally, you may make ESS available to all users of a machine by
|
||||
installing it site-wide. To do so, run 'make install'. You might need
|
||||
administrative privileges:
|
||||
|
||||
make install
|
||||
|
||||
The files are installed into '/usr/share/emacs' directory. For this
|
||||
step to run correctly on macOS, you will need to adjust the 'PREFIX'
|
||||
path in 'Makeconf'. The necessary code and instructions are commented
|
||||
in that file.
|
||||
|
||||
|
||||
File: readme.info, Node: Activating and Loading ESS, Next: Check Installation, Prev: Installing from source
|
||||
|
||||
1.5 Activating and Loading ESS
|
||||
==============================
|
||||
|
||||
After installing ESS, you must activate or load it each Emacs session.
|
||||
ESS can be autoloaded, and if you used a third-party repository (such as
|
||||
your Linux distribution or MELPA) to install, you can likely skip this
|
||||
section and proceed directly to *note Check Installation::
|
||||
|
||||
Otherwise, you may need to add the path to ESS to 'load-path' with:
|
||||
|
||||
(add-to-list 'load-path "/path/to/ESS/lisp")
|
||||
|
||||
You then need to decide whether to take advantage of deferred loading
|
||||
(which will result in a faster Emacs startup time) or require ESS when
|
||||
Emacs is loaded. To autoload ESS when needed (note that if installed
|
||||
from source, you must have run 'make'):
|
||||
|
||||
(load "ess-autoloads")
|
||||
|
||||
To require ESS on startup, you can either put
|
||||
|
||||
(require 'ess-site)
|
||||
|
||||
or
|
||||
|
||||
(require 'ess-r-mode)
|
||||
|
||||
In your configuration file, depending on whether you want all ESS
|
||||
features or only R related features.
|
||||
|
||||
|
||||
File: readme.info, Node: Check Installation, Prev: Activating and Loading ESS
|
||||
|
||||
1.6 Check Installation
|
||||
======================
|
||||
|
||||
Restart Emacs and check that ESS was loaded from a correct location with
|
||||
'M-x ess-version'.
|
||||
|
||||
|
||||
File: readme.info, Node: Starting up, Next: Current Features, Prev: Installation, Up: General Information
|
||||
|
||||
1.7 Starting an ESS process
|
||||
===========================
|
||||
|
||||
To start an S session on Unix or on Windows when you use the Cygwin bash
|
||||
shell, simply type 'M-x S RET'.
|
||||
|
||||
To start an S session on Windows when you use the MSDOS prompt shell,
|
||||
simply type 'M-x S+6-msdos RET'.
|
||||
|
||||
|
||||
File: readme.info, Node: Current Features, Next: New Features, Prev: Starting up, Up: General Information
|
||||
|
||||
1.8 Current Features
|
||||
====================
|
||||
|
||||
* Languages Supported:
|
||||
* S family (R, S, and S+ AKA S-PLUS)
|
||||
* SAS
|
||||
* BUGS/JAGS
|
||||
* Stata
|
||||
* Julia
|
||||
* Editing source code (S family, SAS, BUGS/JAGS, Stata, Julia)
|
||||
* Syntactic indentation and highlighting of source code
|
||||
* Partial evaluation of code
|
||||
* Loading and error-checking of code
|
||||
* Source code revision maintenance
|
||||
* Batch execution (SAS, BUGS/JAGS)
|
||||
* Use of imenu to provide links to appropriate functions
|
||||
* Interacting with the process (S family, SAS, Stata, Julia)
|
||||
* Command-line editing
|
||||
* Searchable Command history
|
||||
* Command-line completion of S family object names and file
|
||||
names
|
||||
* Quick access to object lists and search lists
|
||||
* Transcript recording
|
||||
* Interface to the help system
|
||||
* Transcript manipulation (S family, Stata)
|
||||
* Recording and saving transcript files
|
||||
* Manipulating and editing saved transcripts
|
||||
* Re-evaluating commands from transcript files
|
||||
* Interaction with Help Pages and other Documentation (R)
|
||||
* Fast Navigation
|
||||
* Sending Examples to running ESS process.
|
||||
* Fast Transfer to Further Help Pages
|
||||
* Help File Editing (R)
|
||||
* Syntactic indentation and highlighting of source code.
|
||||
* Sending Examples to running ESS process.
|
||||
* Previewing
|
||||
|
||||
|
||||
File: readme.info, Node: New Features, Next: Reporting Bugs, Prev: Current Features, Up: General Information
|
||||
|
||||
1.9 New Features
|
||||
================
|
||||
|
||||
Changes and New Features in 19.04 (unreleased):
|
||||
|
||||
* ESS[R]: Automatic offsetting of R process output is now disabled by
|
||||
default because it produces undesirable output in some situations.
|
||||
To re-enable, set 'inferior-ess-fix-misaligned-output' to t.
|
||||
|
||||
* ESS[R]: Improved 'xref' lookup ('M-.'). Function locations are now
|
||||
always detected for package libraries listed in
|
||||
'ess-r-package-library-paths'.
|
||||
|
||||
* ESS[R]: Evaluated lines starting with the Roxygen prefix are now
|
||||
always stripped from the prefix, so they can be sent to the process
|
||||
easily. Previously, this was only the case inside the 'examples'
|
||||
field. Since roxygen is switching to R markdown, it becomes useful
|
||||
to evaluate chunks of R outside examples.
|
||||
|
||||
* stata support is now obsolete since we were unable to elicit FSF
|
||||
paperwork from some of the original authors: see the lisp/obsolete
|
||||
sub-directory on the ESS github repo
|
||||
|
||||
* 'ess-set-working-directory' no longer changes the active directory
|
||||
(as defined by the buffer-local variable 'default-directory') of
|
||||
the buffer where the command is called. Instead, the active
|
||||
directory of the inferior buffer is updated to the new working
|
||||
directory.
|
||||
|
||||
* The default of ess-eval-visibly is now ''nowait'. With this change
|
||||
you should no longer experience freezes while evaluating code.
|
||||
|
||||
* ESS[R]: There is a new menu entry for reloading the R process. It
|
||||
is otherwise bound to 'C-c C-e C-r'. Reloading now reuses the same
|
||||
process name and start arguments that were used to start the
|
||||
process.
|
||||
|
||||
* iESS: Process runners now return the inferior buffer. Note that
|
||||
callers of inferior runners should not assume that the current
|
||||
buffer has been set to the inferior buffer. Instead, use
|
||||
'with-current-buffer' with the return value of the inferior.
|
||||
|
||||
* iESS[SAS]: The SAS keymap was only set in iESS buffers called
|
||||
'*SAS*'. This is now fixed.
|
||||
|
||||
* ESS[R]: Fixed longstanding indentation issues involving '::' and
|
||||
':::' operators.
|
||||
|
||||
* Implement a more reliable check for the process busy state.
|
||||
Background actions such as completion and directory synchronization
|
||||
should not block the process and should not cause printing of the
|
||||
extraneous output to the interpreter.
|
||||
|
||||
* Activate 'goto-address-mode' for url and email highlighting in
|
||||
inferior buffers.
|
||||
|
||||
* 'smart-underscore' and 'ess-smart-S-assign-key' have been removed.
|
||||
Users who liked the previous behavior (i.e. underscore inserting
|
||||
"<-") should bind 'ess-insert-assign' to the underscore in their
|
||||
Emacs initialization file. For example, '(define-key
|
||||
ess-r-mode-map "_" #'ess-insert-assign)' and '(define-key
|
||||
inferior-ess-r-mode-map "_" #'ess-insert-assign)' will activate it
|
||||
in all ESS R buffers.
|
||||
|
||||
* ESS major modes are now defined using 'define-derived-mode'. This
|
||||
makes ESS major modes respect modern conventions such as having
|
||||
<language>-mode-hook and <language>-mode-map. Users are encouraged
|
||||
to place customizations under the appropriate mode.
|
||||
|
||||
* New option ess-auto-width controls setting the width option on
|
||||
window changes. Users can change it to 'frame, 'window, or an
|
||||
integer. See the documentation for details.
|
||||
'ess-auto-width-visible' controls visibility.
|
||||
|
||||
* ESS now respects 'display-buffer-alist'. Users can now use
|
||||
'display-buffer-alist' to manage how and where windows appear. For
|
||||
more information and examples, see *Note (ess)Controlling buffer
|
||||
display::.
|
||||
|
||||
* 'ess-roxy-mode' can now be enabled in non-R buffers. This is
|
||||
primarily intended to support roxygen documentation for cpp
|
||||
buffers. Preview functionality is not supported outside R buffers.
|
||||
|
||||
* ESS[R]: DESCRIPTION files now open in 'conf-colon-mode'.
|
||||
|
||||
* 'ess-style' now has effects when set as a file or directory local
|
||||
variable.
|
||||
|
||||
* 'ess-default-style' is now obsolete, use 'ess-style' instead.
|
||||
|
||||
* Options for 'ess-gen-proc-buffer-name-function' have been renamed.
|
||||
ess-gen-proc-buffer-name:projectile-or-simple was renamed to
|
||||
ess-gen-proc-buffer-name:project-or-simple and
|
||||
ess-gen-proc-buffer-name:projectile-or-directory was renamed to
|
||||
ess-gen-proc-buffer-name:project-or-directory. As the name
|
||||
suggests, these now rely on project.el (included with Emacs) rather
|
||||
than projectile.el, which is a third-party package.
|
||||
|
||||
* Eldoc fully honors 'eldoc-echo-area-use-multiline-p'
|
||||
|
||||
* ESS[R]: 'ess-r-rhub-check-package' gained new 'RECOMMENDED'.
|
||||
|
||||
* ESS[R]: devtools commands ask about saving modified buffers before
|
||||
running. Users can disable the questioning with
|
||||
'ess-save-silently'.
|
||||
|
||||
* ESS[R] help pages now provide links to other help topics. This is
|
||||
similar with what you would see with, for example
|
||||
'options(help_type = ``html'')' but works with the plain-text
|
||||
version as well. This only works with 'options(useFancyQuotes =
|
||||
TRUE)' (the default).
|
||||
|
||||
* 'ess-rdired' buffers now derive from tabulated-list-mode. They
|
||||
should look better and be a bit faster overall. The size column
|
||||
now displays object sizes in bytes.
|
||||
|
||||
* 'ess-rdired' buffers now auto-update. The frequency is governed by
|
||||
the new option 'ess-rdired-auto-update-interval'.
|
||||
|
||||
* ESS[R]: 'electric-layout-mode' is now supported. This
|
||||
automatically inserts a newline after an opening curly brace in R
|
||||
buffers. To enable it, customize 'ess-r-mode-hook'.
|
||||
|
||||
* ESS[R]: imenu now supports assignment with the equals sign.
|
||||
|
||||
* ESS[Rd]: Rd no longer writes abbrevs to user's abbrev file.
|
||||
|
||||
* ESS removed support for many unused languages. This includes old
|
||||
versions of S+, ARC, OMG, VST, and XLS.
|
||||
|
||||
* ess-r-runner-prefixes was modified to find R-4 and later.
|
||||
|
||||
The following have been made obsolete or removed, see their
|
||||
documentation for more detail:
|
||||
|
||||
* Libraries for literate data analysis are obsolete and not loaded by
|
||||
default. This includes 'ess-noweb', 'ess-swv', and related
|
||||
functionality like 'Rnw-mode'. Users are encouraged to switch to
|
||||
one of several other packages that deal with these modes. For
|
||||
example, polymode <https://github.com/polymode/poly-R/>,
|
||||
<https://polymode.github.io/>, or markdown-mode with edit-indirect
|
||||
<https://jblevins.org/projects/markdown-mode>.
|
||||
|
||||
* Support for 'auto-complete' is obsolete. The 'auto-complete'
|
||||
package is unmaintained and so ESS support is now obsolete. Users
|
||||
are encouraged to switch to 'company-mode' instead.
|
||||
|
||||
* User options for controlling display of buffers. This includes
|
||||
'ess-show-buffer-action', 'inferior-ess-same-window',
|
||||
'inferior-ess-own-frame', and 'inferior-ess-frame-alist'. See
|
||||
above about ESS respecting 'display-buffer-alist'.
|
||||
|
||||
* Variables 'ess-tab-always-indent' and 'ess-tab-complete-in-script'.
|
||||
Use the Emacs-wide setting of 'tab-always-indent' instead.
|
||||
|
||||
* 'inferior-ess-*-start-file' variables. All modes except Stata did
|
||||
not respect customization of this variable. In order to load a
|
||||
file on startup, you should put a function on
|
||||
'ess-*-post-run-hook'.
|
||||
|
||||
Bug Fixes in 18.10.3:
|
||||
* More 'Makefile' fixes, notably installing '*.el's.
|
||||
|
||||
Bug Fixes in 18.10.2:
|
||||
* ESS[R] Fix namespace evaluation in non-installed packages.
|
||||
Evaluation is directed into GlobalEnv as originally intended.
|
||||
* 'Makefile' fixes, notably for 'make install' and including full
|
||||
docs in the tarballs.
|
||||
|
||||
Bug Fixes in 18.10-1:
|
||||
* New functions 'ess-eval-line-visibly-and-step' ('C-c C-n' and
|
||||
'ess-eval-region-or-line-visibly-and-step' ('C-RET') which behave
|
||||
as the old versions of 'ess-eval-line-and-step' and
|
||||
'ess-eval-region-or-line-and-step'.
|
||||
|
||||
Changes and New Features in 18.10:
|
||||
|
||||
* This is the last release to support Emacs older than 25.1. Going
|
||||
forward, only GNU Emacs 25.1 and newer will be supported. Soon
|
||||
after this release, support for older Emacs versions will be
|
||||
dropped from the git master branch. Note that MELPA uses the git
|
||||
master branch to produce ESS snapshots, so if you are using Emacs <
|
||||
25.1 from MELPA and are unable to upgrade, you should switch to
|
||||
MELPA-stable.
|
||||
|
||||
* ESS now displays the language dialect in the mode-line. So, for
|
||||
example, R buffers will now show ESS[R] rather than ESS[S].
|
||||
|
||||
* The ESS manual has been updated and revised.
|
||||
|
||||
* The ESS initialization process has been further streamlined. If
|
||||
you update the autoloads (which installation from 'package-install'
|
||||
does), you should not need to '(require 'ess-site)' at all, as
|
||||
autoloads should automatically load ESS when it is needed (e.g.
|
||||
the first time an R buffer is opened). In order to defer loading
|
||||
your ESS config, you may want to do something like
|
||||
'(with-require-after-load "ess" <ess-config-here>)' in your Emacs
|
||||
init file. Users of the popular 'use-package' Emacs package can
|
||||
now do '(use-package ess :defer t)' to take advantage of this
|
||||
behavior. For more information on this feature, see *Note
|
||||
(ess)Activating and Loading ESS::.
|
||||
|
||||
* ESS now respects Emacs conventions for keybindings. This means
|
||||
that The 'C-c [letter]' bindings have been removed. This affects
|
||||
'C-c h', which was bound to 'ess-eval-line-and-step-invisibly' in
|
||||
'sas-mode-local-map'; 'C-c f', which was bound to
|
||||
'ess-insert-function-outline' in 'ess-add-MM-keys'; and 'C-c h',
|
||||
which was bound to 'ess-handy-commands' in 'Rd-mode-map',
|
||||
'ess-noweb-minor-mode-map', and 'ess-help-mode-map'
|
||||
|
||||
* Functions 'ess-eval-line-and-step' and
|
||||
'ess-eval-region-or-line-and-step' now behave consistently with
|
||||
other evaluation function inside a package.
|
||||
|
||||
* ESS[R]: 'ess-r-package-use-dir' now works with any mode. This sets
|
||||
the working directory to the root of the current package including
|
||||
for example C or C++ files within '/src').
|
||||
|
||||
* ESS[R]: Long + + prompts in the inferior no longer offset output.
|
||||
|
||||
* ESS[R]: New option 'strip' for 'inferior-ess-replace-long+'. This
|
||||
strips the entire + + sequence.
|
||||
|
||||
* ESS modes now inherit from 'prog-mode'. In the next release, ESS
|
||||
modes will use 'define-derived-mode' so that each mode will have
|
||||
(for example) its own hooks and keymaps.
|
||||
|
||||
* ESS[R]: Supports flymake in R buffers for Emacs 26 and newer.
|
||||
Users need to install the 'lintr' package to use it. Customizable
|
||||
options include 'ess-use-flymake', 'ess-r-flymake-linters', and
|
||||
'ess-r-flymake-lintr-cache'.
|
||||
|
||||
* ESS[R]: Gained support for xref in Emacs 25+ *Note (emacs)Xref::.
|
||||
|
||||
* ESS[R]: The startup screen is cleaner. It also displays the
|
||||
startup directory with an explicit 'setwd()'.
|
||||
|
||||
* ESS[R]: Changing the working directory is now always reflected in
|
||||
the process buffer.
|
||||
|
||||
* ESS[R]: 'Makevars' files open with 'makefile-mode'.
|
||||
|
||||
* New variable 'ess-write-to-dribble'. This allows users to disable
|
||||
the dribble ('*ESS*') buffer if they wish.
|
||||
|
||||
* All of the '*-program-name' variables have been renamed to
|
||||
'*-program'. Users who previously customized e.g.
|
||||
'inferior-ess-R-program-name' will need to update their
|
||||
customization to 'inferior-ess-R-program'. These variables are
|
||||
treated as risky variables.
|
||||
|
||||
* 'ess-smart-S-assign' was renamed to 'ess-insert-assign'. It
|
||||
provides similar functionality but for any keybinding, not just
|
||||
'_'. For instance if you bind it to ';', repeated invocations
|
||||
cycle through between assignment and inserting ';'.
|
||||
|
||||
* 'C-c C-=' is now bound to 'ess-cycle-assign' by default. See the
|
||||
documentation for details. New user customization option
|
||||
'ess-assign-list' controls which assignment operators are cycled.
|
||||
|
||||
* ESS[R] In remote sessions, the ESSR package is now fetched from
|
||||
GitHub.
|
||||
|
||||
* Commands that send the region to the inferior process now deal with
|
||||
rectangular regions. See the documentation of 'ess-eval-region'
|
||||
for details. This only works on Emacs 25.1 and newer.
|
||||
|
||||
* ESS[R]: Improvements to interacting with iESS in non-R files.
|
||||
Interaction with inferior process in non-R files within packages
|
||||
(for instance C or C++ files) has been improved. This is a work in
|
||||
progress.
|
||||
|
||||
* ESS[R]: Changing the working directory is now always reflected in
|
||||
the process buffer.
|
||||
|
||||
* ESS[JAGS]: *.jog and *.jmd files no longer automatically open in
|
||||
JAGS mode.
|
||||
|
||||
Many improvements to fontification:
|
||||
|
||||
* Improved customization for faces. ESS now provides custom faces
|
||||
for (nearly) all faces used and places face customization options
|
||||
into their own group. Users can customize these options using 'M-x
|
||||
customize-group RET ess-faces'.
|
||||
|
||||
* Many new keywords were added to 'ess-R-keywords' and
|
||||
'ess-R-modifiers'. See the documentation for details.
|
||||
|
||||
* ESS[R]: 'in' is now only fontified when inside a 'for' construct.
|
||||
This avoids spurious fontification, especially in the output buffer
|
||||
where 'in' is a common English word.
|
||||
|
||||
* ESS: Font-lock keywords are now generated lazily. That means you
|
||||
can now add or remove keywords from variables like 'ess-R-keywords'
|
||||
in your Emacs configuration file after loading ESS (i.e. in the
|
||||
':config' section for 'use-package' users).
|
||||
|
||||
* ESS[R]: Fontification of roxygen '@param' keywords now supports
|
||||
comma-separated parameters.
|
||||
|
||||
* ESS[R]: Certain keywords are only fontified if followed by a
|
||||
parenthesis. Function-like keywords such as 'if ()' or 'stop()'
|
||||
are no longer fontified as keyword if not followed by an opening
|
||||
parenthesis. The same holds for search path modifiers like
|
||||
'library()' or 'require()'.
|
||||
|
||||
* ESS[R]: Fixed fontification toggling. Especially certain syntactic
|
||||
elements such as '%op%' operators and backquoted function
|
||||
definitions.
|
||||
|
||||
* ESS[R]: 'ess-font-lock-toggle-keyword' can be called interactively.
|
||||
This command asks with completion for a font-lock group to toggle.
|
||||
This functionality is equivalent to the font-lock menu.
|
||||
|
||||
Notable bug fixes:
|
||||
|
||||
* 'prettify-symbols-mode' no longer breaks indentation. This is
|
||||
accomplished by having the pretty symbols occupy the same number of
|
||||
characters as their non-pretty cousins. You may customize the new
|
||||
variable 'ess-r-prettify-symbols' to control this behavior.
|
||||
|
||||
* ESS: Inferior process buffers are now always displayed on startup.
|
||||
Additionally, they don't hang Emacs on failures.
|
||||
|
||||
Obsolete libraries, functions, and variables:
|
||||
|
||||
* The 'ess-r-args.el' library has been obsoleted and will be removed
|
||||
in the next release. Use 'eldoc-mode' instead, which is on by
|
||||
default.
|
||||
|
||||
* Functions and options dealing with the smart assign key are
|
||||
obsolete. The following functions have been made obsolete and will
|
||||
be removed in the next release of ESS: 'ess-smart-S-assign',
|
||||
'ess-toggle-S-assign', 'ess-toggle-S-assign-key',
|
||||
'ess-disable-smart-S-assign'.
|
||||
|
||||
The variable 'ess-smart-S-assign-key' is now deprecated and will be
|
||||
removed in the next release. If you would like to continue using
|
||||
'_' for inserting assign in future releases, please bind
|
||||
'ess-insert-assign' in 'ess-mode-map' the normal way.
|
||||
|
||||
* ESS[S]: Variable 'ess-s-versions-list' is obsolete and ignored.
|
||||
Use 'ess-s-versions' instead. You may pass arguments by starting
|
||||
the inferior process with the universal argument.
|
||||
|
||||
Changes and New Features in 17.11:
|
||||
|
||||
* The ESS initialization process has been streamlined. You can now
|
||||
load the R and Stata modes independently from the rest of ESS. Just
|
||||
put '(require 'ess-r-mode)' or '(require 'ess-stata-mode)' in your
|
||||
init file. This is for experienced Emacs users as this requires
|
||||
setting up autoloads for '.R' files manually. We will keep
|
||||
maintaining 'ess-site' for easy loading of all ESS features.
|
||||
|
||||
* Reloading and quitting the process is now more robust. If no
|
||||
process is attached, ESS now switches automatically to one
|
||||
(prompting you for selection if there are several running).
|
||||
Reloading and quitting will now work during a debug session or when
|
||||
R is prompting for input (for instance after a crash). Finally,
|
||||
the window configuration is saved and restored after reloading to
|
||||
prevent the buffer of the new process from capturing the cursor.
|
||||
|
||||
* ESS[R]: New command 'ess-r-package-use-dir'. It sets the working
|
||||
directory of the current process to the current package directory.
|
||||
|
||||
* ESS[R] Lookup for references in inferior buffers has been improved.
|
||||
New variable 'ess-r-package-source-roots' contains package
|
||||
sub-directories which are searched recursively during the file
|
||||
lookup point. Directories in 'ess-tracebug-search-path' are now
|
||||
also searched recursively.
|
||||
|
||||
* ESS[R] Namespaced evaluation is now automatically enabled only in
|
||||
the 'R/' directory. This way ESS will not attempt to update
|
||||
function definitions from a package if you are working from e.g. a
|
||||
test file.
|
||||
|
||||
Changes and New Features in 16.10:
|
||||
|
||||
* ESS[R]: Syntax highlighting is now more consistent. Backquoted
|
||||
names are not fontified as strings (since they really are
|
||||
identifiers). Furthermore they are now correctly recognized when
|
||||
they are function definitions or function calls.
|
||||
* ESS[R]: Backquoted names and '%op%' operators are recognized as
|
||||
sexp. This is useful for code navigation, e.g. with 'C-M-f' and
|
||||
'C-M-b'.
|
||||
* ESS[R]: Integration of outline mode with roxygen examples fields.
|
||||
You can use outline mode's code folding commands to fold the
|
||||
examples field. This is especially nice to use with well
|
||||
documented packages with long examples set. Set
|
||||
'ess-roxy-fold-examples' to non-nil to automatically fold the
|
||||
examples field when you open a buffer.
|
||||
* ESS[R]: New experimental feature: syntax highlighting in roxygen
|
||||
examples fields. This is turned off by default. Set
|
||||
'ess-roxy-fontify-examples' to non-nil to try it out.
|
||||
* ESS[R]: New package development command 'ess-r-devtools-ask' bound
|
||||
to 'C-c C-w C-a'. It asks with completion for any devtools command
|
||||
that takes 'pkg' as argument.
|
||||
* ESS[R]: New command 'C-c C-e C-r' to reload the inferior process.
|
||||
Currently only implemented for R. The R method runs
|
||||
'inferior-ess-r-reload-hook' on reloading.
|
||||
* ESS[R]: 'ess-r-package-mode' is now activated in non-file buffers
|
||||
as well.
|
||||
|
||||
Bug fixes in 16.10:
|
||||
* ESS[R]: Fix broken (un)flagging for debugging inside packages
|
||||
* ESS[R]: Fixes (and improvements) in Package development
|
||||
* ESS[R]: Completion no longer produces '...=' inside 'list( )'.
|
||||
* ESS[R]: Better debugging and tracing in packages.
|
||||
* ESS[R]: Better detection of symbols at point.
|
||||
* ESS[R]: No more spurious warnings on deletion of temporary files.
|
||||
* ESS[julia]: help and completion work (better)
|
||||
* ESS[julia]: available via 'ess-remote'
|
||||
|
||||
Changes and New Features in 16.04:
|
||||
|
||||
* ESS[R]: 'developer' functionality has been refactored. The new
|
||||
user interface consists of a single command
|
||||
'ess-r-set-evaluation-env' bound by default to 'C-c C-t C-s'. Once
|
||||
an evaluation environment has been set with, all subsequent ESS
|
||||
evaluation will source the code into that environment. By default,
|
||||
for file within R packages the evaluation environment is set to the
|
||||
package environment. Set 'ess-r-package-auto-set-evaluation-env'
|
||||
to 'nil' to disable this.
|
||||
* ESS[R]: New 'ess-r-package-mode' This development mode provides
|
||||
features to make package development easier. Currently, most of
|
||||
the commands are based on the 'devtools' packages and are
|
||||
accessible with 'C-c C-w' prefix. See the documentation of
|
||||
'ess-r-package-mode' function for all available commands. With
|
||||
'C-u' prefix each command asks for extra arguments to the
|
||||
underlying devtools function. This mode is automatically enabled
|
||||
in all files within R packages and is indicated with '[pkg:NAME]'
|
||||
in the mode-line.
|
||||
* ESS[R]: Help lookup has been improved. It is now possible to get
|
||||
help for namespaced objects such as pkg::foobar. Furthermore, ESS
|
||||
recognizes more reliably when you change 'options('html_type')'.
|
||||
* ESS[R]: New specialized breakpoints for debugging magrittr pipes
|
||||
* ESS: ESS now implements a simple message passing interface to
|
||||
communicate between ESS and inferior process.
|
||||
|
||||
Bug fixes in 16.04:
|
||||
* ESS[R]: Roxygen blocks with backtics are now correctly filled
|
||||
* ESS[R]: Don't skip breakpoints in magrittr's 'debug_pipe'
|
||||
* ESS[R]: Error highlighting now understands 'testthat' type errors
|
||||
* ESS[Julia]: Added getwd and setwd generic commands
|
||||
|
||||
|
||||
File: readme.info, Node: Reporting Bugs, Next: Mailing Lists, Prev: New Features, Up: General Information
|
||||
|
||||
1.10 Reporting Bugs
|
||||
===================
|
||||
|
||||
Please send bug reports, suggestions etc. to <ESS-bugs@r-project.org>,
|
||||
or post them on our github issue tracker
|
||||
(https://github.com/emacs-ess/ESS/issues)
|
||||
|
||||
The easiest way to do this is within Emacs by typing
|
||||
|
||||
'M-x ess-submit-bug-report'
|
||||
|
||||
This also gives the maintainers valuable information about your
|
||||
installation which may help us to identify or even fix the bug.
|
||||
|
||||
If Emacs reports an error, backtraces can help us debug the problem.
|
||||
Type "M-x set-variable RET debug-on-error RET t RET". Then run the
|
||||
command that causes the error and you should see a *Backtrace* buffer
|
||||
containing debug information; send us that buffer.
|
||||
|
||||
Note that comments, suggestions, words of praise and large cash
|
||||
donations are also more than welcome.
|
||||
|
||||
|
||||
File: readme.info, Node: Mailing Lists, Next: Authors, Prev: Reporting Bugs, Up: General Information
|
||||
|
||||
1.11 Mailing Lists
|
||||
==================
|
||||
|
||||
There is a mailing list for discussions and announcements relating to
|
||||
ESS. Join the list by sending an e-mail with "subscribe ess-help" (or
|
||||
"help") in the body to <ess-help-request@r-project.org>; contributions
|
||||
to the list may be mailed to <ess-help@r-project.org>. Rest assured,
|
||||
this is a fairly low-volume mailing list.
|
||||
|
||||
The purposes of the mailing list include
|
||||
|
||||
* helping users of ESS to get along with it.
|
||||
* discussing aspects of using ESS.
|
||||
* suggestions for improvements.
|
||||
* announcements of new releases of ESS.
|
||||
* posting small patches to ESS.
|
||||
|
||||
|
||||
File: readme.info, Node: Authors, Prev: Mailing Lists, Up: General Information
|
||||
|
||||
1.12 Authors
|
||||
============
|
||||
|
||||
* A.J. Rossini (mailto:blindglobe@gmail.com)
|
||||
* Richard M. Heiberger (mailto:rmh@temple.edu)
|
||||
* Kurt Hornik (mailto:Kurt.Hornik@R-project.org)
|
||||
* Martin Maechler (mailto:maechler@stat.math.ethz.ch)
|
||||
* Rodney A. Sparapani (mailto:rsparapa@mcw.edu)
|
||||
* Stephen Eglen (mailto:stephen@gnu.org)
|
||||
* Sebastian P. Luque (mailto:spluque@gmail.com)
|
||||
* Henning Redestig (mailto:henning.red@googlemail.com)
|
||||
* Vitalie Spinu (mailto:spinuvit@gmail.com)
|
||||
* Lionel Henry (mailto:lionel.hry@gmail.com)
|
||||
* J. Alexander Branham (mailto:alex.branham@gmail.com)
|
||||
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: General Information73
|
||||
Node: License1711
|
||||
Node: Installation2381
|
||||
Node: Installing from a third-party repository3298
|
||||
Node: Installing from source4248
|
||||
Node: Activating and Loading ESS5843
|
||||
Node: Check Installation6920
|
||||
Node: Starting up7143
|
||||
Node: Current Features7526
|
||||
Node: New Features9076
|
||||
Node: Reporting Bugs30135
|
||||
Node: Mailing Lists31033
|
||||
Node: Authors31749
|
||||
|
||||
End Tag Table
|
||||
Reference in New Issue
Block a user