From 1016c15f48e12a1f018b1b9249c6ab85bd0bef03 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Thu, 23 Nov 2023 19:28:00 +0100 Subject: [PATCH] update ess Signed-off-by: Andreas Gerler --- elpa/ess-20191014.1343/.dir-locals.el | 11 - elpa/ess-20191014.1343/allnews.info | 1933 ---------------- elpa/ess-20191014.1343/announc.info | 735 ------- elpa/ess-20191014.1343/authors.info | 19 - elpa/ess-20191014.1343/bugrept.info | 26 - elpa/ess-20191014.1343/credits.info | 81 - elpa/ess-20191014.1343/currfeat.info | 42 - elpa/ess-20191014.1343/ess-defs.info | 8 - elpa/ess-20191014.1343/ess-r-xref.el | 131 -- elpa/ess-20191014.1343/ess-stata-lang.el | 1219 ----------- elpa/ess-20191014.1343/ess-stata-mode.el | 219 -- elpa/ess-20191014.1343/etc/ESSR.rds | Bin 13331 -> 0 bytes elpa/ess-20191014.1343/etc/ESSR/R/.basic.R | 134 -- elpa/ess-20191014.1343/etc/ESSR/R/.load.R | 53 - elpa/ess-20191014.1343/license.info | 17 - elpa/ess-20191014.1343/mailing.info | 21 - elpa/ess-20191014.1343/make-regexp.el | 238 -- elpa/ess-20191014.1343/news.info | 416 ---- .../obsolete/ess-noweb-font-lock-mode.el | 392 ---- .../obsolete/ess-noweb-mode.el | 1938 ----------------- elpa/ess-20191014.1343/obsolete/ess-noweb.el | 138 -- elpa/ess-20191014.1343/obsolete/ess-r-args.el | 354 --- elpa/ess-20191014.1343/obsolete/ess-rutils.el | 41 - elpa/ess-20191014.1343/obsolete/ess-swv.el | 491 ----- elpa/ess-20191014.1343/onews.info | 1523 ------------- elpa/ess-20191014.1343/readme.info | 742 ------- elpa/ess-20191014.1343/requires.info | 15 - .../dir | 4 +- .../ess-autoloads.el | 265 ++- .../ess-bugs-d.el | 22 +- .../ess-bugs-l.el | 41 +- .../ess-custom.el | 245 ++- .../ess-gretl.el | 95 +- .../ess-help.el | 124 +- .../ess-inf.el | 951 +++++--- .../ess-jags-d.el | 23 +- .../ess-julia.el | 108 +- .../ess-mode.el | 67 +- .../ess-pkg.el | 9 +- .../ess-r-completion.el | 189 +- .../ess-r-flymake.el | 85 +- .../ess-r-mode.el | 1023 +++++---- .../ess-r-package.el | 127 +- .../ess-r-syntax.el | 355 +-- elpa/ess-20230419.1527/ess-r-xref.el | 155 ++ .../ess-rd.el | 76 +- .../ess-rdired.el | 63 +- .../ess-roxy.el | 125 +- .../ess-s-lang.el | 64 +- .../ess-sas-a.el | 351 ++- .../ess-sas-d.el | 114 +- .../ess-sas-l.el | 163 +- .../ess-site.el | 34 +- .../ess-sp6-d.el | 48 +- .../ess-toolbar.el | 26 +- .../ess-tracebug.el | 419 ++-- .../ess-trns.el | 29 +- .../ess-utils.el | 207 +- .../ess.el | 53 +- .../ess.info | 578 +++-- .../essd-els.el | 49 +- elpa/ess-20230419.1527/etc/ESSR.rds | Bin 0 -> 79396 bytes .../etc/ESSR/BUILDESSR | 6 +- .../etc/ESSR/LOADREMOTE | 0 elpa/ess-20230419.1527/etc/ESSR/R/.basic.R | 265 +++ elpa/ess-20230419.1527/etc/ESSR/R/.load.R | 96 + .../etc/ESSR/R/completion.R | 42 +- .../etc/ESSR/R/debug.R | 7 +- .../etc/ESSR/R/misc.R | 33 +- .../etc/ESSR/R/mpi.R | 2 +- .../etc/ESSR/R/ns-eval.R | 12 +- .../etc/ESSR/R/pkg.R | 0 .../etc/Makefile | 0 .../etc/ess-julia.jl | 0 .../etc/ess-sas-sh-command | 0 .../obsolete/ess-eldoc.el | 31 +- .../obsolete/ess-font-lock.el | 150 ++ .../obsolete/ess-mouse.el | 44 +- .../obsolete/ess-r-a.el | 29 +- .../obsolete/mouseme.el | 41 +- .../obsolete/msdos.el | 46 +- 81 files changed, 4130 insertions(+), 13898 deletions(-) delete mode 100644 elpa/ess-20191014.1343/.dir-locals.el delete mode 100644 elpa/ess-20191014.1343/allnews.info delete mode 100644 elpa/ess-20191014.1343/announc.info delete mode 100644 elpa/ess-20191014.1343/authors.info delete mode 100644 elpa/ess-20191014.1343/bugrept.info delete mode 100644 elpa/ess-20191014.1343/credits.info delete mode 100644 elpa/ess-20191014.1343/currfeat.info delete mode 100644 elpa/ess-20191014.1343/ess-defs.info delete mode 100644 elpa/ess-20191014.1343/ess-r-xref.el delete mode 100644 elpa/ess-20191014.1343/ess-stata-lang.el delete mode 100644 elpa/ess-20191014.1343/ess-stata-mode.el delete mode 100644 elpa/ess-20191014.1343/etc/ESSR.rds delete mode 100644 elpa/ess-20191014.1343/etc/ESSR/R/.basic.R delete mode 100644 elpa/ess-20191014.1343/etc/ESSR/R/.load.R delete mode 100644 elpa/ess-20191014.1343/license.info delete mode 100644 elpa/ess-20191014.1343/mailing.info delete mode 100644 elpa/ess-20191014.1343/make-regexp.el delete mode 100644 elpa/ess-20191014.1343/news.info delete mode 100644 elpa/ess-20191014.1343/obsolete/ess-noweb-font-lock-mode.el delete mode 100644 elpa/ess-20191014.1343/obsolete/ess-noweb-mode.el delete mode 100644 elpa/ess-20191014.1343/obsolete/ess-noweb.el delete mode 100644 elpa/ess-20191014.1343/obsolete/ess-r-args.el delete mode 100644 elpa/ess-20191014.1343/obsolete/ess-rutils.el delete mode 100644 elpa/ess-20191014.1343/obsolete/ess-swv.el delete mode 100644 elpa/ess-20191014.1343/onews.info delete mode 100644 elpa/ess-20191014.1343/readme.info delete mode 100644 elpa/ess-20191014.1343/requires.info rename elpa/{ess-20191014.1343 => ess-20230419.1527}/dir (82%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-autoloads.el (56%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-bugs-d.el (96%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-bugs-l.el (89%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-custom.el (93%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-gretl.el (91%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-help.el (90%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-inf.el (79%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-jags-d.el (95%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-julia.el (85%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-mode.el (93%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-pkg.el (77%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-r-completion.el (81%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-r-flymake.el (80%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-r-mode.el (78%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-r-package.el (84%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-r-syntax.el (78%) create mode 100644 elpa/ess-20230419.1527/ess-r-xref.el rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-rd.el (87%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-rdired.el (85%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-roxy.el (93%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-s-lang.el (92%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-sas-a.el (83%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-sas-d.el (75%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-sas-l.el (94%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-site.el (68%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-sp6-d.el (85%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-toolbar.el (92%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-tracebug.el (91%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-trns.el (92%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess-utils.el (86%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess.el (83%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/ess.info (93%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/essd-els.el (83%) create mode 100644 elpa/ess-20230419.1527/etc/ESSR.rds rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/BUILDESSR (72%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/LOADREMOTE (100%) create mode 100644 elpa/ess-20230419.1527/etc/ESSR/R/.basic.R create mode 100644 elpa/ess-20230419.1527/etc/ESSR/R/.load.R rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/R/completion.R (86%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/R/debug.R (96%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/R/misc.R (85%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/R/mpi.R (94%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/R/ns-eval.R (98%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ESSR/R/pkg.R (100%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/Makefile (100%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ess-julia.jl (100%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/etc/ess-sas-sh-command (100%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/obsolete/ess-eldoc.el (89%) create mode 100755 elpa/ess-20230419.1527/obsolete/ess-font-lock.el rename elpa/{ess-20191014.1343 => ess-20230419.1527}/obsolete/ess-mouse.el (88%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/obsolete/ess-r-a.el (86%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/obsolete/mouseme.el (94%) rename elpa/{ess-20191014.1343 => ess-20230419.1527}/obsolete/msdos.el (83%) diff --git a/elpa/ess-20191014.1343/.dir-locals.el b/elpa/ess-20191014.1343/.dir-locals.el deleted file mode 100644 index 0cefb6e1..00000000 --- a/elpa/ess-20191014.1343/.dir-locals.el +++ /dev/null @@ -1,11 +0,0 @@ -;;; Directory Local Variables -;;; For more information see (info "(emacs) Directory Variables") - -((nil - (bug-reference-bug-regexp . "#\\(?2:[0-9]+\\)") - (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\\|;;;;\\*") - (indent-tabs-mode)) - (ess-r-mode . ((ess-style . RRR)))) diff --git a/elpa/ess-20191014.1343/allnews.info b/elpa/ess-20191014.1343/allnews.info deleted file mode 100644 index 405663f2..00000000 --- a/elpa/ess-20191014.1343/allnews.info +++ /dev/null @@ -1,1933 +0,0 @@ -This is allnews.info, produced by makeinfo version 6.5 from -allnews.texi. - -Changes and New Features in 19.04 (unreleased): - - * 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 - -mode-hook and -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. See - *Note (ess)Controlling buffer display:: for more information and - examples. - - * '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. - - * 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. - - 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 , - , or markdown-mode with edit-indirect - . - - * 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" )' 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. *Note (ess)Activating and Loading ESS:: for more - information on this feature. - - * 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 - - Changes and New Features in 15.09: - - * ESS[R]: The indentation logic has been refactored. It should be - faster, more consistent and more flexible. There are three types - of indentation settings, those starting with 'ess-offset-' give the - actual offsets, those starting with 'ess-indent-' are control - (commonly Boolean) variables, and those starting with 'ess-align-' - are vertical alignment overrides which inhibit default offsets in - specific situations. See 'ess-style-alist' for detailed - description of the new indentation system and provided default - indentation styles. - - * ESS[R]: Deprecation of old indentation settings. As a consequence - of the indentation re-factoring 'ess-brace-imaginary-offset', - 'ess-expression-offset' and all delimiter-specific offsets are - deprecated. The settings for indentation of continued statements - have been replaced by 'ess-offset-continuations'. It can be set to - either 'cascade' or 'straight' (the default). - 'ess-arg-function-offset' has been replaced by - 'ess-indent-from-lhs' and has been generalised to assignments. - This setting now works with both statement blocks and expressions - and only takes effect for offsets set to 'prev-call' and - 'open-delim' in order to produce a consistent indentation. - - * ESS: A test framework has been set up. - - * ESS[R]: A new RStudio style is provided to mimic as closely as - possible R files indented via RStudio. To reproduce the setup of - some of the RStudio users, the RStudio- style with - 'ess-offset-arguments' set to 'prev-line' is also provided. In - addition, the new RRR+ style is equivalent to RRR except it indents - blocks in function calls relatively to the opening delimiter. This - style does not try to save horizontal space and produces more - indentation. - - * ESS[R]: Roxygen fields will now be indented on paragraph refilling - in order to make the documentation more readable. You can also - refill commented lines in the 'examples' field without squashing - the surrounding code in the comments. - - * ESS[R]: ESS can now format your code! This is controlled through - the settings 'ess-fill-calls' and 'ess-fill-continuations'. When - activated, '(fill-paragraph)' formats your calls and your - formulas/continuations while making sure they don't go past - 'fill-column'. Repeated refills cycle through different styles - (see the docstrings for more details). By default, the refilled - region blinks. Set 'ess-blink-filling' to nil to prevent this. - - * ESS[R]: Fix occasional missing error location fontification in - inferior buffers. - - * ESS[R]: ess-developer now correctly assigned the environment of new - functions to the package namespace. - - * ESS[Julia]: ?[topic] now works in the *julia* buffer. Note that - support for editing Julia code now depends on 'julia-mode.el' from - the Julia project. If you install ESS from the official - tarball/zip file, 'julia-mode.el' is already included. Otherwise, - if you install ESS by running 'make', then the latest version of - 'julia-mode.el' is downloaded (and so you need an active internet - connection to install) during the installation process. - Alternatively, if you run ESS without running 'make', then ensure - that you have the 'julia-mode.el', which you can get easily from - MELPA for example. - - * iESS: For naming inferior processes, ESS can use 'projectile''s - project root and it does so when - 'ess-gen-proc-buffer-name-function' is set to - 'ess-gen-proc-buffer-name:projectile-or-simple' as by default, or - to another value beginning with - 'ess-gen-proc-buffer-name:projectile-*'. - - Changes and New Features in 15.03-1: - * ESS[R]: An indentation bug has been fixed (github issue 163) - * ESS[R]: On windows, if 'ess-prefer-higher-bit' is non-nil (the - default), then R-newest will try to run a 64 bit (rather than 32 - bit) version of R. - - Changes and New Features in 15.03: - * ESS[R]: Full native support for 'company-mode'. - * ESS[R]: More efficient caching algorithm for R completion. - * ESS: New offset variable 'ess-close-paren-offset' to control the - indentation of the closing parentheses. - * ESS[R]: Ask for CRAN mirror only once per emacs session. - * ESS[R]: Detect 'library' and 'require' calls for better completion - caching. - * Buffer display is now customizable ('ess-show-buffer-action'). - * Use 'y-or-n-p' instead of 'yes-or-no-p' throughout. - * More support for ODS in ess-sas-graph-view. - * Makefiles are now both UNIX and GNU friendly. - * ESS[R]: Simplify directory lookup in 'ess-developer' (#137). - * Make closed paren indentation consistent - - Bug Fixes in 15.03: - * Fix open brace indentation bug (#27 in ess/R-ESS-bugs.R). - * Fix git version lookup - * Don't check directory modtime in R dialect. - * Declare all ess macros for edebug. - * Add 'ess-smart-comma' to eldoc message functions. - * Inform users when retrieving RDA aliases. - * Line ending in '~' is also a continuation line. - * Filing roxy paragraphs works as expected now. - * In 'ess-developer-add-package', remove incorrect 'wait' argument - from 'ess-get-words-from-vector' call. - * Fix #96, #117, #120, #125, #134, #137. - * Fix ess-quit-r. Call base::q() even if it is masked. - * Fix 'ess-show-buffer' to always display the buffer in another - window. - * Makefile: Fix cd bug for directories with spaces in them - * 'ess-kill-buffer-and-go' modified to not restart R - - Changes / Selected Bug Fixes in 14.09: - * ESS[Julia]: Executable is changed to 'julia'. - * ESS[Julia]: Completion and help system was adjusted to Julia - v.0.3.0. Julia v.0.2.x is no more supported. - * ESS[R]: Running R with 'gdb' debugger now works as expected - * iESS: Inferior ESS buffers are now derived from 'comint-mode' - * ESS[R]: 'ess-execute-screen-options' uses correct screen width in - terminal sessions - * ESS: 'ess-build-tags-for-directory' works when no TAGS file name - was provided - * ESS: 'ess-offset-statement-continued' is now respected everywhere - except inside of the 'if' test condition. - * ESS: New variable 'ess-offset-statement-first-continued' for - indentation of the first line in multiline statements. - * ESSR: Starting ',' in multiline statements indentation is now - ignored to achieve a more pleasant alignment. - * ESSR: Improved behavior of 'RET' in roxygen blocks. - * ESS[R]: command cleaning with 'C-u C-u C-y' was broken with lines - containing " + " - * ESS[R]: fixed "empty watch window bug" - * ESS[R]: don't ask for help location on ac-quick-help (request of - github #81) - * ESS[R]: "importClassesFrom" and "importMethodsFrom" were added to - the list of two-parameter roxygen commands - * ESS[R]: fix vignetes display and hyperlinks (were broken in - 13.09-1) - * ESS[Julia]: recognize function names ending with ! - * ESS[Julia]: fix indentation of "for" comprehension syntax within - brackets. - - Changes / Selected Bug Fixes in 13.09-1: - * ess-remote and TRAMP: R support code is now downloaded in binary - form instead of being injected from local machine. The R code is - stored in '~/.config/ESSR/' directory on the remote machine - * TRAMP: PAGER environment variable is now correctly set to - 'inferior-ess-pager' - * retrieval of help topics on remote machines is fixed - * org-babel: source references of R code executed from org files - correctly point to source references in original org files (version - 8.2.1 or higher of org-mode is required for this feature) - * 'ess-execute' is now bound to 'C-c C-e C-e' in 'ess-extra-map'. - * completion works again in 'ess-execute' - * ESS[R]: 'head' and 'tail' methods were replaced by '.ess_htsummary' - in 'ess-R-describe-object-at-point-commands' - * ESS[roxygen]: evaluation commands now work in roxygen blocks. - Leading comments are automatically removed before the evaluation - * ESS[transcript]: 'Clean Region' now works with multiline - statements; 'ess-transcript-clean-region' etc. correctly treat - multiline statements, i.e., no longer forgets the lines typically - preceded by '+' - * ESS[SAS]: Three features/fixes with special thanks to Matthew - Fidler https://github.com/emacs-ess/ESS/pulls/mlf176f2 - (https://github.com/emacs-ess/ESS/pulls/mlf176f2). Turn on SAS log - mode when appropriate. Indent comments and CARDS statement more - appropriately. - * ESS[SAS]: 'ess-sas-edit-keys-toggle' default returns to 'nil' - * ESS[R]: support for 'prettify-symbols-mode': contribution from - Rudiger Sonderfeld - * ESS[SWV]: knitr now evaluates in the current frame - * ESS[developer]: ess-developer doesn't kill open DESCRIPTION files - anymore - * ESS[roxygen]: 'ess-roxy-preview-HTML' is now on 'C-c C-o C-w' and - 'ess-roxy-preview-text' is now on 'C-c C-o C-t' - * ESS: installation with 'make install' was simplified and should - work out of the box on most *nix systems - * ESS installation instructions simplified - * fixed font-lock bug introduced in 13.09 that was causing very slow - process output - - Changes/New Features in 13.09: - * font-lock in process buffers doesn't "spill" over prompts. Missing - closing string delimiters should not cause wrong fontification of - the following command input. - * ESS[julia]: full features M-TAB completion and auto-complete - support, which now works for modules, structures and data types. - * ESS[julia]: a much better eldoc showing arguments of methods and - data type constructors - * ESS-developer: - - ESS-developer work-flow pattern has been streamlined: - ESS-developer is now automatically activated on per-file basis - if the file is part of a developed package - 'ess-developer-packages'. The old behavior (activation on - per-process basis) is still available on 'M-x ess-developer' - in a process buffer. - - integration with 'devtools' package. New command - 'ess-developer-load-package' calls 'load_all' on the package - containing current file. 'ess-developer-add-package' now - offers IDO menu completions with available loading methods, - currently 'library', and 'load_all'. Loading command can be - customized with 'ess-developer-load-on-add-commands'. - * 'TAB' now indents region if region is active (a contribution of - Matthew Fidler in pull #41) - * 'M-x ess-version' now reports full loading path and recognizes git - and ELPA versions. - * warning and error keyword are now highlighted with - 'font-lock-warning-face' as they should be, (for quite some time - these keywords have been hijacked by compilation mode - fontification). - * eldoc: Eldoc now recognizes multiple processes. If current process - is busy, or current buffer is not associated with a process, eldoc - picks its completions from the first available free process. - * org-babel: evaluation is now org-friendly - * help: new help buffers now try to reuse ess-help buffers. This - behavior is controlled by 'ess-help-reuse-window' custom variable. - * help: ?foo pops IDO menu on multiple help files (so far it worked - only for 'C-c C-v') - * remote evaluation is considerably faster now on slow connections - * ESS[R] tracebug R source references regular expressions are - (mostly) language agnostic. - * 'ess-function-call-face' inherits from - 'font-lock-function-name-face' rather than - 'font-lock-builtin-face'. - * 'ess-inject-source' now accepts 'function-and-buffer' option. - * Documentation: The "New Features" section (and 'NEWS') now - represent recent changes: within the last year or so. All changes - can be found in the new news.html (news.html) (or 'NEWS' and - 'ONEWS'). - * ESS[R] 'ess-rep-regexp' should no longer inf.loop (rarely!), and - hence 'M-x ess-fix-miscellaneous' should neither. - - Changes/New Features in 13.05: - * ESS[gretl]: Support for 'gretl' (both editing and sub-process - interaction). A contribution of Ahmadou Dicko. - * ESS: process output display is 4-10 times faster due to new caching - and only occasional emacs re-display (for the moment this - functionality is available only when 'ess-tracebug' is active). - * ESS: 'C-c `' is now bound to 'ess-show-traceback' and 'C-c ~' is - bound to 'ess-show-call-stack'. - * ESS[R]: ESS stores function in 'ESSR' environment to avoid kludging - users' global environment and accidental deletion. - * ESS[R]: new variable 'ess-swv-processing-command' to control - weaving and tangling. - * ESS[R]: 'ess-default-style' has been changed (from 'DEFAULT') to - 'RRR'. Use something like '(setq ess-default-style 'DEFAULT)' or - '(setq ess-indent-level 2)' in your '~/.emacs' equivalent _before_ - loading ESS, if you do not like this new "incompatible" default - style. - * ESS[julia]: ESS stores its functions in 'ESS' module. - * ESS[julia]: Eldoc is now supported in julia modes - * ESS[julia]: Adjusted error reference detection and interactive help - to julia internal changes - * ESS[R]: 'ess-use-tracebug''s default has been changed to 't'. Set - it to nil if you want to keep the previous behavior. - * ESS[tracebug]: Electric debug keys have been removed [breaking - change] The functionality was replaced with 'ess-debug-minor-mode' - and 'ess-debug-minor-mode-map'. - * ESS[tracebug]: 'ess-tracebug-map' is an alias to 'ess-dev-map' 'C-c - C-t'. - * ESS[tracebug]: 'ess-bp-toggle-state' ('C-c C-t o') can now be used - during the debug session to toggle breakpoints on the fly - (suggestion by Ross Boylan). - * ESS[tracebug]: 'ess-debug-flag-for-debugging' and - 'ess-debug-unflag-for-debugging' work correctly from the debugging - contexts. These commands also recognize non-exported functions for - the packages listed in 'ess-developer-packages' ('C-c C-t C-a'). - - * ESS[R]: Eldoc (activated by 'ess-use-eldoc') has become more - sophisticated, and hence also more intruding in the interface - between the Statistics softare, e.g., R, and the user. - - Note that you can turn off ElDoc, by placing '(setq ess-use-eldoc - nil)' in your '~/.emacs' file, prior to loading ESS, - - * ESS[SAS]: long over-looked 'SAS-mode-hook' appears! - * ESS[SAS]: 'ess-sas-edit-keys-toggle' now defaults to 't' since - 'sas-indent-line' is still broken, i.e. 'TAB' is now bound to - 'ess-sas-tab-to-tab-stop' by default - - Changes/Bug Fixes in 12.09-2: - * ESS: new 'ess-switch-to-end-of-proc-buffer' variable that controls - whether 'C-c C-z' switches to the end of process buffer. The - default is 't'. You can use prefix argument to 'C-c C-z' to toggle - this variable. - * ESS: fix in 'ess-eval-linewise' that was causing emacs to hang - during R debugging with 'ess-eval-visibly' equal to 't'. - * ESS: fix in 'ess-eval-linewise' that was causing emacs to recenter - the prompt in visible window - * ESS[tracebug]: A better handling of "Selection" prompts and debug - related singlekey commands. - * ESS: fix a bug in 'ess-switch-process' that was causing '*new*' - selection to fail. - * ESS[R]: Solve missing 'ess-local-process-name' bug in R-dired. - * ESS[SWV]: 'ess-swv-PDF' doesn't ask for a command to run if there - is only one command in 'ess-swv-pdflatex-commands'. - * ESS[SWV]: 'ess-swv-weave' gained an universal argument to allow for - an interactive choice between available weavers (sweave, knitr). - * ESS: 'ess-eval-*-and-step' functions go to next empty line at eob, - instead of staying at the last line. - - Changes/New Features in 12.09-1: - * ESS _Breaking Changes in Keys_: - - - New keymaps: 'ess-doc-map' bound to 'C-c C-d'; 'ess-extra-map' - bound to 'C-c C-e'; 'ess-dump-object-into-edit-buffer' was - moved on 'C-c C-e C-d' - - roxygen map was moved on 'C-c C-o' and 'ess-roxy-update-entry' - now resides on 'C-c C-o C-o' - - ess-handy-commands is not bound anymore - - 'ess-dev-map' (including 'ess-tracebug' and 'ess-developer') - moved on 'C-c C-t' - - 'C-c C-y' is deprecated in favor of 'C-c C-z C-z' - * ESS[R] new command 'ess-describe-object-at-point' bound to 'C-c C-d - C-e' (repeat 'C-e' or 'e' to cycle). It was inspired by Erik - Iverson's 'ess-R-object-tooltip'. Customize - 'ess-describe-at-point-method' to use tooltip instead of an - electric buffer. - * ESS: New command 'ess-build-tags-for-directory' bound to 'C-c C-e - C-t' for building dialect specific tag tables. After building tags - use 'M-.' to navigate to function and objects definitions. By - default 'C-c C-e C-t' builds tags based on imenu regular - expressions and also include other common languages '.c, .o, .cpp' - etc. But it relies on external 'find' and 'etags' commands. If - 'ess-build-tags-command' is defined (for 'R'), the inferior process - is asked to build tags instead. - * ESS: 'ess-switch-process' offers '*new*' alternative to start a new - process instead of switching to one of the currently running - processes. - * ESS: Switching between processes ('C-c C-s') uses buffer names - instead of the internal process names. Use 'M-x rename-buffer' - command to conveniently rename your process buffers. - * ESS: Process buffers can be automatically named on process creation - according to user specified scheme. Default schemes are *proc*, - *proc:dir* and *proc:abbr-long-dir* where 'proc' stands for the - internal process name and 'dir' stands for the directory where the - process was started in. The default is *proc*. For customization - see 'ess-gen-proc-buffer-name-function'. - * ESS: 'ess-eval-visibly-p' is deprecated in favor of - 'ess-eval-visibly'. - * ESS: New evaluation pattern 'nowait'. In addition to old 'nil' and - 't' values, 'ess-eval-visibly' accepts 'nowait' for a visible - evaluation with no waiting for the process. See 'ess-eval-visibly' - for details on evaluation patterns. - * ESS: New "Process" menu entry with process related commands and - configuration - * iESS: Process buffer is now automatically shown on errors - * ESS: New 'ess-switch-to-inferior-or-script-buffer' command bound to - 'C-c C-z' in both script and process buffers. If invoked form - process buffer it switches to the most recent buffer of the same - dialect. It is a single key command. - * ESSR-help: On multiple help pages with the same name, 'C-c C-v' now - asks for user resolution directly in emacs. - * ESS[R] ess-roxy: new variable 'ess-roxy-re' for fontification of - cases where the number of leading '#' differs from 'ess-roxy-str'. - * ESS[R] Eldoc was considerably enhanced. It now finds hidden - default S3 methods and displays non-default methods' arguments - after trailing ||. - * ESS[R]: New 'ess-display-demos' command bound to 'C-c C-d o' and - 'C-c C-d C-o' - * ESS: New 'ess-help-web-search' command bound to 'C-c C-d w' and - 'C-c C-d C-w' to facilitate interactive search of web resources. - Implemented for 'R', 'Stata' and 'Julia'. See also - 'ess-help-web-search-command'. - * ESS: ess-pdf-viewer-pref accepts now command line arguments - * ESS[Rnw]: Add knitr support. Customize 'ess-swv-processor' for the - default processor. - * ESS[Rnw]: More thorough renaming of remaining 'noweb-*' to - 'ess-noweb-*'. - * ESS[Rnw] new commands 'ess-eval-chunk-and-step' and - 'ess-eval-chunk' bound to 'M-n C-c' and 'M-n C-M-x' to mirror - standard ess commands in C-c map. - * ESS[R] Auto-completion: new variable 'ess-ac-R-argument-suffix' to - customize the insertion of trailing "=". Defaults to " = ". - * ESS[Julia]: Added index, apropos and web-search to julia. - * ESS help: More evaluation commands were added to ess-help mode - ('C-c C-c', 'C-M-x' etc) - - Bug Fixes in 12.09-1: - * iESShelp: Multiple help pages with the same name are properly - handled on 'C-c C-v' - * iESSremote: Evaluation with ESS remote no longer freezes emacs. - * iESS: 'comint-previous-prompt' 'C-c C-p' no longer stops on - secondary prompt "+". - * iESS[R], iESS(Sqpe) [S] on Windows: The 'options("editor")' is now - initialized to 'emacsclient' instead of the previous 'gnuclient'. - The user may need to add the line '(server-start)' to the emacs - initialization file. 'emacsclient' has been included with emacs - since GNU Emacs 22.1. - * ESS[Rnw] Fixed "connection to R" bug (in 12.09 only). - * ESS[Rnw] Explicit 'ess-swv-stangle' and 'ess-swv-sweave' functions. - * ESS[Rnw] Fixed completion and smart underscore problems cause by - unmatched "\"' - * ESS[R] is more careful with the 'R' code injection. It now happens - only once at the start of the session. - * ESS[R]: Fixed auto-scrolling the comint buffer on evaluation. - * ESS[Julia]: Solve several indentation and word navigation problems. - * ESS[Julia]: Help system works again. - - Changes/New Features in 12.09: - - * Due to XEmacs lacking some features that ESS requires, ESS support - of XEmacs ends with ESS 12.04-4. This decision will be re-visited - in the future as XEmacs continues to sync with GNU Emacs. - - * ESS[R]: On Windows, there is now a new customizable variable - (currently called 'ess-directory-containing-R') to tell ESS where - to look for the 'Rterm.exe' executables. The name of the variable - and the values it can take are both in beta and subject to change. - Prior to this variable, ESS searched only in the default - installation directory. Setting this variable now tells ESS how to - find 'Rterm.exe' executables when they are installed somewhere - else. - - * ESS[julia]: _new_ mode for editing julia code ('*.jl'). Start with - 'M-x julia'. - - Full interaction interface, imenu and basic error referencing are - available. - - * ESS[R] noweb: 'noweb-mode' and 'noweb-font-lock-mode' have been - renamed to 'ess-noweb-mode' and 'ess-noweb-font-lock-mode' to avoid - conflicts with the "real" 'noweb-mode'. - - * ESS[R] noweb: The long standing font-lock bug has been solved in - 'ess-noweb' interface. - - * ESS: Basic evaluation keys are now bound to 'ess-eval-region-*-' - functions: - - - 'C-M-x' is bound to 'ess-eval-region-or-function-or-paragraph' - - 'C-c C-c' is bound to - 'ess-eval-region-or-function-or-paragraph-and-step' - - 'C-RET' is bound to 'ess-eval-region-or-line-and-step' - - Each of these functions first evaluates the region whenever the - region is active. - - * ESS: 'C-M-a'/'C-M-e' now step to beginning/end of paragraph if no - function has been detected. - - * ESS: 'ess-eval-*-and-step' family of functions are now smarter, and - don't step to end of buffer or end of chunk code ('@') when at the - end of the code. - - * ESS: 'ess-handy-commands' function is bound to 'C-c h' - - * ESS: ESS is now _blinking_ the evaluated region. Set - 'ess-blink-region' to nil to deactivate; 'ess-blink-delay' gives - the duration of the blink. Evaluated region is "blinked" in - 'highlight' face. - - * ESS[R-help] New key 'a' for "apropos()" in help buffers. Also - available through 'C-c h'. - - * ESS[R-help] All R commands of type foo?bar and foo??bar are - recognized and redirected into appropriate *ESS-help* buffers. - - * ESS[R]: New customization interface for _font-lock_. - - ESS font-lock operates with predefined keywords. Default keywords - are listed in 'ess-R-font-lock-keywords' and - 'inferior-R-font-lock-keywords', which see. The user can easily - customize those by adding new keywords. These variables can also - be interactively accessed and saved through 'ESS/Font-lock' - submenu. - - Several new fontification keywords have been added. Most notably - the keywords for highlighting of function calls, numbers and - operators. - - * ESS[R]: auto-complete is now activated by default whenever - auto-complete package is detected. Set 'ess-use-auto-complete' to - nil to deactivate. - * ESS[R]: R AC sources are no longer auto-starting at 0 characters - but at the default 'ac-auto-start' characters. - * ESS no longer redefines default ac-sources, but only appends - 'ac-source-filename' to it. - * ESS: 'ac-source-R' now concatenates " = " to function arguments. - - * ESS: Menus for ESS and iESS have been reorganized and enriched with - _Tracebug_ and _Developer_ submenus. - - * ESS[R]: 'ess-developer' and 'ess-tracebug' commands are available - by default in 'ess-dev-map' which is bound to 'C-c d' in ESS and - iESS maps. - - * ESS[R]: 'eldoc' truncates long lines whenever - 'eldoc-echo-area-use-multiline-p' is non-nil (the default). Set - this variable to t if you insist on multiline eldoc. See also - 'ess-eldoc-abbreviation-style'. - - * ESS[R]: completion code pre-caches arguments of heavy generics such - as 'plot' and 'print' to eliminated the undesirable delay on first - request. - - * iESS: Prompts in inferior buffers are now highlighted uniformly - with 'comint-highlight-prompt' face. - - * ESS[R]: R process no longer wait for the completion of input in - inferior buffer. Thus, long running commands like 'Sys.sleep(5)' - no longer stall emacs. - - * ESS: [R, S, Stata, Julia] have specialized 'ess-X-post-run-hook's, - which are run at the end of subprocess initialization. - - * ESS[Stata]: All interactive evaluation commands work as expected. - On-line comments are removed before the evaluation and multiline - comments are skipped on 'C-c C-c' and other interactive commands. - - * ESS no longer auto-connects to a subprocess with a different - dialect than the current buffer's one. - - * ESS: 'ess-arg-function-offset-new-line' is now a list for all the - ESS indentation styles, which results in the following indentation - after an open "(": - - a <- some.function(other.function( - arg1, - arg2) - - * ESS[SAS]: Improved MS RTF support for GNU Emacs; try - 'ess-sas-rtf-portrait' and 'ess-sas-rtf-landscape'. - - Changes/Bug Fixes in 12.04-3: - * ESS: basic support for package.el compatibility - * ESS[R]: correct indentation of & and | continuation lines - * 'M-x ess-version' shows the svn revision even after 'make install' - * ESS[SAS]: improved XEmacs support - * iESS[R]: better finding of previous prompt - * ESS[Stata]: adjusted prompt for mata mode - * ESS[R]: resolved name clashes with cl.el - * ESS[R]: removed dependence on obsolete package assoc - * New 'make' target 'lisp', to build the lisp-only part, i.e., not - building the docs. - - Changes/New Features in 12.04-1: - * iESS[Stata]: New interactive help invocation. - * iESS[Stata]: New custom variable 'inferior-STA-start-file'. - * iESS[Stata]: 'inferior-STA-program-name' is now "stata" and can be - customized. - * ESS[Stata] New sections in stata help files Syntax('s-S'), - Remarks('r'), Title('t'). - - Bug Fixes in 12.04-1: - * ESS[R]: Better 'ess-tracebug' error handling. - * ESS[R]: Corrected 'ess-eldoc' help string filtering and improved - argument caching. - * ESS[R]: Indentation of non-block if/else/for/while lines fixed. - * 'M-x ess-version' should work better. - * ESS: Filename completion now again works inside strings. - * iESS[Stata]: Fixed prompt detection issue. - * ESS[Rd]: R is autostarted also from here, when needed. - - Changes/New Features in 12.04: - * ESS: Reverting new behavior of 12.03, 'TAB' in 'ess-mode' no longer - completes by default. If you want smart 'TAB' completion in R and - S scripts, similarly to iESS behavior, set the variable - 'ess-tab-complete-in-script' to 't'. Also see - 'ess-first-tab-never-complete' for how to customize where first - 'TAB' is allowed to complete. - * ESS: completion is consistently bound to 'M-TAB' (aka 'M-C-i') in - both Emacs23 and Emacs24. - * ESS: The variable 'ess-arg-function-offset-new-line' introduced in - ESS(12.03) now accepts a list with the first element a number to - indicate that the offset should be computed from the indent of the - previous line. For example setting it to '(2) results in: - - a <- some.function( - arg1, - arg2) - - Changes/New Features in 12.03: - * ESS indentation: new offset variable - 'ess-arg-function-offset-new-line' controlling for the indentation - of lines immediately following open '('. This is useful to shift - backwards function arguments after a long function call expression: - - a <- some.function( - arg1, - arg2) - - instead of the old - - a <- some.function( - arg1, - arg2) - - If '(' is not followed by new line the behavior is unchanged: - - a <- some.function(arg1, - arg2) - - This variable should be set as part of indentation style lists, or - in ess-mode hook. - * ESS[R]: 'C-c .' sets (indentation) style. - * ESS: In ESS buffers 'yank'('C-y') command accepts double argument - 'C-u C-u' to paste commands only. It deletes any lines not - beginning with a prompt, and then removes the prompt from those - lines that remain. Useful to paste code from emails, - documentation, inferior ESS buffers or transcript files. - * Documentation: ESS user manual has been rearranged and completed - with several new chapters and sections to reflect newly added - features ("Completion", "Developing with ESS", "ESS tracebug", "ESS - developer", "ESS ElDoc", "IDO Completion" and "Evaluating Code") - * RefCard: Reference card was updated to include new features. - * Eldoc: Eldoc was rewritten and is activated by default. See - 'ess-use-eldoc', 'ess-eldoc-show-on-symbol', - 'ess-eldoc-abbreviation-style' variables for how to change the - default behavior. _Note:_ 'skeleton-pair-insert-maybe' prohibits - eldoc display, on '(' insertion. - * ESS[R]: Eldoc shows arguments of a generic function whenever found. - * ESS: 'TAB' in 'ess-mode' now indents and completes, if there is - nothing to indent. Set 'ess-first-tab-never-completes-p' to 't' to - make 'TAB' never complete on first invocation. Completion - mechanism is similar to the completion in the 'inferior-ess-mode' - - a filename expansion is tried, if not found ESS completes the - symbol by querying the process. - * ESS for emacs version 24 or higher: ESS is fully compatible with - the emacs 24 completion scheme, i.e. all the completion is done by - 'completion-at-point'. Also in accordance with emacs conventions, - ESS doesn't bind 'M-TAB' for emacs 24 or higher. 'M-TAB' calls the - default 'complete-symbol'. - - * ESS[R]: Out of the box integration with 'Auto Completion' mode - http://cx4a.org/software/auto-complete - (http://cx4a.org/software/auto-complete) . Three AC sources - 'ac-source-R-args', 'ac-source-R-objects' and 'ac-source-R' are - provided. The last one combines the previous two and makes them - play nicely together. Set 'ess-use-auto-complete' to 't' to start - using it. Refer to documentation string of 'ac-use-auto-complete' - for further information. - * ESS[R]: New unified and fast argument completion system, comprised - of 'ess-funname.start', 'ess-function-arguments', - 'ess-get-object-at-point'. Eldoc and auto-completion integration - are using this system. - * ESS: 'ess-switch-to-end-of-ESS'('C-c C-z'), and - 'ess-switch-to-ESS'('C-c C-y'): Automatically start the process - whenever needed. - * ESS[R]: 'roxy' knows about previewing text version of the - documentation. Bound to 'C-c C-e t'. - * ESS[R]: Solved the "nil filename" bug in roxygen support. - * ESS[R]: 'ess-tracebug' is now part of ESS: - - New Features: - - - Source injection: Tracebug now can inject source references on - the fly during code evaluation, i.e. you don't have to source - your file, but just evaluate your code in normal fashion. - Variable 'ess-tracebug-inject-source-p' controls this behavior - - if t, always inject source reference, if ''function', inject - only for functions (this is the default), if 'nil', never - inject. - - During the source injection the value of 'ess-eval-visibly' is - ignored. - - Org-mode support: Visual debugger is now aware of the - temporary org source editing buffer ('C-c '') and jumps - through this buffers if still alive, or in original org buffer - otherwise. - - New keys in watch mode: '?' and 'd' - - Two new hooks: ess-tracebug-enter-hook and - ess-tracebug-exit-hook - - * ESS[R]: New package 'ess-developer' to evaluate 'R' code directly - in the package environment and namespace. It can be toggled on and - off with 'C-c d t'. When 'ess-developer' is on all ESS evaluation - commands are redefined to evaluate code in appropriate - environments. Add package names to the list of your development - packages with 'C-d a', and remove with 'C-d r'. Source the current - file with 'C-d s'.Evaluation function which depend on - '`ess-eval-region'' ask for the package to source the code into, - 'ess-eval-function' and alternatives search for the function name - in the development packages' environment and namespace and insert - the definition accordingly. See the documentation section - "Developing with ESS/ESS developer" for more details. - - * ESS[R] help system: - - New Features: - - - 'q' quits window instead of calling - 'ess-switch-to-end-of-ESS'. This is consistent with emacs - behavior help and other special buffers (_breaking change_). - - 'k' kills window without asking for the name (pointed by Sam - Steingold) - - Help map inherits from 'special-mode-map' as sugested by Sam - Steingold. - - Package index: new function 'ess-display-index' bound to 'i' - in help mode map. - - Package vignettes: new function 'ess-display-vignettes' bound - to 'v' in help mode map. - - Display help in HTML browser: new function - 'ess-display-help-in-browser' bound to 'w' in help mode map. - It depends on 'R''s 'browser' option. - - New custom variable 'ess-help-pop-to-buffer': if non-nil ESS - help buffers are given focus on display. The default is 't' - (_breaking change_). - - New menu entries for the above functions. - - Bogus help buffers are no longer generated by default, i.e. - buffers of the form "No documentation for 'foo' in specified - packages and libraries: you could try '??foo' ". - 'ess-help-kill-bogus-buffers' now defaults to 't'. Beware, - there may be instances where the default is unsatisfactory - such as debugging and/or during R development. Thanks to Ross - Boylan for making the suggestion, Sam Steingold for reminding - us of this variable and Martin Maechler for the warning. - * ESS now uses 'IDO' completing read functionality for all the - interactive requests. It uses ido completion mechanism whenever - available, and falls back on classical completing-read otherwise. - You can set 'ess-use-ido' to nil if you don't want the IDO - completion. See the documentation string of 'ess-use-ido' for more - information about 'IDO' and ESS configuration. - - * ESS[S]: "','" is bound to ess-smart-comma: If comma is invoked at - the process marker of an ESS inferior buffer, request and execute a - command from '`ess-handy-commands'' list. If - 'ess-R-smart-operators' is t '`ess-smart-comma' also inserts " " - after comma. - * ESS[S], notably 'R': Variable '`ess-handy-commands'' stores an - alist of useful commands which are called by 'ess-smart-comma' in - the inferior buffer. - - Currently containing: - - change-directory - 'ess-change-directory' - help-index - 'ess-display-index' - help-object - 'ess-display-help-on-object' - vignettes - 'ess-display-vignettes' - objects[ls] - 'ess-execute-objects' - search - 'ess-execute-search' - set-width - 'ess-execute-screen-options' - install.packages - 'ess-install.packages' - library - 'ess-library' - setRepos - 'ess-setRepositories' - sos - 'ess-sos' - - Handy commands: 'ess-library', 'ess-install.packages', etc - ask - for item with completion and execute the correspond command. - 'ess-sos' is a interface to 'findFn' function in package 'sos'. If - package 'sos' is not found, ask user for interactive install. - - * ESS: New dynamic mode line indicator: Process status is - automatically reflected in all mode-lines of associated with the - process buffers. Particularly useful for displaying debug status - of 'ess-tracebug' and developer status of 'ess-developer' in all - associated buffers. - - * ESS: New 'ess-completing-read' mechanism: ESS uses 'ido' - completions whenever possible. Variable 'ess-use-ido' controls - whether to use ido completion or not. Active by default. - - * ESS now supports comint fields for output and input detection. - This feature is not used by default, but might be useful in the - future. - - * ESS[S]: New custom variable 'inferior-ess-S-prompt' to customize - prompt detection regular expression in the inferior ESS buffers. - You can customize this variable to enhance comint navigation - ('comint-previous-prompt' and 'comint-next-prompt') the inferior - buffers. - - * ESS[R]: Internal 'R' completion retrieval - ('ess-R-complete-object-name') was rewritten and is faster now. - - * ESS is using process plist to store process specific variables, as - opposed to buffer local variables as it was using before. The use - of buffer local variables to store process variables is - discouraged. - - * ESS: new functions to manipulate process plists: 'ess-process-get' - and 'ess-process-set'. - - * ESS: Internal process waiting mechanism was completely rewritten. - ESS no more relies on prompt regular expressions for the prompt - detection. The only requirement on the primary process prompt is - to end in '> '. This could be overwritten by setting - 'inferor-ess-primary-prompt'. - - * ESS[S], notably 'R': Saved command history: ESS-HISTORY-FILE now - accepts 't' (default), 'nil', or a file name. By setting it to - 'nil' no command line history is saved anymore. - ESS-HISTORY-DIRECTORY now allows to have the history all saved in - one "central" file. - * ESS[R]: more Roxygen improvements. - * ESS[R]: 'C-c .' to set (indentation) style. - - * ESS[R]: Functions with non-standard names (for example - 'aaa-bbb:cc') are properly handled by font-lock and evaluation - routines. - * ESS[R]:Several regexp bugs (described in etc/R-ESS-bugs.el) were - fixed in 'ess-get-words-from-vector' and 'ess-command'. - - Changes/New Features in 5.14: - * ESS[BUGS/JAGS]: Batch BUGS is back! For recent OpenBUGS versions, - 3.0.8+, a batch BUGS script is once again available, but for Linux - only. Therefore, since it seems that BUGS and JAGS must co-exist - (rather than a transition from BUGS to JAGS), .bug files are now in - ESS[BUGS] mode and .jag files are in ESS[JAGS] mode. ESS[BUGS] now - works like ESS[JAGS] rather than the original mode ESS[BUGS] mode - which was difficult to maintain. Although, ESS[BUGS] appears to - work, there still may be some features missing as well as bugs. - - * ESS[R]: New customizable variable 'ess-swv-plug-into-AUCTeX-p' - Commands to Sweave current file and LaTeX the result are now - available to AUCTeX users, if this variable is set to 't'. - - * ESS[S]: 'C-c C-c' ('ess-eval-function-or-paragraph-and-step') is - now skipping over comments as the other paragraph functions do. It - (and similar functions) should no longer wrongly find 'function()' - beginnings inside comments or strings. - - * ESS[SAS]: improved by better support for GNU Emacs - - Changes/New Features in 5.13: - * ESS[R]: On Windows, for R 2.12.0 and later, the Rterm executables - (in subdirectories i386 / x64) now are found as well as for earlier - R versions. - * ESS[S+]: on Windows, both 32- and 64-bit versions of S+ ("S-PLUS") - are found now and made available on the menu. - * ESS[R]: When prompting for a starting directory, the R version is - (always?) correct now. - * ESS[R]: on non-Windows platforms, the 'use-dialog-box' variable is - no longer temporarily changed (to 'nil' for R-x.y.z version - functions and to 't' for 'R' itself), but rather the user - customization is obeyed. - * ESS[R]: more Roxygen improvements. - * 'Rd-preview-help' now generates preview buffers with navigation - facilities the same as regular help buffers. - * ESS: New functions and keys C-c [up] / [down] for evaluating the - buffer "from beginning till here". - - Changes/New Features in 5.12: - * ESS[SAS] Font-locking: update of PROCs keywords (up to SAS 9.22); - error/warnings. - * ESS[R]: Roxygen improvements: S4 classes; also optionally keep - spaces when filling arguments - * ESS[Rd]: support new keywords: section-name \subsection plus a - dozen "new" keywords; should match R 2.12.x now. - * 'ess-display-help-on-object' ('C-c C-v') now _caches_ the list of - topics, thus speeding up the improvement feature introduced in 5.9. - - Changes/New Features in 5.11: - * Filename completion within buffers now adds only trailing - characters to complete the filename, rather than expanding to an - absolute file path. This filename completion is bound to the TAB - key. - - * 'M-n P' in Sweave buffers now prompts for the command to run - instead of using 'pdflatex' unconditionally, offering completion - from customizable collection 'ess-swv-pdflatex-commands', the first - of which is taken as default and that defaults to 'texi2pdf'. - * 'M-RET' is now also bound in S language (R and S+) buffers to - 'ess-use-this-dir'. It sends 'setwd(..)' to the S process to set - the working directory to the one of the source file. - - Changes/New Features in 5.10: - * 'M-RET' in *S* buffers is now bound to 'ess-dirs'. This function - will set Emacs's current directory to be the same as the *S* - process. This is useful if you use 'setwd()' within a *S* process. - - Changes/New Features in 5.9: - * Toolbar: The toolbar now has an icon for starting Splus. - * Indentation: New documentation and code has been added to make it - easier to change how ESS indents code. In particular, see - 'ess-default-style', 'ess-own-style-list' and the documention - subsection "Changing indentation styles". - * 'ess-display-help-on-object' ('C-c C-v') now offers completion - candidates for help file aliases, in addition to object names. - * Font locking: is now turned on even without 'window-system' is - 'nil', whenever ESS-FONT-LOCK-MODE is non-nil, i.e., by default. - * ESS script editing: ess-eval-deactivate-mark default is now t, as - suggested by Leo Alekseyev and subsequent "unanimous" ESS-help - discussion. - * ESS[R]: Editing support for "#!" (Rscript / littler) editing, - thanks to Jeffrey Arnold. - * ESS[R]: Now finds all R versions, both 64-bit and 32-bit, on some - 64-bit Windows machines. Please report back to ess-core success or - failure on your 64-bit Windows machine. - * ESS Manual now more visually pleasing; - - * ESS[R]: Roxygen on XEmacs no longer font locks for now (as it - required missing features and hence broke ESS startup, there). - * ESS[R]: Roxygen has a sub-menu on the [ESS] menu. - * ESS[R]: Function 'ess-rutils-htmldocs' in 'ess-rutils.el' offers an - alternative to 'help.start()' for navigating R documentation, using - the 'browse-url' Emacs function. - - Changes/New Features in 5.8: - * ESS[R]: New 'ess-rutils.el' with utilities for listing, loading, - installing, and updating packages, as well as object manipulation - (listing, viewing, and deleting). It also provides an alternative - to 'RSiteSearch()' that uses the 'browse-url' function, so results - can be viewed in an Emacs web browser. - * ESS[R]: much more extensive Roxygen interface, via ess-roxy.el from - Henning Redestig. Ess-roxy supports filling of roxygen fields, - generation and updating roxygen templates, completion of roxygen - tags, basic navigation (marking and moving between entries), - folding using hs-minor-mode and preview of the Rd file. - * Emacs lisp files have got better names (partly, for now). - - Changes/New Features in 5.7: - * ESS[R]: loading a source file ('C-c C-l') now works in Windows, - similarly to other platforms; (further; it had accidentally been - broken in ESS 5.6 on all platforms) - - Changes/New Features in 5.6: - * ESS[R]: help() calls have to differ from old default, with newer - versions of R; currently via .help.ESS <- function(...) hack. - - Changes/New Features in 5.4: - * ESS[SAS]: The long overdue change from 'make-regexp' to - 'regexp-opt' for font-locking is complete. The new 'regexp-opt' is - now the default since it is better than the old code in many ways - (and especially more maintainable). However, there are certainly - some special cases missed (bug reports and patches welcome!). - Setting 'ess-sas-run-regexp-opt' to 'nil' will result in the old - code being used. - * ESS[BUGS] and ESS[JAGS]: typing '=' now results in '<-'. - * ESS[R] function arguments "show" '(ess-r-args-show)' now uses the - new '(tooltip-show-at-point)' contributed by Erik Iverson. - * Toolbar icons now also work in (beta) Emacs 23. - * ESS[S]: New function 'ess-change-directory' for setting both emacs' - current directory and the directory of an *R* or *S* buffer. - * ESS[S] when transient-mark-mode is true, the mark is now kept, - rather than deactivated, thanks to a patch from David Reitter. - - Changes/New Features in 5.3.11: - * ESS[SAS]: work around bug in Emacs 22.2 & 22.3 which fails to set - case-fold fontification automatically. - * Rd mode: support new keyword 'Rdversion' - * ESS[R]: now again works with Emacs 21.x - - Changes/New Features in 5.3.10: - * Fixed noweb-mode bug accidentally introduced into 5.3.9 - * In noweb-mode, e.g., Rnw-mode, electric "<" also inserts closing - "@". Further, the code chunk boundaries are better kept - up-to-date, such that code[R] <-> text[LaTeX] minor mode switching - should happen more reliably. - * In noweb-mode, fix a buglet in rare [Enter] or [Tab] behavior; - further, by default disable the former '[[' .. ']]' - code-protection-when-filling behavior which has been found to be - buggy. - - Changes/New Features in 5.3.9: - * ESS[SAS]: evince PDF viewer now supported as well; search order: - evince, Xpdf, Adobe/Acrobat Reader - * ESS[R]: added support for Roxygen, potentially to be extended. - * ESS[S] (and R): inferior ('*R*') and transcript modes no longer - fontify language keywords (such as 'for', 'in', etc). - * iESS[Stata]: Customize the 'ess-sta-delimiter-friendly' setting to - 't' to convert embedded semi-colons to newlines for Stata - processing. - * Sweave fix for embedded blanks in PDF reader and PDF files - * Several fixes for Major Mode Convention violations in 'ess-mode' - and 'noweb-mode'. - * ESS[JAGS]: 'M-x comment-region' now available! - * ESS[S] The 'ess-swv-*' commands (and keybindings) are now in a - submenu of the "Noweb" menu, when editing Sweave files. - - Changes/New Features in 5.3.8: - * ESS[JAGS]: more separation from ESS[BUGS] (as much as is currently - planned); now 'C-c C-c' on an empty '.jmd' creates a template as it - should; symbolic links are created for CODA output so BOA is happy: - from 'index.txt' to '.ind' and 'chain#.txt' to '#.out' - * ESS[SAS]: buffer-local 'ess-sas-submit-command' and - 'ess-sas-submit-command-options' now recognized by - 'ess-sas-submit-region' - * ESS[S]: When trying to evaluate code in an S language buffer and - there is no associated process, now start R automatically instead - of signalling an error. Also, restart R if there is an associated - process which is not running. However, do not start R just via the - "electric" '(' ('ess-r-args-auto-show'). - * ESS[S]: For (one-line) functions withOUT '{ .. }' bodys, the end - of function is now correctly found more often. This notably - improves 'C-c C-c' ('ess-eval-function-or-paragraph-and-step'). - * ESS[JAGS]: cleanup/re-organization of elisp code; symbolic links - for CODA output are now only created by the new JAGS 'system' - command in version 1.0.3; specify whether this command is available - via 'ess-jags-system'; if not present, then no links are created so - that the '*shell*' buffer does not become unresponsive during the - batch run - - Changes/New Features in 5.3.7: - * ESS: 'ess-default-style' now *is* customizable, i.e., changing its - value in '~/.emacs' now does have the desired effect. - * ESS: 'ess-font-lock-mode' is a new variable (default: t) which - controls whether font-locking is enabled in ESS buffers. - * ESS[R]: for XEmacs on Windows; another tweak to find R versions - * ESS[SAS]: font-locking updated for ODS and SAS Bayesian Procedures; - a more consistent handling of SAS options by - 'ess-sas-submit-command-options' which is buffer-local; portable - snooze for MS Windows via customize-able 'ess-sleep-for' (floats - welcome); Xpdf now supported as a PDF viewer - * ESS[Rnw]: now also works with "emacs -nw" and Emacs 22. - * ESS[JAGS]: now requires JAGS 1.0 (see the new ESS for JAGS help - section for more information): both need work; suggestions welcome - * ESS[R]: [TAB] completion now uses the R-internal completion - mechanism (for R >= 2.5.0). - * ESS[R] ([S]): interpretation of "_" as assignment has been removed - in 'ess-continued-statement-p' for R and S. - * several internal code cleanups. - * ESS[R]: An experimental version of a new command 'Rgui' on MS - Windows to send lines directly from emacs to 'Rgui' is available in - file 'lisp/essd-rgui.el'. Preliminary documentation is in file - 'doc/rgui-doc.txt'. - - Changes/New Features in 5.3.6: - * ESS: for XEmacs, using "gnuclient" (without a "-q") works for - things like fix() after M-x gnuserv-start has been done. - * ESS[R]: M-x R-newest should now work in more situations on MS - Windows, e.g., when R has been installed in a non-default - "ProgramFiles" directory tree. In these cases, there's no need to - specify the name (and full path) of the R program anymore. - * ESS[R]: For XEmacs, startup (with new tooltip code) works again. - - Changes/New Features in 5.3.5: - * ESS[R] a new defun is available, 'M-x R-newest', which will start - the newest version of R that it can find on your system. - * ESS[R] add Sven Hartenstein's "R function arguments tips" - functionality, via new file '../lisp/essd-r-args.el'. Note that - this includes an "electric "("" behavior inside 'R-mode' which is - _active by default_ and can be customized via - 'ess-r-args-electric-paren'; i.e., use '(setq - ess-r-args-electric-paren nil)' to turn it off. Further, - 'ess-r-args-show-as' allows to switch to the "tooltip" mode. - * ESS: functions 'ess-get-pdf-viewer' and *-ps-viewer; built on new - customizable variables 'ess-pdf-viewer-pref' and - 'ess-ps-viewer-pref'; currently used in 'ess-swv-PDF' and '*-PS'. - * ESS[R] Improved 'ess-swv-PDF' to run pdf viewer only if pdflatex - was ok - * ESS[R] Improved 'ess-swv-weave' to start R automatically if none is - running. - * ESS: Do no longer ask _which_ ESS process to use if there is only - one. - - Changes/New Features in 5.3.4: - * ESS[R] now better work with options(error=recover); and the new - default of CHM help files on windows. - * ESS[R] some more cleanup in the "sweave" functions - * miscellaneous fixes - - Changes/New Features in 5.3.3: - * ESS[S] fix buglet (5.3.2 only) which left command prompt in - "execute buffer" and hence help files. - * new customizable variable 'ess-display-buffer-reuse-frames' set to - true (which changes default behavior) such that execution or help - *frames* are reused. - - Changes/New Features in 5.3.2: - * Classic BUGS now supported by '(require 'essd-bugs)' with ESS[BUGS] - and JAGS by '(require 'essd-jags)' with ESS[JAGS]. But, only one - of them can be used at a time since they don't play nice together. - Also, 'C-c C-c' is now bound to the function 'ess-bugs-next-action' - ('F12' has been retired). And finally, note that 'essl-bug.el' is - deprecated and the replacement is 'essl-bugs.el'. - * ESS[R] Improved some of the "Sweave-make" functions (yet scarcely - documented) in 'ess-swv.el'. - * ESS[S] No longer mess with .Last.value (nor in other "languages"). - - Changes/New Features in 5.3.1: - * See the docs for 2 ways to install ESS for XEmacs - 1. by uncommenting the XEmacs part of Section 1 of 'Makeconf' and - performing 'make install' - 2. by unpacking either 'ess-5.3.1.tgz' or 'ess-5.3.1.zip' into - 'PREFIX/lib/xemacs/site-packages' on unix or - 'PREFIX\XEmacs\site-packages' on windows - * ESS[R]: fixed bugs so that Rterm.exe can be found by XEmacs - * ESS[S]: 'ess-toggle-S-assign-key' is slightly changed; in - particular, the default 'ess-assign-key' is now 'C-x ='. - * ESS[R]: 'M-x R-site-search' is a new (slightly experimental) - utility similar to R's 'RSiteSearch(..)' but with the advantage of - using Emacs' preferred browser, see 'browse-url-browser-function' - - Changes/New Features in 5.3.0: - * ESS[BUGS]: sanely re-format statistical output, '.bog', from - scientific notation to numbers rounded with 4 decimal places with - 'M-x ess-bugs-sci-round-to-4-dp'. - * The keys for navigating among section headings in help buffers - worked, but only for one language per session; they should now work - for multiple languages. (They were also broken on Windows - machines.) - * ESS[S] long standing buglets in the internal logic for loading lisp - code on Windows. Particularly fixed behavior in help mode with - S-plus GUI. - * New variable, 'ess-use-inferior-program-name-in-buffer-name', which - enables using the executable name instead of the dialect name for - R. Feature request. - * ESS[S] 'ess-execute-screen-options' now also works correctly when - there is more than one window *side-by-side* in the same frame and - runs in the correct buffer also when there is more than one S - buffer. - * iESS[S] new functions 'ess-eval-paragraph-and-step' and - 'ess-eval-function-or-paragraph-and-step' are bound to keys 'C-c - C-p' and 'C-c C-c' respectively and to the menu in ESS-mode; also - bound in the help mode (for evaluating examples). - * ESS[S] new function 'ess-toggle-S-assign-key' allows to assign the - " <- " insertion to an arbitrary key. - - Changes/New Features in 5.2.12: - * ESS[SAS]: 'M-;' fixed, but the XEmacs function 'comment-dwim' may - be broken, if so, use 'M-x comment-region' and 'M-x - uncomment-region' instead; only valid PROCs are fontified which is - very helpful finding syntax errors (currently supported: BASE, ETS, - FSP, GRAPH, IML, INSIGHT and STAT); the "feature" where 'F'-keys - take you to an empty buffer when the requested destination is a - file that does not exist has been fixed, now the request results in - a no-op. Further, sas-mode now also works in simple terminals. - * Rterm/Cygwin combination works under Microsoft Windows. - * ESS[R]: internal calls use baseenv() instead of NULL and define - 'baseenv' where needed. - * New experimental support for installing ESS. See the file - 'lisp/ess-install.el'. - - Changes/New Features in 5.2.11: - * ESS Info entry and 'dir' handled more effectively for GNU Emacs - users - * ESS[SAS]: temporary files created for batch submission of a region - are now named based on the current file; see 'ess-sas-file-root' - for details; all 'lag' and 'dif' functions now fontified correctly - * iESS[SAS]: fixed a few nagging bugs, however, still does not appear - to work at this time; please let us know if you have any ideas. - * ESS[S]: Support for running other versions of Splus has been added - for unix. Two new variables, 'ess-s-versions' and - 'ess-s-versions-list', are used to tell ESS what other versions of - Splus you would like to run. - - Changes/New Features in 5.2.10: - * ESS[R]: ess-r-versions can no longer be customized (since the - customization was not taking effect unless customizations were - loaded before ESS). Its value has been changed so that it will also - find R executables beginning "R-devel" and "R-patched". If you - wish to change this variable, it must be set in your '.emacs' - before ESS is loaded. - * Installation with GNU Make enhanced: unix and unix-like operating - systems will now be able to install ESS for all users in either a - GNU Emacs site-lisp or an XEmacs package configuration by editing - 'lisp/ess-site.el' and 'Makeconf' accordingly, then issuing 'make - install' - * ESS[S]: Filename completion (inside strings) now also works in - XEmacs for R and S-plus. - - Changes/New Features in 5.2.9: - * ESS[R] for Windows: the \ directory character bug with respect to - ess-load-file has been eradicated. - * iESS[SAS]: 'C-c C-r' and 'C-c C-b' once again work as intended and - documented. - * ESS[S]: M-x ess-fix-EQ-assign is a bit more agressive. - * ESS[S]: Imenu now also shows setAs(), etc. - * ESS[R]: R function pattern enhanced with underlying code such that - 'M-C-a' ('ess-beginning-of-function') etc now work for many more - cases, including S4 method definitions. - * iESS[R]: myOwnhelp(1) no longer wrongly triggers help(1). - * ESS[R]: Improved detection of bogus help buffers: valid help - buffers containing with the string "no documentation"(e.g. - contour) were being treated as bogus. - * ESS[R]: In R help buffers, if 'options("help.try.all.packages" = - TRUE)' then '?rlm' will list which packages rlm is defined in. - This help buffer is not bogus, but instead is now relabelled - "*help[R](rlm in packages)*". - * ESS[STA]: add "//" as comment starting character to syntax-table. - - Changes/New Features in 5.2.8: - * iESS: [Tab] completes *file* names "inside string" as in earlier - (<= 5.2.3) ESS versions. - - Changes/New Features in 5.2.7: - * If you use Custom to change the variable ess-toolbar-items, the new - toolbar is used in all subsequent ESS buffers. - * ESS[SAS]: new feature: if ess-sas-log-max >0 and your .log grows to - more than ess-sas-log-max bytes, just the first ess-sas-log-max - bytes are refreshed; this is helpful when your .sas program - generates lots of error messages and gets too big for emacs to - display - * ESS[R/S]: 'M-;' in R/S editing modes will now indent with either - one or two hashes depending on context. - * ESS[R]: David Whiting's Sweave extensions (to 'noweb') are now - available (from ess-swv.el loaded by default). - - Changes/New Features in 5.2.6: - * Removed non-ASCII characters in a few files. - * ESS[R]: now works better when UTF-8 locale is active; in - particular, you get correct directional quotes in R's startup - message for R-devel (unstable development version of R 2.1.0) when - using environment variables LANGUAGE=en@quot LC_ALL=en_US.UTF-8 - * ESS[SAS]: toggling of .log mode improved ('F10'); toggling of .lst - mode now also available ('C-F10'); killing all buffers associated - with .sas program no longer bound to 'C-F10' since its a bit - overzealous. - * S-Plus 7 for Windows is now recognized. - * ESS[S] (incl. R): in auto-fill mode, strings are not wrapped - anymore. - * ESS[S] (incl. R): font-lock now correctly differs between R and S, - e.g., for "_"; both now fontify warning(.) and S does terminate() - additionally. - * Support for 'bell' aka 'beep' aka 'ding' aka 'alarm' in all - inferior modes: When \a is output "to the the console" at the - beginning of a line, the bell is rung. - - Changes/New Features in 5.2.5: - * ESS[R]: 'C-c C-q' or 'Quit S' from the menu now should work (again - and less klunkily) and do not append '-exited' to the buffer name. - Further, the behavior of '(ess-cleanup)', called from ess-quit, now - depends on the new customizable variable - 'ess-S-quit-kill-buffers-p' which defaults to 'nil'. Consequently, - the question _"Delete all buffers associated with ..?"_ will not - be asked anymore by default. - * ESS[SAS] - ess-ebcdic-to-ascii-search-and-replace will now work - with the 'recode' application as well which is available on many - platforms - * ESS[S] (incl. R): Name completion for slots of S4 objects now - works! - - Changes/New Features in 5.2.4: - * The documentation now includes an overview of how to use the emacs - TAGS facility for S functions. (The distribution also used to - contain a directory 'etc/other/Tags' where a ~1990 version of - 'etags.c' was distributed; this is no longer relevant and so has - been deleted.) - * ESS[SAS] - When you are working with EBCDIC files on an ASCII - platform, .log NOTEs may display as gibberish since the EBCDIC - characters are not converted to ASCII prior to their display. So, - the function ess-ebcdic-to-ascii-search-and-replace is provided for - convenience and is bound to 'C-F11'. This function requires the - 'dd' command (only available on unix or unix-like platforms). - * ESS: Completion of object names is now always done dynamically - rather than allowing the option of using a pre-computed database - (by 'ess-create-object-name-db') since modern computers seem fast - enough for dynamic completion. (We expect few users, if any, have - been using the pre-computed database method.) - * ESS: object completion in iESS buffers running on Windows was very - slow (for GNU Emacs, but not XEmacs) and has now been fixed. - Further, it was more or less broken for all versions of S-plus 6.x, - and has been fixed to work everywhere but with the Windows' GUI of - S-plus. The list of objects now shows unique names also when an - object appears more than once in the search path. - * ESS[R]: Completion of object names now also includes those starting - with ".". - - Changes/New Features in 5.2.3: - * ESS: When new inferior ESS processes are created, by default they - will replace the current buffer (this restores behavior from pre - 5.2.0). If you wish new ESS processes to start in another window - of the current frame, set inferior-ess-same-window to nil. - * New variables inferior-Splus-args and inferior-R-args provide a way - to pass command line arguments to starting S and R processes. - - Changes/New Features in 5.2.2: - * bug-fixes for 5.2.1 (require 'executable), html docs, etc. - * ess-lisp-directory/../doc/info added to Info-directory-list if - ess-info not found by info - * ESS[R]: If you have other versions of R on your exec-path, such as - "R-1.8.1" with Unix or "rw1081" with Windows, ESS will find them - and create appropriate functions, such as 'M-x R-1.8.1' or 'M-x - rw1081', for calling them. By default only Unix programs beginning - "R-1" and "R-2" and Windows programs parallel to the version of R - in your exec-path will be found, but see ess-r-versions and - ess-rterm-versions for ways to find other versions of R. - * ESS[R]: Other versions of R, such as "R-1.8.1" on Unix and "rw1081" - on Windows, are added to the "ESS / Start Process / Other" menu. - * ESS[S]: If you have other versions of S-Plus on your Windows - computer, such as S-Plus 6.1 or S-Plus 4.5, ESS will find them and - create appropriate functions, such as 'M-x splus61', for calling - the console version (Sqpe) inside an emacs buffer. By default only - programs installed in the default location will be found, but see - ess-SHOME-versions for ways to find other versions of S-Plus. - * ESS[S]: Other versions of Sqpe on Windows, such as "splus61", are - added to the "ESS / Start Process / Other" menu. - * ESS[R]: (bug fix) ess-quit (bound to 'C-c C-q') should now quit the - inferior R process, when issued from either the inferior buffer, or - from a .R buffer. - - Changes/New Features in 5.2.1: - * ESS[S] (R and S-plus): now have toolbar support with icons to - evaluate code in the inferior process or to switch there. This - code is experimental and likely to change as XEmacs/Emacs issues - get resolved. The toolbar should be enabled if your Emacs displays - images, but can be disabled with the variable ess-use-toolbar. - Thanks to David Smith from Insightful for the S-plus logo. - * ESS[SAS]: ess-sas-graph-view ('F12') enhanced; you can specify - external file viewers for each graphics file type via the alist - ess-sas-graph-view-viewer-alist; also .jpg/.gif are now handled by - image-mode on XEmacs, if available, otherwise by graphics - primitives as before - - Changes/New Features in 5.2.0: - * ESS[BUGS]: new info documentation! now supports interactive - processing thanks to Aki Vehtari (mailto:Aki.Vehtari@hut.fi); new - architecture-independent unix support as well as support for BUGS - v. 0.5 - * ESS[SAS]: convert .log to .sas with ess-sas-transcript; info - documentation improved; Local Variable bug fixes; SAS/IML - statements/functions now highlighted; files edited remotely by - ange-ftp/EFS/tramp are recognized and pressing SUBMIT opens a - buffer on the remote host via the local variable - ess-sas-shell-buffer-remote-init which defaults to "ssh"; changed - the definition of the variable ess-sas-edit-keys-toggle to boolean - rather than 0/1; added the function ess-electric-run-semicolon - which automatically reverse indents lines containing only "run;"; - 'C-F1' creates MS RTF portrait from the current buffer; 'C-F2' - creates MS RTF landscape from the current buffer; 'C-F9' opens a - SAS DATASET with PROC INSIGHT rather than PROC FSVIEW; "inferior" - aliases for SAS batch: 'C-c C-r' for submit region, 'C-c C-b' for - submit buffer, 'C-c C-x' for goto .log; 'C-c C-y' for goto .lst - * ESS[S]: Pressing underscore ("_") once inserts " <- " (as before); - pressing underscore twice inserts a literal underscore. To stop - this smart behaviour, add "(ess-toggle-underscore nil)" to your - .emacs after ess-site has been loaded; - ess-dump-filename-template-proto (new name!) now can be customized - successfully (for S language dialects); Support for Imenu has been - improved; set ess-imenu-use-S to non-nil to get an "Imenu-S" item - on your menubar; ess-help: Now using nice underlines (instead of - 'nuke-* ^H_') - * ESS[R]: After (require 'essa-r), 'M-x ess-r-var' allows to load - numbers from any Emacs buffer into an existing *R* process; 'M-x - ess-rdired' gives a "directory editor" of R objects; fixed - ess-retr-lastvalue-command, i.e. .Last.value bug (thanks to David - Brahm) - * ESS: Support for creating new window frames has been added to ESS. - Inferior ESS processes can be created in dedicated frames by - setting inferior-ess-own-frame to t. ESS help buffers can also - open in new frames; see the documentation for ess-help-own-frame - for details. (Thanks to Kevin Rodgers for contributing code.) - - Changes/New Features in 5.1.24: - * The version number is now correct even inside ESS/Emacs - - Changes/New Features in 5.1.23: - * Minor more Makefile clean up. - - Changes/New Features in 5.1.22: - * Besides info documentation, PDF and HTML documentation are also - provided (instead of built using "make") and available on the web - as well; see ESS web page (https://ess.r-project.org/) and StatLib - (http://lib.stat.cmu.edu/general/ESS/doc) - * Now that info documentation is available, the README.* files are no - longer supported. However, they are still distributed for what - it's worth. - * ESS is now an XEmacs package! See XEmacs Installation HOWTO - (https://www.xemacs.org/Install/index.html) for details - (specifically, items 10-15). - * ESS[SAS]: more user-friendly enhancements for remote SAS batch jobs - with Kermit file transfers (LOG and OUTPUT function key features - now supported). Multiple shells now supported so you can run SAS - on different computers from different buffers by setting the - buffer-local variable ess-sas-shell-buffer to unique buffer names. - * Major re-vamping of Makefile/Makeconf. - - Changes/New Features in 5.1.21: - * ESS[SAS]: info documentation now available!, see ESS->Help for SAS; - 'F12' opens GSASFILE nearest point for viewing either within emacs, - when available, or via an external viewer; more syntax highlighting - keywords; more enhancements for remote SAS batch jobs with Kermit; - new framework for remote SAS interactive jobs, see ess-remote - * ESS[S]: info documentation now available!, see ESS->Help for the S - family - * Makefile: tag now independent of rel; info files made by - doc/Makefile and installed in new info sub-directory - - Changes/New Features in 5.1.20: - * New 'options()$STERM' in the S dialects (S, S-Plus, R). The S - program can determine the environment in which it is currently - running. ESS sets the option to 'iESS' or 'ddeESS' when it starts - an S language process. We recommend other specific values for S - language processes that ESS does not start. - * New 'ess-mouse-me' function, assigned to S-mouse-3 by default. - User may click on a word or region and then choose from the menu to - display the item, or a summary, or a plot, etc. This feature is - still under development. - * GNU Emacs 21.1 is now supported (fixed for S dialects, SAS & BUGS), - (some from Stephen Eglen). - * XEmacs 21.x is now supported (fixed w32-using-nt bug) - * XEmacs on Win (NT) is better supported. - * Workaround for bug in Sqpe+6 (S-PLUS 6 for Win). - * should now work even when imenu is not available (for old - XEmacsen). - * ESS[SAS]: XEmacs-Imenu fix; 'C-TAB' is globalized along with your - function-key definitions, if specified; you can specify your SAS - library definitions outside of autoexec.sas for ess-sas-data-view - with SAS code placed in the variable ess-sas-data-view-libname, - also the dataset name is defaulted to the nearest permanent dataset - to point; Speedbar support now works for permanent datasets, please - ignore first./last.; new font-locking is now the default with more - improvements for font-locking PROCs, macro statements, * ; and %* ; - comments; you can toggle sas-log-mode with 'F10' which will - font-lock your .log (if it isn't too big); submit remote .sas files - accessed with ange-ftp, EFS or Tramp (Kermit is experimental) by - setting ess-sas-submit-method to 'sh; ess-sas-submit-command and - ess-sas-submit-command-options are buffer-local so you can have - local file variable sections at the end of your .sas files to - request different executables or specify special options and the - local file variables are re-read at submit instead of only at file - open so that if you make a change it is picked up immediately; - * ESS[BUGS]: font-lock with 'in' fixed. - * for STATA: font-lock bug fixed. - * for Rd mode: 'C-c C-v' and 'switch-process' in menu. further, 'C-c - C-f' prefix (Rd-font) for inserting or surrounding a word by things - such as \code{.}, \code{\link{.}}, \emph{.} etc. - * new functions (ess-directory-function) and (ess-narrow-to-defun) - ess-directory <-> default-directory logic (Jeff Mincy). - * Re-organized Makefile and fixed a few bugs. - - Changes/New Features in 5.1.19: - * S+6 now supported (Tony Rossini (Unix) and Rich Heiberger - (Windows)) - * New BUGS support through ESS[BUGS] mode (Rodney Sparapani) - Templates assist you in writing .bug and .cmd code (.cmd and .log - are replaced by .bmd and .bog to avoid emacs extension collisions). - Substitution" parameters facilitate "automagic" generation of - data...in" and "init...in" filenames, "const N=" from your data - file and "monitor()/stats()" commands. Activated by pressing - 'F12'. - * Fixes for 'ess-smart-underscore' SAS breakage (Rich Heiberger) - * You can change between PC and Unix, local and global SAS - function-key definitions interactively (Rich Heiberger) - * 'C-Submit' a highlighted region to SAS batch (Rodney Sparapani) - * New and improved SAS syntax highlighting (Rodney Sparapani) To get - the new functionality, set ess-sas-run-make-regexp to nil. Also - available in .log files via 'F10'. - * Open a permanent SAS dataset for viewing via 'F9' (Rodney - Sparapani) You must have the library defined in autoexec.sas for it - to work. - * User-friendly defaults for 'sas-program', - 'ess-sas-batch-pre-command' and 'ess-sas-batch-post-command' as - well Customize support for these and other ESS[SAS] variables - (Rodney Sparapani) - * 'ess-sas-suffix-2' now defaults to .dat via 'F11' (Rodney - Sparapani) - * Emacs/XEmacs, Unix/Windows issues collectively handled in - ess-emcs.el - * defadvice solves problem of missing *ESS* (thanks to Jeff Mincy) - * Improved manual a bit by including things that were only in - 'README'. - - Changes/New Features in 5.1.18: - * New 'ess-smart-underscore' function, now assigned to "_" by - default. Inserts 'ess-S-assign' (customizable " <- "), unless - inside string and comments where plain "_" is used instead. (MM) - * Fixes for longstanding interactive SAS breakage (RMH) - - Changes/New Features in 5.1.17: - * Documentation for Windows Installation (Rich Heiberger) - * removal of ess-vars, finalization of customize support (in the - sense that there is no more use of ess-vars, but that we need to - fix ess-cust) (AJ Rossini) - * Many small (and large) fixes/contributions (MMaechler) - * addition of the "S-equal" variable and provide 'M-x - ess-add-MM-keys' a way to remap "_" to 'ess-S-assign', typically " - <- ", but customizable. (MMaechler) - - Changes/New Features in 5.1.16: - * BUG FIXES - * Better SAS support - - Changes/New Features in 5.1.15: - * BUG FIXES - - Changes/New Features in 5.1.14: - * Yet more fixes to SAS mode, (Rich Heiberger and Rodney Sparapani) - * Customize support (for most Emacsen which support it) (AJRossini) - * ARC and ViSta support out of the box, and fixes for XLispStat - (AJRossini) - - Changes/New Features in 5.1.13: - * Version numbering finally all depending on the ./VERSION file, - thanks to Martin Maechler. - * Yet more fixes to SAS mode, thanks to Rich Heiberger. - - Changes/New Features in 5.1.12: - * Splus 5.1 stabilized, thanks to Martin Maechler, Bill Venables, - Chuck Taylor, and others. - * More fixes to SAS mode, thanks to Rodney Sparapani and Rich - Heiberger. - - Changes/New Features in 5.1.11: - * More fixes to Stata mode, thanks to Brendan Halpin - (mailto:brendan@essex.ac.uk). - * fixed bugs in ESS-elsewhere, thanks to many testers - * README.SPLUS4WIN has DETAILED instructions for S-PLUS 2000, thanks - to David Brahm (mailto:brahm@alum.mit.edu). - * Fixes to SAS mode, thanks to Rodney Sparapani - - Changes/New Features in 5.1.10: - * More fixes to Stata mode - * primitive generic version of ESS-elsewhere - * Small fixes to SAS/Stata. - - Changes/New Features in 5.1.9: - * Stata mode works - * Literate Data Analysis using Noweb works - - Changes/New Features in 5.1.8: - * Bug fixes - * R documentation mode defaults changed - - Changes/New Features in 5.1.2: - * able to use inferior iESS mode to communicate directly with a - running S-Plus 4.x process using the Microsoft DDE protocol. We - use the familiar (from Unix ESS) 'C-c C-n' and related key - sequences to send lines from the S-mode file to the inferior S - process. We continue to edit S input files in ESS[S] mode and - transcripts of previous S sessions in ESS Transcript mode. All - three modes know the S language, syntax, and indentation patterns - and provide the syntactic highlighting that eases the programming - tasks. - - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/announc.info b/elpa/ess-20191014.1343/announc.info deleted file mode 100644 index d2d23aef..00000000 --- a/elpa/ess-20191014.1343/announc.info +++ /dev/null @@ -1,735 +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: . '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 ; contributions -to the list may be mailed to . 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 , -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]: 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 - -mode-hook and -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. See - *Note (ess)Controlling buffer display:: for more information and - examples. - - * '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. - - * 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. - - 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 , - , or markdown-mode with edit-indirect - . - - * 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" )' 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. *Note (ess)Activating and Loading ESS:: for more - information on this feature. - - * 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 diff --git a/elpa/ess-20191014.1343/authors.info b/elpa/ess-20191014.1343/authors.info deleted file mode 100644 index 9db52814..00000000 --- a/elpa/ess-20191014.1343/authors.info +++ /dev/null @@ -1,19 +0,0 @@ -This is authors.info, produced by makeinfo version 6.5 from -authors.texi. - - * 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: - -End Tag Table diff --git a/elpa/ess-20191014.1343/bugrept.info b/elpa/ess-20191014.1343/bugrept.info deleted file mode 100644 index 0da6c159..00000000 --- a/elpa/ess-20191014.1343/bugrept.info +++ /dev/null @@ -1,26 +0,0 @@ -This is bugrept.info, produced by makeinfo version 6.5 from -bugrept.texi. - -Please send bug reports, suggestions etc. to , -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. - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/credits.info b/elpa/ess-20191014.1343/credits.info deleted file mode 100644 index 254e77f4..00000000 --- a/elpa/ess-20191014.1343/credits.info +++ /dev/null @@ -1,81 +0,0 @@ -This is credits.info, produced by makeinfo version 6.5 from -credits.texi. - -The ESS environment is built on the open-source projects of many -contributors, dating back to 1989 where Doug Bates and Ed Kademan wrote -S-mode to edit S and Splus files in GNU Emacs. Frank Ritter and Mike -Meyer added features, creating version 2. Meyer and David Smith made -further contributions, creating version 3. For version 4, David Smith -provided significant enhancements to allow for powerful process -interaction. - - John Sall wrote GNU Emacs macros for SAS source code around 1990. -Tom Cook added functions to submit jobs, review listing and log files, -and produce basic views of a dataset, thus creating a SAS-mode which was -distributed in 1994. - - In 1994, A.J. Rossini extended S-mode to support XEmacs. Together -with extensions written by Martin Maechler, this became version 4.7 and -supported S, Splus, and R. In 1995, Rossini extended SAS-mode to work -with XEmacs. - - In 1997, Rossini merged S-mode and SAS-mode into a single Emacs -package for statistical programming; the product of this marriage was -called ESS version 5. Richard M. Heiberger designed the inferior mode -for interactive SAS and SAS-mode was further integrated into ESS. Thomas -Lumley's Stata mode, written around 1996, was also folded into ESS. More -changes were made to support additional statistical languages, -particularly XLispStat. - - ESS initially worked only with Unix statistics packages that used -standard-input and standard-output for both the command-line interface -and batch processing. ESS could not communicate with statistical -packages that did not use this protocol. This changed in 1998 when -Brian Ripley demonstrated use of the Windows Dynamic Data Exchange (DDE) -protocol with ESS. Heiberger then used DDE to provide interactive -interfaces for Windows versions of Splus. In 1999, Rodney A. Sparapani -and Heiberger implemented SAS batch for ESS relying on files, rather -than standard-input/standard-output, for Unix, Windows and Mac. In -2001, Sparapani added BUGS batch file processing to ESS for Unix and -Windows. - - * The multiple process code, and the idea for - 'ess-eval-line-and-next-line' are by Rod Ball. - - * Thanks to Doug Bates for many useful suggestions. - - * Thanks to Martin Maechler for reporting and fixing bugs, providing - many useful comments and suggestions, and for maintaining the ESS - mailing lists. - - * Thanks to Frank Ritter for updates, particularly the menu code, and - invaluable comments on the manual. - - * Thanks to Ken'ichi Shibayama for his excellent indenting code, and - many comments and suggestions. - - * Thanks to Aki Vehtari for adding interactive BUGS support. - - * Thanks to Brendan Halpin for bug-fixes and updates to Stata-mode. - - * Last, but definitely not least, thanks to the many ESS users and - contributors to the ESS mailing lists. - - _ESS_ is being developed and currently maintained by - - * 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: - -End Tag Table diff --git a/elpa/ess-20191014.1343/currfeat.info b/elpa/ess-20191014.1343/currfeat.info deleted file mode 100644 index 63300d7c..00000000 --- a/elpa/ess-20191014.1343/currfeat.info +++ /dev/null @@ -1,42 +0,0 @@ -This is currfeat.info, produced by makeinfo version 6.5 from -currfeat.texi. - - * 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 - - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/ess-defs.info b/elpa/ess-20191014.1343/ess-defs.info deleted file mode 100644 index a094c828..00000000 --- a/elpa/ess-20191014.1343/ess-defs.info +++ /dev/null @@ -1,8 +0,0 @@ -This is ess-defs.info, produced by makeinfo version 6.5 from -ess-defs.texi. - - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/ess-r-xref.el b/elpa/ess-20191014.1343/ess-r-xref.el deleted file mode 100644 index c0e40e7d..00000000 --- a/elpa/ess-20191014.1343/ess-r-xref.el +++ /dev/null @@ -1,131 +0,0 @@ -;;; ess-r-xref.el --- An xref backend for R. -*- lexical-binding: t -*- -;; -;; Author: Aaron Jacobs -;; Created: 21 January 2018 -;; Maintainer: ESS-core -;; -;; Keywords: languages, statistics, xref -;; -;; This file is part of ESS. -;; -;; This file 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. -;; -;; This file 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 for more details. -;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;;; Commentary: - -;; This file contains an xref backend for `ess-r-mode'. - -;;; Code: - -(require 'xref) -(require 'ess-inf) -(require 'ess-r-package) -(require 'ess-tracebug) - -;; Silence the byte compiler. OK because this file is only loaded by ess-r-mode. -(declare-function inferior-ess-r-force "ess-r-mode") - - -(defvar ess-r-xref-pkg-sources nil - "Alist of R package->directory associations. -This variable is used as a cache of package->directory -associations, but could be used by the users for a more refined -control of package locations than `ess-r-package-library-paths'.") - -(defun ess-r-xref-backend () - "An `xref-backend-functions' implementation for `ess-r-mode'. -R's xref backend searches for `ess-r-package-library-paths' when -srcrefs point to temporary locations." - 'ess-r) - -(cl-defmethod xref-backend-identifier-at-point ((_backend (eql ess-r))) - (let ((sym (ess-symbol-at-point))) - (when sym - (symbol-name sym)))) - -(cl-defmethod xref-backend-definitions ((_backend (eql ess-r)) symbol) - (let ((xref (ess-r-xref--xref symbol))) - (when xref - (list xref)))) - -(cl-defmethod xref-backend-apropos ((_backend (eql ess-r))) - ;; Not yet supported. - nil) - -(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql ess-r))) - (inferior-ess-r-force) - (ess-get-words-from-vector ".ess_all_functions()\n")) - -(defun ess-r-xref--srcref (symbol) - (inferior-ess-r-force) - ;; Look for `symbol' inside the package namespace - (let* ((pkg (ess-r-package-name)) - (pkg (if pkg - (concat "\"" pkg "\"") - "NULL"))) - (with-current-buffer (ess-command (format ".ess_srcref(\"%s\", %s)\n" symbol pkg)) - (goto-char (point-min)) - (when (re-search-forward "(" nil 'noerror) - (goto-char (match-beginning 0)) - (read (current-buffer)))))) - -(defun ess-r-xref--pkg-srcfile (symbol r-src-file) - "Look in the source directory of the R package containing symbol SYMBOL for R-SRC-FILE." - (let* ((env-name (ess-string-command (format ".ess_fn_pkg(\"%s\")\n" symbol))) - (pkg (if (string-equal env-name "") - (user-error "Can't find package for symbol %s" symbol) - env-name)) - (dir (or (assoc-default pkg ess-r-xref-pkg-sources) - (cond ((stringp ess-r-package-library-paths) - (expand-file-name pkg ess-r-package-library-paths)) - ((listp ess-r-package-library-paths) - (cl-loop for d in ess-r-package-library-paths - for p = (expand-file-name pkg d) - when (file-exists-p p) return p)) - (t (user-error "Invalid value of `ess-r-package-library-paths'"))))) - (file (when dir (expand-file-name r-src-file dir)))) - (when file - (unless (file-readable-p file) - (user-error "Can't read %s" file)) - ;; Cache package's source directory. - (unless (assoc pkg ess-r-xref-pkg-sources) - (push `(,pkg . ,dir) ess-r-xref-pkg-sources)) - file))) - -(defun ess-r-xref--xref (symbol) - "Create an xref for the source file reference of R symbol SYMBOL." - (let ((ref (ess-r-xref--srcref symbol))) - (when ref - (let ((file (nth 0 ref)) - (line (nth 1 ref)) - (col (nth 2 ref))) - (or - ;; 1) Result of ESS evaluation - (let* ((ess-ref (gethash file ess--srcrefs)) - (ess-buff (when ess-ref (ess--dbg-find-buffer (car ess-ref))))) - (when ess-buff - ;; FIXME: this breaks when eval is on larger spans than function - (xref-make symbol (xref-make-buffer-location ess-buff (nth 2 ess-ref))))) - ;; 2) Actual file location - (when (file-readable-p file) - (xref-make symbol (xref-make-file-location file line col))) - ;; 3) Temporary sources - truncate and locate in ess-r-package-library-paths - (when (string-match "/\\(R/.*\\)$" file) - (let ((pkg-file (ess-r-xref--pkg-srcfile symbol (match-string 1 file)))) - (when pkg-file - (xref-make symbol (xref-make-file-location - (expand-file-name pkg-file) line col)))))))))) - -(provide 'ess-r-xref) - -;;; ess-r-xref.el ends here diff --git a/elpa/ess-20191014.1343/ess-stata-lang.el b/elpa/ess-20191014.1343/ess-stata-lang.el deleted file mode 100644 index a3360b53..00000000 --- a/elpa/ess-20191014.1343/ess-stata-lang.el +++ /dev/null @@ -1,1219 +0,0 @@ -;;; ess-stata-lang.el --- Stata customization -*- lexical-binding: t; -*- - -;; Copyright (C) 1999--2000, Thomas Lumley, A. J. Rossini, Brendan Halpin. -;; Copyright (C) 1997--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - -;; Author: Thomas Lumley , -;; Brendan Halpin -;; Created: 2 Nov 1997 -;; Maintainer: ESS-core - -;; Keywords: languages - -;; This file is part of ESS (Emacs Speaks Statistics). - -;; This file 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. - -;; This file 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;;; Commentary: - -;; This is based upon Version 0.4 of Stata mode. - -;; Stata modes. Emacs modes for using the Stata statistical package -;; Modified from S-mode, comint-mode -;; -;; (c) Thomas Lumley 1997 -;; -;; version 0.4 20/7/97 -;; -;; This file 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. -;; -;; (for the GNU GPL see above) - - -;;; Code: - -(declare-function ess-help-mode "ess-help") - -(require 'make-regexp) ; it's now local to the directory. -;;(load-library "make-regexp") ;; this is necessary for -;; ado-set-font-lock-keywords -;; only needed in Emacs >= 22.x -(require 'comint) -(require 'ess-trns) - -(defconst ess-help-STA-sec-keys-alist - '((?d . "Description") - (?e . "Examples") - (?o . "Options") - (?s . "Also see") - (?S . "Syntax") - (?r . "Remarks") - (?t . "Title")) - "Help section keys. -`key' indicates the keystroke to use to search for the section heading -`string' in an Stata help file. `string' is used as part of a -regexp-search, and so specials should be quoted. -") - -(defconst ess-help-STA-sec-regex "^[A-Z a-z]+:?\n-+\\|http:" - "Reg(ular) Ex(pression) of section headers in help file.") - -(defun ado-set-font-lock-keywords () - "Create font lock keywords for Stata syntax. This is from the -ado-mode of Bill Rising , and uses make-regexp." - ;; (make-local-variable 'ado-font-lock-keywords) - (interactive) - (list - ;; special highlighting - ;; program definitions - (eval-when-compile - (make-regexps - '(("^\\*!.*") font-lock-keyword-face) - )) - (eval-when-compile - (make-regexps - "^" - '(( - "pr" "pro" "prog" "progr" "progra" "program" - ) font-lock-keyword-face) - "[ \t]+" - '(( - "de" "def" "defi" "defin" "define" - "di" "dir" - "drop" - "l" "li" "lis" "list" - ) font-lock-type-face nil) - "[ \t]+" - '(("[_a-z]+[_a-z0-9]*") font-lock-keyword-face nil) - )) - (eval-when-compile - (make-regexps - '(("^[ \t]*version") font-lock-reference-face) - "[ \t]*" - '(("1.0 2.0 2.1 3.0 3.1 4.0 5.0 6 6.0") font-lock-type-face) - )) - (eval-when-compile - (make-regexps - "^" - '(("end" "pause" - ) font-lock-keyword-face) - "[ /t]*.*$" - )) - ;; delimit command - (eval-when-compile - (make-regexps - '(("^[ \t]*#delimit") font-lock-reference-face) - "\\s-*" - '(("\\(cr\\|;\\)\\s-*$") font-lock-type-face nil) - )) - ;; set command (with endless options!) - (eval-when-compile - (make-regexps - '(("^[ \t]*set") font-lock-reference-face) - "[ \t]+" - '(("adosize" "ANSI" - "b" "be" "bee" "beep" "checksum" "contents" - "d" "di" "dis" "disp" "displ" "displa" "display" - "g" "gr" "gra" "grap" "graph" "graphi" "graphic" "graphics" - "help" - "IBM" - "l" "le" "lev" "leve" "level" - "linesize" - "lo" "log" - "mat" "mats" "matsi" "matsiz" "matsize" - "maxobs" "maxvar" - "mem" "memo" "memor" "memory" - "mo" "mor" "more" - "obs" - "ou" "out" "outp" "outpu" "output" - "pagesize" - "r" "rm" "rms" "rmsg" - "se" "see" "seed" "seed0" "shell" - "te" "tex" "text" "texts" "textsi" "textsiz" "textsize" - "tr" "tra" "trac" "trace" - "t" "ty" "typ" "type" "video" - "vir" "virt" "virtu" "virtua" "virtual" - ) - font-lock-reference-face t) - "[ \t]*" - '(("[a-zA-Z0-9]*") font-lock-type-face) - )) - ;; the constraint commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "cons" "const" "constr" "constra" "constrai" "constrain" "constraint" - ) font-lock-reference-face) - "[ \t]+" - '(( - "d" - "de" "def" "defi" "defin" "define" - "di" "dir" - "drop" - "l" "li" "lis" "list" - ) - font-lock-type-face) - "\\b" - )) - ;; the confirm commands - could be a mess! - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "conf" "confi" "confir" "confirm" - ) font-lock-reference-face) - "[ \t]+" - '(( - "e" "ex" "exi" "exis" "exist" "existe" "existen" "existenc" "existence" - "f" "fi" "fil" "file" - "n" "nu" "num" "numb" "numbe" "number" - "v" "va" "var" "vari" "varia" "variab" "variabl" "variable" - ) font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "conf" "confi" "confir" "confirm" - ) font-lock-reference-face) - "[ \t]+" - '(( - "integer" - ) font-lock-type-face) - "[ \t]+" - '(( - "n" "nu" "num" "numb" "numbe" "number" - ) font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "conf" "confi" "confir" "confirm" - ) font-lock-reference-face) - "[ \t]+" - '(( - "n" "ne" "new" - ) font-lock-type-face) - "[ \t]+" - '(( - "f" "fi" "fil" "file" - "v" "va" "var" "vari" "varia" "variab" "variabl" "variable" - ) font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "conf" "confi" "confir" "confirm" - ) font-lock-reference-face) - "[ \t]+" - '(( - "byte" "double" "float" "int" "long" - "numeric" - "str" "stri" "strin" "string" - ) font-lock-type-face) - "[ \t]+" - '(( - "v" "va" "var" "vari" "varia" "variab" "variabl" "variable" - ) font-lock-type-face) - "\\b" - )) - ;;; the str# won't quite look right, but that's the breaks for using - ;;; a tool like this... - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "conf" "confi" "confir" "confirm" - ) font-lock-reference-face) - "[ \t]+" - '(( - "str" - ) font-lock-type-face) - "[1-9]+[0-9]*[ \t]+" - '(( - "v" "va" "var" "vari" "varia" "variab" "variabl" "variable" - ) font-lock-type-face) - "\\b" - )) - ;; the estimates commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "est" "esti" "estim" "estima" "estimat" "estimate" "estimates" - ) font-lock-reference-face) - "[ \t]+" - '(( - "clear" - "di" "dir" "dis" "disp" "displ" "displa" "display" - "drop" - "h" "ho" "hol" "hold" - "li" "lis" "list" - "loc" "loca" "local" - "mat" "matr" "matri" "matrix" - "post" - "repost" - "sca" "scal" "scala" "scalar" - "u" "un" "unh" "unho" "unhol" "unhold" - ) - font-lock-type-face) - "\\b" - )) - ;; the gph commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "gph" - ) font-lock-reference-face) - "[ \t]+" - '(( - "arc" - "box" - "clear" "close" - "font" - "line" - "open" - "pen" "point" - "text" - "vline" "vpoint" "vpoly" "vtext" - ) - font-lock-type-face) - "\\b" - )) - - ;; some of the matrix commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("mat" "matr" "matri" "matrix") font-lock-reference-face) - "[ \t]+" - '(("ac" "acc" "accu" "accum" - "cole" "coleq" - "coln" "colna" "colnam" "cloname" "colnames" - "d" "def" "defi" "defin" "define" - "di" "dir" "dispCns" "drop" "drop _all" - "glsa" "glsac" "glsacc" "glsaccu" "glsaccum" - "l" "li" "lis" "list" "makeCns" "mlou" "mlout" "post" - "rowe" "roweq" - "rown" "rowna" "rownam" "rowname" "rownames" - "sco" "scor" "score" - "sub" "subs" "subst" "substi" "substit" "substitu" "substitut" "substitute" - "svd" "syme" "symei" "symeig" "symeige" "symeigen" - "veca" "vecac" "vecacc" "vecaccu" "vecaccum" - ) - font-lock-type-face) - "\\b" - )) - ;; the ml commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("ml") font-lock-reference-face) - "[ \t]+" - '(("b" "be" "beg" "begi" "begin" - "check" "count" - "de" "dep" "depn" "depna" "depnam" "depname" "depnames" - "di" "dis" "disp" "displ" "displa" "display" - "f" "fu" "fun" "func" "funct" "functi" "functio" "function" - "gr" "gra" "grap" "graph" - "init" - "max" "maxi" "maxim" "maximi" "maximiz" "maximize" - "me" "met" "meth" "metho" "method" - "ml" "mlo" "mlou" "mlout" - "mo" "mod" "mode" "model" - "pl" "plo" "plot" - "po" "pos" "post" - "q" "qu" "que" "quer" "query" - "re" "rep" "repo" "repor" "report" - "sa" "sam" "samp" "sampl" "sample" - "se" "sea" "sear" "searc" "search" - "trace") - font-lock-type-face) - "\\b" - )) - ;; the net commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("net") font-lock-reference-face) - "[ \t]+" - '(( - "cd" - "d" "de" "des" "desc" "descr" "descri" "describ" "describe" - "from" "get" "install" - "link" - "q" "qu" "que" "quer" "query") - font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(("net") font-lock-reference-face) - "[ \t]+" - '(("set") font-lock-reference-face) - "[ \t]+" - '(("ado" "other") font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(("ado") font-lock-reference-face) - "[ \t]+" - '(("d" "de" "des" "desc" "descr" "descri" "describ" "describe" - "dir" - "uninstall") - font-lock-type-face) - "\\b" - )) - ;; the reshape commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("reshape") font-lock-keyword-face) - "[ \t]+" - '(( - "clear" - "error" - "i" "j" - "long" - "wide" - "xi" "xij") - font-lock-type-face) - "\\b" - )) - ;; the return commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("ret" "retu" "retur" "return") font-lock-reference-face) - "[ \t]+" - '(("add" "clear" "local" "matrix" "scalar") font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(("sret" "sretu" "sretur" "sreturn") font-lock-reference-face) - "[ \t]+" - '(("clear" "local") font-lock-type-face) - "\\b" - )) - ;; the sts commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("sts") font-lock-reference-face) - "[ \t]+" - '(( - "g" - "gen" "gene" "gener" "genera" "generat" "generate" - "gr" "gra" "grap" "graph" - "l" "li" "lis" "list" - "t" "te" "tes" "test" - ) - font-lock-type-face) - "\\b" - )) - ;; the sw commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(("sw") font-lock-reference-face) - "[ \t]+" - '(( - "cloglog" "cnreg" "cox" "ereg" "gamma" "glm" "gompertz" "hetprob" - "llogist" "lnormal" "logistic" "logit" "ologit" "oprobit" - "poisson" "probit" "qreg" "reg" "regr" "regre" "regres" "regress" - "scobit" "tobit" "weibull" - ) - font-lock-type-face) - "\\b" - )) - ;; the window commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "win" "wind" "windo" "window" - ) font-lock-reference-face) - "[ \t]+" - '(( - "d" - "di" "dia" "dial" "dialo" "dialog" - "dir" "drop" - "fo" "fop" "fope" "fopen" - "fs" "fsa" "fsav" "fsave" - "l" "list" - "push" - "stop" "stopb" "stopbo" "stopbox" - ) font-lock-type-face) - "\\b" - )) - ;; the window controls - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "win" "wind" "windo" "window" - ) font-lock-reference-face) - "[ \t]+" - '(( - "c" "co" "con" "cont" "contr" "contro" "control" - ) font-lock-reference-face) - '(( - "button" "check" "clear" - "edit" - "mcombo" "msimple" - "radbegin" - "radend" - "radio" - "scombo" - "ssimple" - "static" - ) font-lock-type-face) - "\\b" - )) - ;; the window manage commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "win" "wind" "windo" "window" - ) font-lock-reference-face) - "[ \t]+" - '(( - "man" "mana" "manag" "manage" - ) font-lock-reference-face) - "[ \t]+" - '(( - "forward" - "minimize" - "prefs load" - "prefs save" - "prefs default" - "print graph" - "print log" - "restore" - "update variable" - ) - font-lock-type-face) - "\\b" - )) - ;; the window menu commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "win" "wind" "windo" "window" - ) font-lock-reference-face) - "[ \t]+" - '(( - "m" "me" "men" "menu" - ) font-lock-reference-face) - "[ \t]+" - '(( - "append popout" - "append string" - "append separator" - "clear" - "popout" - "set" - ) - font-lock-type-face) - "\\b" - )) - ;; the xwindow commands - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "xwin" "xwind" "xwindo" "xwindow" - ) font-lock-reference-face) - "[ \t]+" - '(( - "de" "def" "defi" "defin" "define" - "di" "dir" - "drop" - "l" "li" "lis" "list" - ) - font-lock-type-face) - "\\b" - )) - - ;; all the endless Stata keywords (not in a good order) - ;; first those keywords which must start line - ;; note that these will look like text if preceded by a comment - ;; (but comments shouldn't be before the command, anyway) - - (eval-when-compile - (make-regexps - "^[ \t]+" - '(( - "cap" "capt" "captu" "captur" "capture" - "char" "err" "erro" "error" "e" "ex" "exi" "exit" - "par" "pars" "parse" - "set" - ) font-lock-reference-face) - "\\b" - )) - ;; here are some keywords which appear in the middle of lines - ;; note that the really short abbreviations could make a mess of things - ;; - ;; These are split to allow compiling! - (eval-when-compile - (make-regexps - "\\b" - '(( - "_huber" "_qreg" "_robust" - "acprplot" "adjust" - "adopath" "alpha" - "an" "ano" "anov" "anova" "arch" - "areg" "arima" - "as" "ass" "asse" "asser" "assert" - "avplot" "avplots" - "bcskew0" - "be" "bee" "beep" - "biprobit" "bitest" "bitesti" "blogit" - "boxcox" "bprobit" "br" "break" "brier" - "bro" "brow" "brows" "browse" - "bsqreg" "bstat" "by" - "canon" "cat" "cc" "cci" "cchart" "centile" "cf" "ci" "cii" - "clogi" "clogit" "clogitp" "cloglog" - "close" "cmdtool" - "cnr" "cnre" "cnreg" "cnsreg" "codebook" "compare" - "copy" - "cor" "corc" "corr" "corre" "correl" "correla" "correlat" "correlate" - "corrgram" - "cou" "coun" "count" - "cox" "cprplot" "_crcswxx" "cs" "csi" - "ct" "ctset" "cttost" - "cumul" "cusum") - font-lock-reference-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "d" "de" "des" "desc" "descr" "descri" "describ" "describe" - "dfbeta" "dfuller" "di" - "dir" "dis" "disp" "disp_res" "disp_s" - "displ" "displa" "display" - "do" "dotplot" - "dprobit" "ds" "dstdize" "dwstat" - "eivreg" "eq" "ereg" - "fac" "fact" "facto" "factor" - "fit" "for" "fpredict" - "fracplot" "fracpoly" "fsl" - ) font-lock-reference-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "gettoken" "gladder" "glm" "glmpred" "glogit" "gnbreg" "gompertz" - "gphdot" "gphpen" "graph" "gprobit" "greigen" "grmeanby" - "hadimvo" "hausman" "heckman" "heckprob" "hetprob" "hettest" "hilite" - "hist" "hlu" "hotel" - "iqreg" "istdize" "iis" - "ins" "insp" "inspe" "inspec" "inspect" - "integ" "intreg" "ir" "iri" "ivreg" - "kap" "kappa" "kapwgt" "kdensity" "ksm" "ksmirnov" "ktau" - "kwallis" - ) font-lock-reference-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "l" "ladder" "lfit" "lincom" "linktest" - "li" "lis" "list" - "log" - "logistic" - "logi" "logit" - "loneway" "lookfor" - "lo" "loo" "look" "looku" "lookup" - "lpredict" "lroc" "lrtest" "ls" "lsens" "lstat" "ltable" "lv" "lvr2plot" - "man" "matcproc" "mcc" "mcci" - "means" - "mlog" "mlogi" "mlogit" - "mor" "more" - "mvreg" "mx_param" - "n" "nbreg" "newey" "news" - "nl" "nlinit" - "no" "noi" "nois" "noisi" "noisil" "noisily" - "note" "notes" - "nptrend" "numlist" - "olog" "ologi" "ologit" - "ologitp" - "on" "one" "onew" "onewa" "oneway" - "oprob" "oprobi" "oprobit" - "oprobitp" - "orthog" "orthpoly" - "ovtest") - font-lock-reference-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(("pac" "pchart" "pchi" "pcorr" "pergram" - "pl" "plo" "plot" - "pnorm" "poisgof" "poisson" "pperron" - "prais" - "prob" "probi" "probit" - "prtest" "prtesti" - "pwcorr" "pwd" - "q" "qchi" "qnorm" "qqplot" "qreg" "quadchk" "quantile" - "qu" "que" "quer" "query" - "qui" "quie" "quiet" "quietl" "quietly" - "ranksum" "rchart" "regdw" "regph" - "reg" "reg3" "regr" "regre" "regres" "regress" "reshape" - "rot" "rota" "rotat" "rotate" - "rreg" - "run" "runtest" "rvfplot" "rvpplot" - ) font-lock-reference-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "sampsi" "sconfirm" - "sco" "scobit" "scor" "score" - "sdtest" "sdtesti" "search" "serrbar" - "sfrancia" "shell" "shelltool" "shewhart" "signrank" "signtest" - "sktest" "slog" "spearman" "spikeplt" "sqreg" - "st" "st_is" "st_show" "st_ct" - "stcox" "stcoxkm" "stcurv" "stdes" - "stem" - "stereg" "stir" "stmc" "stmh" "stphplot" "stphtest" - "strate" "streg" - "sts" "stse" "stset" "stsum" "stvary" "stweib" - "su" "sum" "summ" "summa" "summar" "summari" "summariz" "summarize" - "sureg" - "svydes" "svyintrg" "svyivreg" "svylc" "svylogit" - "svymean" "svymean" "svymlog" "svyolog" "svyoprob" "svypois" "svyprobt" - "svyprop" "svyratio" "svyreg" "svyset" "svytab" "svytest" "svytotal" - "swilk" "symmetry" "symmi" "symplot" "syntax" "sysdir" - ) font-lock-reference-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "ta" "tab" - "tab1" "tab2" - "tabdisp" - "tabi" - "table" - "tabu" "tabul" "tabula" "tabulat" "tabulate" - "te" "tes" "test" - "testnl" "testparm" "tis" - "tob" "tobi" "tobit" - "token" "tokeni" "tokeniz" "tokenize" - "touch" "tsreport" "tsset" "tsunab" "ttest" "ttesti" - "ty" "typ" "type" - "unab" "using" - "vce" - "verinst" "vif" "vwls" - "weibull" "which" "who" "wntestb" "wntestq" - "xchart" "xcorr" - "xtclog" "xtdes" "xtgee" "xtgls" "xthaus" "xtintreg" - "xtlogit" "xtnbreg" "xtpois" "xtprobit" - "xtrchh" "xtreg" "xtsum" "xttab" "xttest0" "xttobit" "xttrans" - "zip" "zinb" - ) font-lock-reference-face) - "\\b" - )) - - ;; conditional statements - ;; if might not work right ('cuz it is also a keyword) - (eval-when-compile - (make-regexps - "^[ \t]*\\sw+[ \t]*" - '(("if" - ) font-lock-reference-face t t) - "\\b" - )) - - (eval-when-compile - (make-regexps - "^[ \t]*" - '(("if" "while" - ) font-lock-reference-face t t) - "[ \t]+.*{" - )) - ;; else statement (which must just have a {) - (eval-when-compile - (make-regexps - "^[ \t]*" - '(("else" - ) font-lock-reference-face) - "[ \t]*{" - )) - - ;; short version of list --- which can get fooled if used as a var - (eval-when-compile - (make-regexps - '(("^[ \t]*l\\b" - ) font-lock-reference-face) - )) - - ;; all the Stata options - ;; commonly used options - (eval-when-compile - (make-regexps - "[ \t]+" - '(("byte" "int" "long" "str[1-9]+[0-9]?" "float" "double" - "width" "maxobs" "maxvar" - ) font-lock-type-face) - "[ \t]+" - )) - ;; special local variables (used in parsing) - (eval-when-compile - (make-regexps - "^[ \t]+\\(local\\)+[ \t]+" - '(("varlist" "exp" "weight" "if" "in" "using" "options" - ) font-lock-type-face nil t t) - "\\b" - )) - - ;; things used with display - ;; since these are often split across lines, and Stata commands are hard - ;; to delimit, this will highlight even if out of context - - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "_c" "_co" "_con" "_cont" "_conti" "_contin" "_continu" "_continue" - "_n" "_ne" "_new" "_newl" "_newli" "_newlin" "_newline" - "_quote" - "_r" "_re" "_req" "_requ" "_reque" "_reques" "_request" - ) - font-lock-type-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "[ \t]+" - '(( - "_col" "_colu" "_colum" "_column" - "_d" "_du" "_dup" - "_s" "_sk" "_ski" "_skip" - ) - font-lock-type-face) - "([1-9]+[0-9]*)\\b" - )) - (eval-when-compile - (make-regexps - "\\bin[ \t]+" - '(( - "b" "bl" "blu" "blue" - "g" "gr" "gre" "gree" "green" - "r" "re" "red" - "w" "wh" "whi" "whit" "white" - "y" "ye" "yel" "yell" "yello" "yellow" - ) font-lock-type-face) - "\\b" - )) - - ;; labels - (eval-when-compile - (make-regexps - "[ \t]+" - '(("lab" "labe" "label" - ) font-lock-reference-face t) - "[ \t]+" - '(( - "da" "dat" "data" - "de" "def" "defi" "defin" "define" - "di" "dir" - "drop" - "l" "li" "lis" "list" - "save" - "val" "valu" "value" "values" - "var" "vari" "varia" "variab" "variabl" "variable" - ) font-lock-type-face nil t t) - "[ \t]" - )) - - ;; all Stata data-altering stuff - (eval-when-compile - (make-regexps - "\\b" - '(( - "_pctile" "_predict" - "aorder" "append" - "bcskew0" "bsample" "bs" "bstrap" - "cd" "chdir" "clear" "compress" - "contract" "convert" "cross" - "dec" "deco" "decod" "decode" - "discard" "drop" "dydx" - "ed" "edi" "edit" "egen" - "en" "enc" "enco" "encod" "encode" - "erase" - "expand" - "fillin" - "form" "forma" "format" - "fracgen" "fracpred" - "g" "ge" "gen" "gene" "gener" "genera" "generat" "generate" - "gsort" - "impute" - "infile" "infix" "input" "insheet" "integ" "ipolate" - "joinby" - "keep" - "lnskew0" - ) font-lock-keyword-face) - "\\b" - )) - (eval-when-compile - (make-regexps - "\\b" - '(( - "mark" "markout" "marksample" - "matname" - "mer" "merg" "merge" - "mkdir" "mkmat" "mkspline" - "mleval" "mlmatsum" "mlsum""mlvecsum" - "modify" "mov" "move" - "mvdecode" "mvencode" "nlpred" "nobreak" "order" - "ou" "out" "outf" "outfi" "outfil" "outfile" - "outs" "outsh" "outshe" "outshee" "outsheet" - "pctile" - "post" "postclose" "postfile" - "pre" "pred" "predi" "predic" "predict" - "preserve" "range" - "recast" "recode" - "ren" "rena" "renam" "rename" - "renpfix" "replace" "restore" "rm" - "sappend" - "sa" "sav" "save" - "sample" "sdrop" - "separate" - "simul" "sinfile" "smerge" - "smooth" "snapspan" - "so" "sor" "sort" - "ssave" "ssort" "stack" - "stbase" "stfill" "stgen" "stjoin" "stsplit" "sttocc" "sttoct" - "suse" "svmat" - "tsfill" "tsrevar" - "u" "us" "use" - "xi" "xi:" "xtile" "xpose" - "xtdata" "xtpred" - ) font-lock-keyword-face) - "\\b" - )) - - ;; assignment of macros - (eval-when-compile - (make-regexps - "^[ \t]*" - '(("global" "local" "scalar" - ) font-lock-reference-face) - '(("\\([ \t]+[a-zA-Z_]+[a-zA-Z_0-9]*\\b\\)?" - ) font-lock-variable-name-face t) - )) - ;; choosing temp names - (eval-when-compile - (make-regexps - "^[ \t]*" - '(("tempname" "tempfile" "tempvar" - ) font-lock-reference-face) - '(("\\([ \t]+[a-zA-Z_]+[a-zA-Z_0-9`']*\\)+" - ) font-lock-type-face t) - )) - ;; all variable/macro stuff (put late so it will override) - ;; internal constants - (eval-when-compile - (make-regexps - "[^a-zA-Z]" - '(("_merge" "_n" "_pi" "_rc" "_N" - ) font-lock-variable-name-face) - "[^a-zA-Z]" - )) - ;; some generated vars - (eval-when-compile - (make-regexps - '(("_result([1-9]+)" - ) font-lock-variable-name-face) - )) - ;; global macros - (eval-when-compile - (make-regexps - '(("\\$[a-zA-Z_*]+[a-zA-Z_0-9]*" - ) font-lock-variable-name-face t) - )) - ;; local macros - (eval-when-compile - (make-regexps - "`+" - '(("[a-zA-Z_`*]+[a-zA-Z_0-9]*" ;has glitch interior ` is highlighted - ) font-lock-variable-name-face t) - "'+" - )) - ;; other macro commands - (eval-when-compile - (make-regexps - "[ \t]*" - '(( - "ma" "mac" "macr" "macro" - ) font-lock-reference-face) - "[ \t]+" - '(( - "de" "def" "define" - "di" "dir" - "drop" - "l" "li" "lis" "list" - "s" "sh" "shi" "shif" "shift" - ) - font-lock-type-face) - "[ \t]+" - )) - ;; stata 'functions' i.e. things which require () after them - (eval-when-compile - (make-regexps - "\\b" - '(("_caller" - "abs" "acos" "asin" "atan" "autocode" - "Binomial" - "binorm" - "chiprob" "comb" "cond" "cos" - "d" "date" "digamma" "day" - "dofh" "dofm" "dofq" "dofw" "dofy" "dow" "doy" - "e" "exp" - "float" "fprob" "gammap" "get" "group" - "h" "halfyear" "halfyearly" "hofd" - "ibeta" "index" "int" - "invbinomial" "invchi" "invfprob" "invgammap" "invnchi" "invnorm" "invt" - "length" "ln" "lnfact" "lngamma" "log" "log10" "lower" "ltrim" - "m" "matrix" "max" "mdy" "min" "missing" "mod" "mofd" "month" "monthly" - "nchi" "normd" "normprob" "npnchi" - "q" "qofd" "quarter" "quarterly" - "r" "real" "recode" "reldif" "replay" "return" "round" "rtrim" - "s" "scalar" "sign" "sin" "sqrt" "string" "substr" "sum" - "tan" "tprob" "trigamma" "trim" - "uniform" "uniform0" "upper" - "w" "week" "weekly" "wofd" - "y" "year" "yearly" "yh" "ym" "yofd" "yq" "yw" - ) - font-lock-reference-face t) - "(" - )) - ;; stata 'functions' i.e. things which require [] after them - (eval-when-compile - (make-regexps - "\\b" - '(("_b" "_coef" "_se") - font-lock-reference-face t) - "\\[" - )) - ;; common Stata options which require a () after them - (eval-when-compile - (make-regexps - "[, \t]+" - '(("bands" "by" "connect" "density" "gap" "iterate" "ltolerance" "margin" - "psize" "saving" "tlabel" "tolerance" - "xlabel" "xscale" "ylabel" "yscale") - font-lock-type-face t) - "(" - )) - ;; egen 'function' options - (eval-when-compile - (make-regexps - "[ \t]*egen[ \t]+.*=[ \t]*" - '(("count" "diff" "fill" "group" "iqr" - "ma" "max" "mean" "median" "min" "mtr" "pctile" - "rank" "rfirst" "rlast" "rmax" "rmean" "rmin" "rmiss" "robs" "rsd" "rsum" - "sd" "std" "sum") - font-lock-reference-face t) - "(.*)" - )) - ;; All Custom ado files which are 'reliable' and which are not file killers - ;; this might be a useless endeavor --- but I cannot generate tag files - ;; all the s-extensions are listed under Stata's name (since they alter - ;; data and will be moved to the utils directory - (eval-when-compile - (make-regexps - "[ \t]*" - '(("addnote" "anypath" "autolab" "checkvar" "ck1icd9" "ckicd9" - "datetoe" "dattomdy" "den2dem" "dishis" "dtapath" "dupclean" "echo" - "exdupbil" "ezip2hsa" "getdate" "getlbl" "getnames" "getobs" "gplur" - "icd9" "issorted" "isfile" "jultoe" "jultof" "jultomdy" "knowndup" - "labeldir" "linker" - "markit" "makewide" "missize" "mpcounts" - "nodups" "notefile" "prov2zip" - "qcolsum" "qorder" - "random" "readraw" "readzip" "repart" - "setup" "stdrate" - "timeslot" - "wdatetoe" "wdatomdy" "zip2ezip" - "_addext" "_brclean" "_brckado" "_brdlog" - "_ckbad" "_ckdunno" "_ckdupl" "_ckmiss" "_ckok" "_ckwarn" - "_delimit" "_filenm" "_lookup" "_mk_ck" - ) font-lock-function-name-face) - "\\b" - )) - )) - - -(defvar ess-STA-mode-font-lock-defaults (ado-set-font-lock-keywords) - "Set the Stata mode font-lock keywords to Bill Rising's ado-mode keywords.") - -(defvar STA-editing-alist - '((paragraph-start . (concat "[ \t\f]*$\\|" page-delimiter)) - (paragraph-separate . (concat "[ \t\f]*$\\|" page-delimiter)) - (paragraph-ignore-fill-prefix . t) - (comment-column . 40) - ;;(comment-indent-function . 'S-comment-indent) - ;;(ess-comment-indent . 'S-comment-indent) - ;;(ess-calculate-indent . 'ess-calculate-indent) - (ess-local-process-name . nil) - ;;(ess-keep-dump-files . 'ask) - (font-lock-defaults . '(ess-STA-mode-font-lock-defaults - nil nil ((?\. . "w"))))) - "General options for editing Stata do and ado source files.") - -;; YOU USED TO HAVE TO (with Thomas's version): -;;;;; Add the following to your .emacs file -;; -;;(autoload 'stata "~/ess-sta-l.el" "inferior stata mode" t ) -;;(autoload 'stata-help "stata" "stata help mode" t) -;;(autoload 'stata-mode "~/ess-sta-l.el" "stata mode" t) -;; -;;(if (assoc "\\.do$" auto-mode-alist) nil -;; (setq auto-mode-alist -;; (append -;; '(("\\.do$" . stata-mode) -;; ("\\.ado$" . stata-mode)) -;; auto-mode-alist))) -;; - - -;; QUESTIONS TO ASK THOMAS: -;; 1 - are 'help' and 'lookup' the same? -;; 2 - what is the point of the review buffer? -;; 3 - how to quit? - -;; -;; NOTE: all of Thomas's functions have been left here, to be removed -;; or merged into real locations as we work on this. -;; - - -;;;;;;;;; Things to change - -(defvar stata-switches "-q" - "Switches to apply to stata invocation.") - -(defvar stata-profile "~/.stataprofile" - "File to read on startup (nil for no file).") - -(define-obsolete-function-alias 'stata-help 'ess-display-help-on-object "ESS[15.09]") -(define-obsolete-function-alias 'stata-lookup 'ess-display-help-apropos "ESS[16.03]") - -;; fixme? Hook this on C-c C-s /ess-execute-search does an R search() right now/ -(defun stata-variables () - "Stata variable list in other buffer." - (interactive) - (let* ((stata-process (get-process "stata")) - (stata-buffer (if stata-process - (process-buffer stata-process) - (error "Stata is not running."))) - oldpf oldpb oldpm) - (set-buffer stata-buffer) - (setq oldpf (process-filter stata-process)) - (setq oldpb (process-buffer stata-process)) - (setq oldpm (marker-position (process-mark stata-process))) - (save-excursion - (if stata-process nil (error "Stata is not running.")) - (beginning-of-line) - (if (looking-at ". ") nil (error "Stata not ready.")) - (save-excursion - (set-process-buffer stata-process - (get-buffer-create "*stata variables*")) - (set-process-filter stata-process 'inferior-ess-ordinary-filter) - (set-buffer "*stata variables*") - (setq buffer-read-only nil) - (erase-buffer) - (process-send-string stata-process "desc \n ") - (stata-prompt-wait stata-process) - (setq buffer-read-only t) - (set-buffer stata-buffer) - (set-process-buffer stata-process oldpb) - (set-marker (process-mark stata-process) oldpm) - (set-process-filter stata-process oldpf))) - (display-buffer "*stata variables*") - (goto-char (point-max)))) - -(defun stata-prompt-wait (proc &optional start-of-output) - "Wait for a prompt to appear at BOL of current buffer. -PROC is the stata process. Does not change point." - (if start-of-output nil (setq start-of-output (point-min))) - (save-excursion - (while (progn - ;; get output if there is some ready - (accept-process-output proc 0 50) - (goto-char (marker-position (process-mark proc))) - (beginning-of-line) - (if (< (point) start-of-output) (goto-char start-of-output)) - (not (looking-at "^. ")))))) - -(cl-defmethod ess--help-major-mode (&context (ess-dialect "stata")) - (ess-stata-help-mode)) - -(define-derived-mode ess-stata-help-mode ess-help-mode "Stata help" - "Major mode for displaying Stata help in a read-only buffer. -Active commands are Help (\\[stata-help]) and hyperlink -(\\[stata-rehelp] or mouse-2)." - :group 'ess-Stata) - -;;; Suggested function from Brendan Halpin: -(defvar ess-STA-delimit-do-file "delimit-do.do") - -(defun ess-STA-delimit-do () - (save-excursion - (let ((commands (buffer-substring-no-properties (region-beginning) - (region-end)))) - (set-buffer (get-buffer-create ess-STA-delimit-do-file)) - (delete-region (point-min) (point-max)) - (insert "#delimit ;\n" - commands - "\n#delimit cr\n") - (write-file ess-STA-delimit-do-file nil) - (comint-send-string "Stata" - (format "do %s \n" ess-STA-delimit-do-file))))) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - -(provide 'ess-stata-lang) - -;;; ess-stata-lang.el ends here diff --git a/elpa/ess-20191014.1343/ess-stata-mode.el b/elpa/ess-20191014.1343/ess-stata-mode.el deleted file mode 100644 index b56299a2..00000000 --- a/elpa/ess-20191014.1343/ess-stata-mode.el +++ /dev/null @@ -1,219 +0,0 @@ -;;; ess-stata-mode.el --- Stata customization -*- lexical-binding: t; -*- - -;; Copyright (C) 1997--1999 A. J. Rossini, Thomas Lumley -;; Copyright (C) 1997--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - -;; Author: A.J. Rossini -;; Created: 9 Sep 1998 -;; Maintainer: ESS-core - -;; Keywords: languages - -;; This file is part of ESS - -;; This file 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. - -;; This file 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;;; Commentary: - -;; This file defines all the Stata customizations for ess-mode. It is somewhat -;; based on Stata-mode by Thomas Lumley . - -;;; Code: - -(require 'ess-mode) -(require 'ess-stata-lang) - -(defvar STA-dialect-name "stata" - "Name of 'dialect' for Stata.");easily changeable in a user's .emacs - -(defvar ess-stata-mode-syntax-table - (let ((tbl (copy-syntax-table ess-mode-syntax-table))) - (modify-syntax-entry ?\\ "." tbl) ;nullify escape meaning - (modify-syntax-entry ?\$ "." tbl) - (modify-syntax-entry ?` "(\'" tbl) - (modify-syntax-entry ?\' ")`" tbl) - (modify-syntax-entry ?/ ". 124b" tbl) - ;; asterisk at bol comments taken care of by - ;; `syntax-propertize-function'. - (modify-syntax-entry ?* ". 23b" tbl) - (modify-syntax-entry ?\n ">" tbl) - (modify-syntax-entry ?+ "." tbl) - (modify-syntax-entry ?- "." tbl) - (modify-syntax-entry ?= "." tbl) - (modify-syntax-entry ?% "." tbl) - (modify-syntax-entry ?< "." tbl) - (modify-syntax-entry ?> "." tbl) - (modify-syntax-entry ?& "." tbl) - (modify-syntax-entry ?| "." tbl) - (modify-syntax-entry ?~ "." tbl) - tbl) - "Syntax table for `ess-stata-mode'.") - -(defvar STA-customize-alist - '((ess-local-customize-alist . 'STA-customize-alist) - (ess-language . "STA") - (ess-dialect . STA-dialect-name) - (ess-suffix . "ado") - (ess-mode-editing-alist . STA-editing-alist) - (ess-help-sec-regex . ess-help-STA-sec-regex) - (ess-help-sec-keys-alist . ess-help-STA-sec-keys-alist) - (ess-loop-timeout . 500000 ) - (ess-object-name-db-file . "ess-sta-namedb.el" ) - (inferior-ess-program . inferior-STA-program) - (inferior-ess-objects-command . "describe\n") - (inferior-ess-help-command . "help %s\n") ;; assumes set more off - (inferior-ess-exit-command . "exit\n") - ;; --more-- is necessary here (hangs otherwise if startup stata.msg is big) - (inferior-ess-primary-prompt . "[.:] \\|--more--") - (inferior-ess-secondary-prompt . ">\\|--more--") - (inferior-ess-prompt . "\\([.:>] \\|--more--\\)") - (comint-use-prompt-regexp . t) - (inferior-ess-search-list-command . "set more off\n search()\n") - (ess-execute-screen-options-command . "set linesize %s\n") - (ess-getwd-command . "pwd\n") - (ess-setwd-command . "cd \"%s\"\n") - (ess-load-command . "run \"%s\"\n")) - "Variables to customize for Stata.") - -(cl-defmethod ess--help-web-search-override (cmd &context (ess-dialect "stata")) - "Browse the web for documentation about CMD in Stata." - (browse-url - (format - "https://www.stata.com/search/?q=%s&restrict=&btnG=Search&client=stata&num=&output=xml_no_dtd&site=stata&ie=&oe=UTF-8&sort=&proxystylesheet=stata" - cmd))) - -;;;###autoload -(define-derived-mode ess-stata-mode ess-mode "ESS[STA]" - "Major mode for editing Stata source." - :group 'ess-Stata - (ess-setq-vars-local STA-customize-alist) - (setq-local comint-use-prompt-regexp t) - (setq-local comment-column 40) - (setq-local comment-end " */") - (setq-local comment-start "/* ") - (setq-local comment-start-skip "/\\*+ *") - (setq-local comment-use-syntax t) - (setq-local syntax-propertize-function - (syntax-propertize-rules ("^\\*" (0 "<")))) - (setq-local paragraph-ignore-fill-prefix t) - (setq-local paragraph-separate (concat "[ \t\f]*$\\|" page-delimiter)) - (setq-local paragraph-start (concat "[ \t\f]*$\\|" page-delimiter)) - (setq font-lock-defaults '(ess-STA-mode-font-lock-defaults nil nil ((?\. . "w"))))) - -(defalias 'STA-mode 'ess-stata-mode) -(defalias 'stata-mode 'ess-stata-mode) -(defalias 'Stata-mode 'ess-stata-mode) - -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.do\\'" . ess-stata-mode)) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.ado\\'" . ess-stata-mode)) - - -(defun ess-sta-remove-comments (string) - "Remove one-line comments before sending the STRING to process. - -This function is placed in `ess-presend-filter-functions'." - (replace-regexp-in-string "/\\*.*\\*/\\|^//.*$" "" string)) - -;; (ess-sta-remove-comments "aaa /* sdfdsf */ bbb -;; sdfsd -;; ccc -;; // sdfsf -;; sdf /* sdfdsf */ -;; sdfsf -;; " ) - - -(defvar ess-stata-post-run-hook nil - "Functions run in process buffer after the initialization of stata process.") - -(defun stata (&optional start-args) - "Call Stata with START-ARGS." - (interactive "P") - (ess-write-to-dribble-buffer - (format "(STA): ess-dialect=%s , buf=%s \n" - ess-dialect - (current-buffer))) - (let* ((sta-start-args - (concat inferior-STA-start-args - (when start-args (read-string "Starting Args [possibly -k####] ? ")))) - (inf-buf (inferior-ess sta-start-args STA-customize-alist)) - (inf-proc (get-buffer-process inf-buf))) - (while (process-get inf-proc 'sec-prompt) - ;; get read of all --more-- if stata.msg is too long. - (ess-send-string inf-proc "q") - (ess-wait-for-process inf-proc t)) - (ess-send-string inf-proc "set more off") - (goto-char (point-max)) - (with-current-buffer inf-buf - (add-hook 'ess-presend-filter-functions 'ess-sta-remove-comments nil 'local) - (run-mode-hooks 'ess-stata-post-run-hook)) - inf-buf)) - -(defvar inferior-ess-stata-mode-syntax-table - (let ((tab (copy-syntax-table ess-stata-mode-syntax-table))) - tab) - "Syntax table for `inferior-ess-stata-mode'.") - -(define-derived-mode inferior-ess-stata-mode inferior-ess-mode "iESS" - "Inferior `stata' mode." - :group 'ess-proc - (ess-setq-vars-local STA-customize-alist) - (setq comint-prompt-regexp (concat "^" inferior-ess-prompt)) - (setq-local comint-use-prompt-regexp t) - (setq font-lock-defaults '(ess-STA-mode-font-lock-defaults nil nil ((?\. . "w"))))) - - -(define-derived-mode ess-stata-transcript-mode ess-transcript-mode "ESS Transcript" - "Stata transcript mode." - :group 'ess-Stata - :syntax-table ess-stata-mode-syntax-table - (ess-setq-vars-local STA-customize-alist) - (setq comint-prompt-regexp (concat "^" inferior-ess-prompt)) - (setq-local comint-use-prompt-regexp t) - (setq-local comment-column 40) - (setq-local comment-end " */") - (setq-local comment-start "/* ") - (setq-local comment-start-skip "/\\*+ *") - (setq-local comment-use-syntax t) - (setq-local paragraph-ignore-fill-prefix t) - (setq-local paragraph-separate (concat "[ \t\f]*$\\|" page-delimiter)) - (setq-local paragraph-start (concat "[ \t\f]*$\\|" page-delimiter)) - (setq font-lock-defaults '(ess-STA-mode-font-lock-defaults nil nil ((?\. . "w"))))) - -(defalias 'STA-transcript-mode 'ess-stata-mode-syntax-table) - -(defun ess--STA-retrive-topics-from-search () - (with-current-buffer (ess-command inferior-ess-search-list-command) - (goto-char (point-min)) - (let (topics) - (while (re-search-forward "(help \\(.+?\\)\\( if installed\\| for replacement.*\\)?)$" nil t) - (setq topics - (nconc (split-string (match-string-no-properties 1) ",\\|; +") - topics))) - (nreverse (delete-dups topics)) - ))) - -(cl-defmethod ess-help-get-topics (proc &context (ess-dialect "stata")) - "Return a list of current STA help topics associated with process PROC." - (or (ess-process-get 'help-topics proc) - (progn - (ess-process-put 'help-topics (ess--STA-retrive-topics-from-search)) - (ess-process-get 'help-topics)))) - -(provide 'ess-stata-mode) - -;;; ess-stata-mode.el ends here diff --git a/elpa/ess-20191014.1343/etc/ESSR.rds b/elpa/ess-20191014.1343/etc/ESSR.rds deleted file mode 100644 index 5fbb48fe5d75f6075dbc1d9a8c9ba234721307e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13331 zcmV+uH0;YCiwFP!000001MPhalpI%eU{y~~&sU?-*OtF6$s>&S zJl4oRB-5_xuAV8YySi0XJtHj!n-ET%#YqT%_JmDXV8K~uIlFrd1Tf*hge+{r22LOb zV+i>GHsO=qu*s_Ty{h-B?t67#RrP3O_UzfQpQ`%Rd-vXV-+lMp_q*@@K~2+gT2DT& z<$B1gme+#6U$AG6#0-#UZ`-r#F8^^&>Dtn@qyv3GUmurX9)&Mrt6kZnP!W8 zAaM1Llpt3+L;n4zSZoc6?J1Q?L9~y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n+0BDU+AFsfjbiX;wCLv4qHQh}qcY)HES4oWwVa-1WNYyh z%W}#J?{kDHF5g--SqigidHxOVi6BR}79EzsF@gC6)2!WEwD+|9G`6v5%^Mz;YHVw< zy{CHhJtP&qp;kg&Y`6AQn@bo8o3<8DgHrh!xf?CiFGJ`hHMte*aCRcWS&RObD4qUR zS&9;kjk;;?ZAA&dZUg;KA@JmmF+9!32+6II+W#;}doZ3RdIxzDR`$dulBFs14IbQ0 z{)$nu!xHa=8GoU&qD+d*D0W8)PVoeCyJc9#TLBLqdQAEb%)s!tbuzh_CWh4Y>^_+B zS_C-GMBR?`QXT^T#lI1^#sr&t7-OwpaK&Y!GQwOjBk8c;g`WNqKhH6$xFP&@$#~1! z{o=PmNWPxcy=zRG&eNweek;NS^XVM#!2K(5)2}tGnl+a=2?=O3Z5#`0^-t-JBZ}+fk%vY4=FqAI(}6i7ki+PW^MN;iO&2 zsv3XBJaR_qas^ena2AK><{*oYVC-H8Jl2RT7f>j=z-6;j0T1}@zz0j?hYj0qdd0x| zXYrvi_aR~v7VAFUMWx4OT0I9;bV&4IUe861QX+=^%`+wPnhzj_LxpuDT#kT#iGo08 d;9ri8K_ZXlkd;0AN-u-i{|{C=eSg>x0RZU55mo>I diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/.basic.R b/elpa/ess-20191014.1343/etc/ESSR/R/.basic.R deleted file mode 100644 index 8ba5daf7..00000000 --- a/elpa/ess-20191014.1343/etc/ESSR/R/.basic.R +++ /dev/null @@ -1,134 +0,0 @@ -#### Essential functionality needed by ESS - -## Should work on *all* vesions of R. -## Do not use _ in names, nor :: , nor 1L etc, as they -## cannot be parsed in old R versions - -.ess.getRversion <- function() { - if(exists("getRversion", mode="function")) getRversion() - else paste(R.version$major, R.version$minor, sep=".") -} - -## loading ESSR.rda might fail, so re-assign here: -.ess.Rversion <- .ess.getRversion() - -.ess.R.has.utils <- (.ess.Rversion >= "1.9.0") -.ess.utils.name <- paste("package", - if(.ess.Rversion >= "1.9.0") "utils" else "base", - sep = ":") - -## Instead of modern utils::help use one that works in R 1.0.0: -.ess.findFUN <- get("find", .ess.utils.name) - - -### HELP -.ess.help <- function(..., help.type = getOption("help_type")) { - if (is.null(help.type)) { - help.type <- "text" - } - - ## - get("help", ..) searching in global env works with devtools redefines - ## - Redefining to .ess.help this way is necessary because - ## utils:::print.help_files_with_topic (used internally when there's - ## more than one a package) uses the quoted call - ## MM: don't understand; more specifically? - .ess.help <- function(...) { - do.call(get("help", envir = .GlobalEnv), list(...)) - } - - if (.ess.Rversion > "2.10") { - ## Abbreviating help_type to avoid underscore - .ess.help(..., help = help.type) - } else { - .ess.help(..., htmlhelp = help.type == "html") - } -} - -.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) -} - -### SOURCING -.ess.eval <- function(string, visibly = TRUE, output = FALSE, - max.deparse.length = 300, - file = tempfile("ESS"), local = NULL) -{ - if (is.null(local)) { - local <- if (.ess.Rversion > '2.13') parent.frame() else FALSE - } - - ## create FILE, put string into it. Then source. - ## arguments are like in source and .ess.source - cat(string, file = file) - ## The following on.exit infloops in R 3.3.0 - ## https://github.com/emacs-ess/ESS/issues/334 - ## https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16971 - ## So we are cleanning it in .ess.source instead. - ## on.exit(file.remove(file)) - .ess.source(file, visibly = visibly, output = output, - max.deparse.length = max.deparse.length, - local = local, fake.source = TRUE) -} - -.ess.strip.error <- function(msg, srcfile) { - pattern <- paste0(srcfile, ":[0-9]+:[0-9]+: ") - sub(pattern, "", msg) -} - -.ess.file.remove <- function(file){ - if (base::file.exists(file)) base::file.remove(file) - else FALSE -} - -.ess.source <- function(file, visibly = TRUE, output = FALSE, - max.deparse.length = 300, local = NULL, - fake.source = FALSE, keep.source = TRUE, - message.prefix = "") { - if (is.null(local)) { - local <- if (.ess.Rversion > "2.13") - parent.frame() - else FALSE - } - - ss <- - if (.ess.Rversion >= "3.4") - base::source - else if (.ess.Rversion >= "2.8") - function(..., spaced) base::source(...) - else function(..., spaced, keep.source) base::source(...) - - on.exit({ - if (fake.source) - .ess.file.remove(file) - }) - - out <- ss(file, echo = visibly, local = local, print.eval = output, spaced = FALSE, - max.deparse.length = max.deparse.length, keep.source = keep.source) - - if(!fake.source) - cat(sprintf("%sSourced file %s\n", message.prefix, file)) - - ## Return value for org-babel - invisible(out$value) -} - -if(.ess.Rversion < "1.8") - ## (works for "1.7.2"): bquote() was new in 1.8.0 - bquote <- function(expr, where=parent.frame()){ - unquote <- function(e) - if (is.pairlist(e)) as.pairlist(lapply(e, unquote)) - else if (length(e) <= 1) e - else if (e[[1]] == as.name(".")) eval(e[[2]], where) - else as.call(lapply(e, unquote)) - - unquote(substitute(expr)) - } diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/.load.R b/elpa/ess-20191014.1343/etc/ESSR/R/.load.R deleted file mode 100644 index e1c64e88..00000000 --- a/elpa/ess-20191014.1343/etc/ESSR/R/.load.R +++ /dev/null @@ -1,53 +0,0 @@ -## This file is sourced when R starts and `load.ESSR` is called. See -## inferior-ess-r-load-ESSR--local. -## Do not use _ in names, nor :: as they cannot be parsed in old R versions - -## load .base.R and all other files into ESSR environment; then attach ESSR -.ess.load.ESSR <- function(dir) { - .source <- - if(any("keep.source" == names(formals(sys.source)))) - sys.source - else - function(..., keep.source) sys.source(...) - - Rver <- if(exists("getRversion", mode="function")) getRversion() - else paste(R.version$major, R.version$minor, sep=".") - oldR <- Rver <= "1.3.0" - - ESSR <- - if(oldR) ## really old library() revert order a bit - attach(NULL, name = "ESSR") - else if(length(nn <- names(formals(new.env))) && any(nn == "parent")) - new.env(parent = - if(Rver >= "1.9.0") getNamespace("utils") - else .BaseNamespaceEnv) - else - new.env() - - assign(".ess.Rversion", Rver, envir = ESSR) - - ## updated by make !! - VERSION <- "1.5" - assign(".ess.ESSRversion", VERSION, envir = ESSR) - - - ## .basic.R: - try(.source(paste(dir,'/.basic.R', sep = ""), envir = ESSR, keep.source = FALSE)) - - ## all others try(*) as it will fail in old R - if(!oldR) # no sense if(oldR) - for( f in dir(dir, pattern='\\.R$', full.names=TRUE) ) - try(.source(f, envir = ESSR, keep.source = FALSE)) - - if(Rver >= "2.4.0") - attach(ESSR) - else if(!oldR) { ## borrow from older library() - e <- attach(NULL, name = "ESSR") - .Internal(lib.fixup(ESSR, e)) - } else { ## if(oldR), use as in that old library(): - .Internal(lib.fixup(ESSR, .GlobalEnv)) - } - - ## BUILDESSR needs this: - invisible(ESSR) -} diff --git a/elpa/ess-20191014.1343/license.info b/elpa/ess-20191014.1343/license.info deleted file mode 100644 index 2bf932c3..00000000 --- a/elpa/ess-20191014.1343/license.info +++ /dev/null @@ -1,17 +0,0 @@ -This is license.info, produced by makeinfo version 6.5 from -license.texi. - -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. - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/mailing.info b/elpa/ess-20191014.1343/mailing.info deleted file mode 100644 index 1cf83d79..00000000 --- a/elpa/ess-20191014.1343/mailing.info +++ /dev/null @@ -1,21 +0,0 @@ -This is mailing.info, produced by makeinfo version 6.5 from -mailing.texi. - -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 ; contributions -to the list may be mailed to . 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. - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/make-regexp.el b/elpa/ess-20191014.1343/make-regexp.el deleted file mode 100644 index 406d9ddb..00000000 --- a/elpa/ess-20191014.1343/make-regexp.el +++ /dev/null @@ -1,238 +0,0 @@ -;;; make-regexp.el --- generate efficient regexps to match strings. - -;; Copyright (C) 1994, 1995 Simon Marshall. - -;; Author: Simon Marshall -;; Keywords: lisp, matching -;; Version: 1.02 - -;; LCD Archive Entry: -;; make-regexp|Simon Marshall|simon@gnu.ai.mit.edu| -;; Generate efficient regexps to match strings.| -;; 11-Jul-1995|1.02|~/functions/make-regexp.el.gz| - -;; The archive is archive.cis.ohio-state.edu in /pub/gnu/emacs/elisp-archive. - -;;; This file is not part of GNU Emacs. - -;;; This program 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. - -;;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;;; Commentary: - -;; Purpose: -;; -;; To make efficient regexps from lists of strings. - -;; For example: -;; -;; (let ((strings '("cond" "if" "while" "let\\*?" "prog1" "prog2" "progn" -;; "catch" "throw" "save-restriction" "save-excursion" -;; "save-window-excursion" "save-match-data" -;; "unwind-protect" "condition-case" "track-mouse"))) -;; (concat "(" (make-regexp strings t))) -;; -;; => "(\\(c\\(atch\\|ond\\(\\|ition-case\\)\\)\\|if\\|let\\*?\\|prog[12n]\\|save-\\(excursion\\|match-data\\|restriction\\|window-excursion\\)\\|t\\(hrow\\|rack-mouse\\)\\|unwind-protect\\|while\\)" -;; -;; To search for the above regexp takes about 70% of the time as for the simple -;; (concat "(\\(" (mapconcat 'identity strings "\\|") "\\)") regexp. -;; -;; Obviously, the more the similarity between strings, the faster the regexp: -;; -;; (make-regexp '("abort" "abs" "accept" "access" "array" "begin" "body" "case" -;; "constant" "declare" "delay" "delta" "digits" "else" "elsif" -;; "entry" "exception" "exit" "function" "generic" "goto" "if" -;; "others" "limited" "loop" "mod" "new" "null" "out" "subtype" -;; "package" "pragma" "private" "procedure" "raise" "range" -;; "record" "rem" "renames" "return" "reverse" "select" -;; "separate" "task" "terminate" "then" "type" "when" "while" -;; "with" "xor")) -;; -;; => "a\\(b\\(ort\\|s\\)\\|cce\\(pt\\|ss\\)\\|rray\\)\\|b\\(egin\\|ody\\)\\|c\\(ase\\|onstant\\)\\|d\\(e\\(clare\\|l\\(ay\\|ta\\)\\)\\|igits\\)\\|e\\(ls\\(e\\|if\\)\\|ntry\\|x\\(ception\\|it\\)\\)\\|function\\|g\\(eneric\\|oto\\)\\|if\\|l\\(imited\\|oop\\)\\|mod\\|n\\(ew\\|ull\\)\\|o\\(thers\\|ut\\)\\|p\\(ackage\\|r\\(agma\\|ivate\\|ocedure\\)\\)\\|r\\(a\\(ise\\|nge\\)\\|e\\(cord\\|m\\|names\\|turn\\|verse\\)\\)\\|s\\(e\\(lect\\|parate\\)\\|ubtype\\)\\|t\\(ask\\|erminate\\|hen\\|ype\\)\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\|xor" -;; -;; To search for the above regexp takes less than 60% of the time of the simple -;; mapconcat equivalent. -;; -;; But even small regexps may be worth it: -;; -;; (make-regexp '("and" "at" "do" "end" "for" "in" "is" "not" "of" "or" "use")) -;; => "a\\(nd\\|t\\)\\|do\\|end\\|for\\|i[ns]\\|not\\|o[fr]\\|use" -;; -;; as this is 10% faster than the mapconcat equivalent. - -;; Installation: -;; -;; (autoload 'make-regexp "make-regexp" -;; "Return a regexp to match a string item in STRINGS.") -;; -;; (autoload 'make-regexps "make-regexp" -;; "Return a regexp to REGEXPS.") -;; -;; Since these functions were written to produce efficient regexps, not regexps -;; efficiently, it is probably not a good idea to in-line too many calls in -;; your code, unless you use the following neat trick with `eval-when-compile': -;; -;; (defvar definition-regexp -;; (let ((regexp (eval-when-compile -;; (make-regexp '("defun" "defsubst" "defmacro" "defalias" -;; "defvar" "defconst" "defadvice") t)))) -;; (concat "^(" regexp))) -;; -;; The `byte-compile' code will be as if you had defined the variable thus: -;; -;; (defvar definition-regexp -;; "^(\\(def\\(a\\(dvice\\|lias\\)\\|const\\|macro\\|subst\\|un\\|var\\)\\)") - -;; Feedback: -;; -;; Originally written for font-lock, from an idea from Stig's hl319. -;; Please don't tell me that it doesn't produce optimal regexps; I know that -;; already. But (ideas or) code to improve things (are) is welcome. Please -;; test your code and tell me the speed up in searching an appropriate buffer. -;; -;; Please send me bug reports, bug fixes, and extensions, etc. -;; Simon Marshall - -;; History: -;; -;; 1.00--1.01: -;; - Made `make-regexp' take `lax' to force top-level parentheses. -;; - Fixed `make-regexps' for MATCH bug and new `font-lock-keywords'. -;; - Added `unfontify' to user timing functions. -;; 1.01--1.02: -;; - Made `make-regexp' `let' a big `max-lisp-eval-depth'. - -;; The basic idea is to find the shortest common non-"" prefix each time, and -;; squirrel it out. If there is no such prefix, we divide the list into two so -;; that (at least) one half will have at least a one-character common prefix. - -;; In addition, we (a) delay the addition of () parenthesis as long as possible -;; (until we're sure we need them), and (b) try to squirrel out one-character -;; sequences (so we can use [] rather than ()). - -;;; Code: - -(defun make-regexp (strings &optional paren lax) - "Return a regexp to match a string item in STRINGS. -If optional PAREN non-nil, output regexp parentheses around returned regexp. -If optional LAX non-nil, don't output parentheses if it doesn't require them. -Merges keywords to avoid backtracking in Emacs' regexp matcher." - (let* ((max-lisp-eval-depth (* 1024 1024)) - (strings (let ((l strings)) ; Paranoia---make strings unique! - (while l (setq l (setcdr l (delete (car l) (cdr l))))) - (sort strings 'string-lessp))) - (open-paren (if paren "\\(" "")) (close-paren (if paren "\\)" "")) - (open-lax (if lax "" open-paren)) (close-lax (if lax "" close-paren)) - (completion-ignore-case nil)) - (cond - ;; If there's only one string, just return it. - ((= (length strings) 1) - (concat open-lax (car strings) close-lax)) - ;; If there's an empty string, pull it out. - ((string= (car strings) "") - (if (and (= (length strings) 2) (= (length (nth 1 strings)) 1)) - (concat open-lax (nth 1 strings) "?" close-lax) - (concat open-paren "\\|" (make-regexp (cdr strings)) close-paren))) - ;; If there are only one-character strings, make a [] list instead. - ((= (length strings) (apply '+ (mapcar 'length strings))) - (concat open-lax "[" (mapconcat 'identity strings "") "]" close-lax)) - (t - ;; We have a list of strings. Is there a common prefix? - (let ((prefix (try-completion "" (mapcar 'list strings)))) - (if (> (length prefix) 0) - ;; Common prefix! Squirrel it out and recurse with the suffixes. - (let* ((len (length prefix)) - (sufs (mapcar (lambda (str) (substring str len)) strings))) - (concat open-paren prefix (make-regexp sufs t t) close-paren)) - ;; No common prefix. Is there a one-character sequence? - (let ((letters (let ((completion-regexp-list '("^.$"))) - (all-completions "" (mapcar 'list strings))))) - (if (> (length letters) 1) - ;; Do the one-character sequences, then recurse on the rest. - (let ((rest (let ((completion-regexp-list '("^..+$"))) - (all-completions "" (mapcar 'list strings))))) - (concat open-paren - (make-regexp letters) "\\|" (make-regexp rest) - close-paren)) - ;; No one-character sequence, so divide the list into two by - ;; dividing into those that start with a particular letter, and - ;; those that do not. - (let* ((char (substring (car strings) 0 1)) - (half1 (all-completions char (mapcar 'list strings))) - (half2 (nthcdr (length half1) strings))) - (concat open-paren - (make-regexp half1) "\\|" (make-regexp half2) - close-paren)))))))))) - -;; This stuff is realy for font-lock... - -;; Ahhh, the wonders of lisp... -(defun regexp-span (regexp &optional start) - "Return the span or depth of REGEXP. -This means the number of \"\\\\(...\\\\)\" pairs in REGEXP, optionally from START." - (let ((match (string-match (regexp-quote "\\(") regexp (or start 0)))) - (if (not match) 0 (1+ (regexp-span regexp (match-end 0)))))) - -;; The basic idea is to concat the regexps together, keeping count of the span -;; of the regexps so that we can get the correct match for hilighting. -(defun make-regexps (&rest regexps) - "Return a regexp to match REGEXPS -Each item of REGEXPS should be of the form: - - STRING ; A STRING to be used literally. - (STRING MATCH FACE DATA) ; Match STRING at depth MATCH with FACE - ; and highlight according to DATA. - (STRINGS FACE DATA) ; STRINGS is a list of strings FACE is - ; to highlight according to DATA. - -Returns a list of the form: - - (REGEXP (MATCH FACE DATA) ...) - -For example: - - (make-regexps \"^(\" - '((\"defun\" \"defalias\" \"defsubst\" \"defadvice\") keyword) - \"[ \t]*\" - '(\"\\\\([a-zA-Z-]+\\\\)?\" 1 function-name nil t)) - - => - - (\"^(\\\\(def\\\\(a\\\\(dvice\\\\|lias\\\\)\\\\|subst\\\\|un\\\\)\\\\)[ ]*\\\\([a-zA-Z-]+\\\\)?\" - (1 keyword) (4 function-name nil t)) - -Uses `make-regexp' to make efficient regexps." - (let ((regexp "") (data ())) - (while regexps - (cond ((stringp (car regexps)) - (setq regexp (concat regexp (car regexps)))) - ((stringp (nth 0 (car regexps))) - (setq data (cons (cons (+ (regexp-span regexp) - (nth 1 (car regexps))) - (nthcdr 2 (car regexps))) - data) - regexp (concat regexp (nth 0 (car regexps))))) - (t - (setq data (cons (cons (1+ (regexp-span regexp)) - (cdr (car regexps))) - data) - regexp (concat regexp (make-regexp (nth 0 (car regexps)) - t))))) - (setq regexps (cdr regexps))) - (cons regexp (nreverse data)))) - -;; timing functions removed due to name collisions with Gnus - -(provide 'make-regexp) - -;;; make-regexp.el ends here diff --git a/elpa/ess-20191014.1343/news.info b/elpa/ess-20191014.1343/news.info deleted file mode 100644 index b476aa29..00000000 --- a/elpa/ess-20191014.1343/news.info +++ /dev/null @@ -1,416 +0,0 @@ -This is news.info, produced by makeinfo version 6.5 from news.texi. - -Changes and New Features in 19.04 (unreleased): - - * 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 - -mode-hook and -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. See - *Note (ess)Controlling buffer display:: for more information and - examples. - - * '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. - - * 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. - - 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 , - , or markdown-mode with edit-indirect - . - - * 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" )' 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. *Note (ess)Activating and Loading ESS:: for more - information on this feature. - - * 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: - -End Tag Table diff --git a/elpa/ess-20191014.1343/obsolete/ess-noweb-font-lock-mode.el b/elpa/ess-20191014.1343/obsolete/ess-noweb-font-lock-mode.el deleted file mode 100644 index b9ebfbca..00000000 --- a/elpa/ess-20191014.1343/obsolete/ess-noweb-font-lock-mode.el +++ /dev/null @@ -1,392 +0,0 @@ -;;; ess-noweb-font-lock-mode.el --- edit noweb files with GNU Emacs - -;; Copyright (C) 1999 by Adnan Yaqub (AYaqub@orga.com) -;; and Mark Lunt (mark.lunt@mrc-bsu.cam.ac.uk -;; Copyright (C) 2002 by A.J. Rossini -;; Copyright (C) 2003--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - -;; Maintainer: ESS-core - -;; This program 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. -;; -;; This program 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 for more details. -;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ -;; - -;;; Commentary: - -;; Code-dependent highlighting -;; ***** -;; -;; Adding highlighting to ess-noweb-mode.el -;; -;; Here is a description of how one can add highlighting via the -;; font-lock package to noweb buffers. It uses the hooks provided by -;; ess-noweb-mode.el. The solution provides the following features: -;; 1) The documentation chunks are highlighted in the ess-noweb-doc-mode -;; (e.g., LaTeX). -;; 2) The code chunks without mode comments (-*- mode -*-) are -;; highlighted in the ess-noweb-code-mode. -;; 3) The code chunks with mode comments (-*- mode -*-) on the first -;; line of the first chunk with this name are highlighted in the mode -;; in the comment. -;; -;; For example, given the file: -;; -;; % -*- mode: Noweb; ess-noweb-code-mode: c-mode -*- -;; -;; \begin{itemize} -;; \item a main routine written in C, -;; \item a log configuration file parser written in YACC, and -;; \item a lexical analyzer written in Lex. -;; \end{itemize} -;; -;; <>= -;; /* DO NOT EDIT ME! */ -;; /* This file was automatically generated from %W% (%G%). */ -;; @ -;; -;; <>= -;; .\" -*- nroff -*- -;; .\" DO NOT EDIT ME! -;; .\" This file was automatically generated from %W% (%G%). -;; @ -;; -;; The LaTeX list is highlighted in latex-mode (the default noweb doc -;; mode), the chunk <> is highlighted in c-mode (the -;; default noweb code mode), and the chunk <> is -;; highlighted in nroff-mode due to the "-*- nroff -*-" comment. -;; -;; Chunks are highlighted each time point moves into them from a -;; different mode. They are also fontified 'on the fly', but this is -;; less reliable, since the syntax can depend on the context. It's as -;; good as you would get outside ess-noweb-mode, though. -;; -;; To use it, you must add -;; (require 'ess-noweb-font-lock-mode) to your .emacs file. -;; Then, if you use either global-font-lock or turn-on-font-lock -;; statements, any ess-noweb-mode buffers will be fontified -;; appropriately. (We have to redefine turn-on-font-lock, but it -;; saves breaking other packages (in particular ESS, which I use a -;; lot), that assume that turn-on-font-lock is the way to turn on -;; font locking. - -;; Alternatively, you can turn ess-noweb-font-lock-mode on and off by -;; using M-x ess-noweb-font-lock-mode. However, turning -;; ess-noweb-font-lock-mode off when global-font-lock-mode is t makes it -;; impossible to use font-locking in that buffer subsequently, other -;; than by turning ess-noweb-font-lock-mode back on. - -;; 2) The highlighting sometimes get confused, but this is no longer -;; a noweb problem. Highlighting should work as well within a chunk -;; as it does without ess-noweb-mode. -;; There are some problems with, for example latex-mode: a `$' in a -;; verbatim environment with throw the font-locking out. -;; One slight blemish is that code-quotes are highlighted as comments -;; as they are being entered. They are only highlighted correctly -;; after `ess-noweb-font-lock-fontify-chunk' has been run, either as a -;; command or through changing to a different chunk and back again -;; (unless they lie on a single line, in which case they are -;; fontified correctly once they are completed). - -;;; Code: - -(require 'ess-noweb-mode) -(require 'font-lock) - -(defvar ess-noweb-font-lock-mode nil - "Buffer local variable, t iff this buffer is using `ess-noweb-font-lock-mode'.") - -(defvar ess-noweb-use-font-lock-mode t - "DO NOT CHANGE THIS VARIABLE -If you use `nw-turn-on-font-lock' to turn on font-locking, then turn it -off again, it would come back on again of its own accord when you -changed major-mode. This variable is used internally to stop it.") - -(defvar ess-noweb-font-lock-mode-hook nil - "Hook that is run after entering ess-noweb-font-lock mode.") - -(defvar ess-noweb-font-lock-max-initial-chunks 30 - "Maximum number of chunks to fontify initially. -If nil, will fontify the entire buffer when -ess-noweb-font-lock-initial-fontify-buffer is called" ) - -;; (defvar old-beginning-of-syntax nil -;; "Stores the function used to find the beginning of syntax in the -;; current major mode. ess-noweb-font-lock-mode needs a different one." ) - -(defvar ess-noweb-font-lock-doc-start-face font-lock-reference-face - "Face to use to highlight the `@' at the start of each doc chunk") - -(defvar ess-noweb-font-lock-brackets-face font-lock-reference-face - "Face to use to highlight `<<', `>>' `[[' and `]]' ") - -(defvar ess-noweb-font-lock-chunk-name-face font-lock-keyword-face - "Face to use to highlight the between `<<' and `>>'") - -(defvar ess-noweb-font-lock-code-quote-face font-lock-keyword-face - "Face to use to highlight the between `[[' and `]]'") - -;; Now we add [[ess-noweb-font-lock-mode]] to the list of existing minor -;; modes. The string ``NWFL'' will be added to the mode-line: ugly, but -;; brief. - -(if (not (assq 'ess-noweb-font-lock-mode minor-mode-alist)) - (setq minor-mode-alist (append minor-mode-alist - (list '(ess-noweb-font-lock-mode " NWFL"))))) - -;; An ugly kludge to get around problems with global-font-lock, which -;; fontifies the entire buffer in the new major mode every time you -;; change mode, which is time-consuming and makes a pigs trotters of -;; it. Trying to stop it looks tricky, but using this function as your -;; `font-lock-fontify-buffer' function stops it wasting your time - -(defalias 'nwfl-donowt #'ignore) - -;; The following function is just a wrapper for ess-noweb-font-lock-mode, -;; enabling it to be called as ess-noweb-font-lock-minor-mode instead. - -(define-obsolete-function-alias 'ess-noweb-font-lock-minor-mode - #'ess-noweb-font-lock-mode "ESS-16.11") - -;; Here we get to the meat of the problem -;;;###autoload -(defun ess-noweb-font-lock-mode ( &optional arg) - ;; FIXME: Don't define a new minor mode. Instead, arrange for normal - ;; font-lock to call our functions such as - ;; ess-noweb-font-lock-fontify-chunk-by-number. - "Minor mode for syntax highlighting when using `ess-noweb-mode' to edit noweb files. -Each chunk is fontified in accordance with its own mode." - (interactive "P") - (if (or ess-noweb-mode ess-noweb-font-lock-mode) - (progn - ;; This bit is tricky: copied almost verbatim from bib-cite-mode.el - ;; It seems to ensure that the variable ess-noweb-font-lock-mode is made - ;; local to this buffer. It then sets ess-noweb-font-lock-mode to `t' if - ;; 1) It was called with a prefix argument greater than 0 - ;; or 2) It was called with no argument, and ess-noweb-font-lock-mode is - ;; currently nil - ;; ess-noweb-font-lock-mode is nil if the prefix argument was <= 0 or there - ;; was no prefix argument and ess-noweb-font-lock-mode is currently `t' - (set (make-local-variable 'ess-noweb-font-lock-mode) - (if arg - (> (prefix-numeric-value arg) 0) - (not ess-noweb-font-lock-mode))) - ;; Now, if ess-noweb-font-lock-mode is true, we want to turn - ;; ess-noweb-font-lock-mode on - (cond - (ess-noweb-font-lock-mode ;Setup the minor-mode - (when (and (boundp 'global-font-lock-mode) global-font-lock-mode) - (mapc #'ess-noweb-make-variable-permanent-local - '(font-lock-fontify-buffer-function - font-lock-unfontify-buffer-function)) - (setq font-lock-fontify-buffer-function #'nwfl-donowt) - (setq font-lock-unfontify-buffer-function #'nwfl-donowt)) - (mapc #'ess-noweb-make-variable-permanent-local - '(ess-noweb-font-lock-mode - font-lock-dont-widen - ;; font-lock-beginning-of-syntax-function - syntax-begin-function - ess-noweb-use-font-lock-mode - after-change-functions)) - (setq ess-noweb-font-lock-mode t - font-lock-dont-widen t) - (add-hook 'after-change-functions - #'font-lock-after-change-function nil t) - ;; FIXME: Why add ess-noweb-font-lock-mode-fn to our own hook, - ;; instead of just calling ess-noweb-font-lock-mode-fn directly? - (add-hook 'ess-noweb-font-lock-mode-hook #'ess-noweb-font-lock-mode-fn) - (add-hook 'ess-noweb-changed-chunk-hook - #'ess-noweb-font-lock-fontify-this-chunk) - (run-hooks 'ess-noweb-font-lock-mode-hook) - (message "ess-noweb-font-lock mode: use `M-x ess-noweb-font-lock-describe-mode' for more info")) - ;; If we didn't do the above, then we want to turn ess-noweb-font-lock-mode - ;; off, no matter what (hence the condition `t') - (t - (when (and (boundp 'global-font-lock-mode) global-font-lock-mode) - ;; (setq font-lock-fontify-buffer-function - ;; 'font-lock-default-fontify-buffer) - ;; Get back our unfontify buffer function - (setq font-lock-unfontify-buffer-function - #'font-lock-default-unfontify-buffer)) - (remove-hook 'ess-noweb-font-lock-mode-hook #'ess-noweb-font-lock-mode-fn) - (remove-hook 'ess-noweb-changed-chunk-hook - #'ess-noweb-font-lock-fontify-this-chunk) - (remove-hook 'after-change-functions - #'font-lock-after-change-function ) - (font-lock-default-unfontify-buffer) - (setq ess-noweb-use-font-lock-mode nil) - (message "ess-noweb-font-lock-mode removed")))) - (message "ess-noweb-font-lock-mode can only be used with ess-noweb-mode"))) - -(defun ess-noweb-start-of-syntax () - "Go to the place to start fontifying from" - (interactive) - (goto-char (car (ess-noweb-chunk-region)))) - -(defvar font-latex-extend-region-functions) -(defvar syntax-begin-function) - -(defun ess-noweb-font-lock-fontify-chunk-by-number ( chunk-num ) - "Fontify chunk CHUNK-NUM based on the current major mode." - (save-excursion - (font-lock-set-defaults) - ;; (setq old-beginning-of-syntax font-lock-beginning-of-syntax-function) - (setq font-lock-keywords - ;; (append font-lock-keywords - ;; '(("\\(\\[\\[\\)\\([^]]*\\]*\\)\\(\\]\\]\\|\\$\\)" - ;; (1 ess-noweb-font-lock-brackets-face prepend ) - ;; (2 ess-noweb-font-lock-code-quote-face prepend) - ;; (3 ess-noweb-font-lock-brackets-face prepend)) - ;; ("^[ \t\n]*\\(<<\\)\\([^>]*\\)\\(>>=?\\)" - ;; (1 ess-noweb-font-lock-brackets-face prepend ) - ;; (2 ess-noweb-font-lock-chunk-name-face prepend) - ;; (3 ess-noweb-font-lock-brackets-face prepend)) - ;; ("^@[ \t\n]+" - ;; (0 ess-noweb-font-lock-doc-start-face prepend ))))) - (append font-lock-keywords - '(("^[ \t\n]*\\(<<\\)\\([^>]*\\)\\(>>=?\\)" - ;; FIXME: Why not use ess-noweb-font-lock-brackets-face? - (1 font-lock-reference-face prepend ) - ;; FIXME: Why not use ess-noweb-font-lock-chunk-name-face? - (2 font-lock-keyword-face prepend) - (3 font-lock-reference-face prepend)) - ("^@[ \t\n]+" - (0 font-lock-reference-face prepend ))))) - - - (let ((r (cons (marker-position (cdr (aref ess-noweb-chunk-vector - chunk-num))) - (marker-position (cdr (aref ess-noweb-chunk-vector - (1+ chunk-num)))))) - (font-latex-extend-region-functions nil);; don't extend anything - (font-lock-extend-region-functions nil)) ;; this infloops :( - (save-restriction - (narrow-to-region (car r) (cdr r)) - ;; (sit-for 3) - (font-lock-fontify-region (car r) (cdr r))) - t))) - - -(defun ess-noweb-font-lock-fontify-this-chunk () - "Fontify this chunk according to its own major mode. -Since we are in the chunk, the major mode will already have been set -by ess-noweb-mode.el" - (interactive) - (ess-noweb-font-lock-fontify-chunk-by-number (ess-noweb-find-chunk-index-buffer))) - -(defun ess-noweb-font-lock-initial-fontify-buffer () - "Applies syntax highlighting to some or all chunks in a noweb buffer. -The number of chunks is set by `ess-noweb-font-lock-max-initial-chunks': if -this is nil, the entire buffer is fontified. -It is intended to be called when first entering `ess-noweb-font-lock-mode'. -For other purposes, use `ess-noweb-font-lock-fontify-chunks'." - (interactive) - ;; This will be tricky. It will be very slow to go throught the chunks - ;; in order, switching major modes all the time. - ;; So, we will do the documentation in one pass, the code in a second - ;; pass. This could still be a little slow if we have to swap between - ;; different code modes regularly, but it should be bearable. It should - ;; only happen when the file is first read in, anyway - (save-excursion - (let (start-chunk end-chunk this-chunk) - (setq this-chunk (ess-noweb-find-chunk-index-buffer)) - (if ess-noweb-font-lock-max-initial-chunks - (progn - (setq start-chunk - (max 0 - (- this-chunk - (/ ess-noweb-font-lock-max-initial-chunks 2)))) - ;; Don't you just love hairy lisp syntax ? The above means set the - ;; starting chunk to the current chunk minus half of - ;; ess-noweb-font-lock-max-initial-chunks, unless that is negative in - ;; which case set it to 0 - (setq end-chunk (+ start-chunk ess-noweb-font-lock-max-initial-chunks)) - (if (> end-chunk (- (length ess-noweb-chunk-vector) 2)) - (setq end-chunk (- (length ess-noweb-chunk-vector) 2)))) - ;; If ess-noweb-font-lock-max-initial-chunks is nil, do the whole buffer - (progn - (setq start-chunk 0) - (setq end-chunk (- (length ess-noweb-chunk-vector) 2)))) - (ess-noweb-font-lock-fontify-chunks start-chunk end-chunk)))) - -(defun ess-noweb-font-lock-fontify-buffer () - "This function will fontify each chunk in the buffer appropriately." - (interactive) - (let ((start-chunk 0) - (end-chunk (- (length ess-noweb-chunk-vector) 2))) - (ess-noweb-font-lock-fontify-chunks start-chunk end-chunk))) - -(defun ess-noweb-font-lock-fontify-chunks (start-chunk end-chunk) - "Fontify a noweb file from START-CHUNK to END-CHUNK." - (interactive) - (let ((chunk-counter start-chunk)) - (save-excursion - (message "Fontifying from %d to %d" start-chunk end-chunk) - ;; Want to set DOC mode for the first Doc chunk, not for the others - (while (stringp (car (aref ess-noweb-chunk-vector chunk-counter))) - (setq chunk-counter (+ chunk-counter 1))) - (goto-char (cdr (aref ess-noweb-chunk-vector chunk-counter))) - (ess-noweb-select-mode) - ;; Now go through the chunks, fontifying the documentation ones. - (while (<= chunk-counter end-chunk) - (if (not (stringp (car (aref ess-noweb-chunk-vector chunk-counter)))) - (ess-noweb-font-lock-fontify-chunk-by-number chunk-counter)) - (message "Fontifying documentation chunks: chunk %d" chunk-counter) - (setq chunk-counter (+ 1 chunk-counter))) - ;; Go back to the start and go through the chunks, fontifying the code ones. - (setq chunk-counter start-chunk) - (message "About to do code chunks") - (while (<= chunk-counter end-chunk) - (when (stringp (car (aref ess-noweb-chunk-vector chunk-counter))) - ;; It's a code chunk: goto it to set the correct code mode, then - ;; fontify it. - (message "Fontifying code chunks: chunk %d" chunk-counter) - (goto-char (cdr (aref ess-noweb-chunk-vector chunk-counter))) - (ess-noweb-select-mode) - (ess-noweb-font-lock-fontify-this-chunk)) - (setq chunk-counter (1+ chunk-counter)))) - (ess-noweb-select-mode))) - -(defun ess-noweb-font-lock-mode-fn() - "Function that is intended to be attached to ess-noweb-font-lock-mode-hook." - (ess-noweb-font-lock-initial-fontify-buffer)) - -;; This is a wee bit of a hack. If people attach `turn-on-font-lock' -;; to their major mode hook, it will play hell with -;; ess-noweb-font-lock-mode. I had hoped that providing a replacement -;; `nw-turn-on-font-lock' would solve the problem, but it didn't -;; (sometimes turn-on-font-lock appears in places other than -;; `.emacs', such as in ESS). So rather than have it fall over if -;; turn-on-lock was around, I redefined turn-on-font-lock to do the -;; right thing. - -(define-obsolete-function-alias 'nw-turn-on-font-lock - #'turn-on-font-lock "ESS-16.11") - -(defadvice turn-on-font-lock (around ess-noweb-font-lock activate) - ;; FIXME: An advice on turn-on-font-lock is definitely not sufficient, - ;; since font-lock can be enabled without going through turn-on-font-lock! - (if (not ess-noweb-mode) - ad-do-it - (if (and (not ess-noweb-font-lock-mode) ess-noweb-use-font-lock-mode) - (ess-noweb-font-lock-mode)))) - -(provide 'ess-noweb-font-lock-mode) -;; ***** -;; -;; Adnan Yaqub (AYaqub@orga.com) -;; ORGA Kartensysteme GmbH // An der Kapelle 2 // D-33104 Paderborn // Germany -;; Tel. +49 5254 991-823 //Fax. +49 5254 991-749 - - -;;; ess-noweb-font-lock-mode.el ends here diff --git a/elpa/ess-20191014.1343/obsolete/ess-noweb-mode.el b/elpa/ess-20191014.1343/obsolete/ess-noweb-mode.el deleted file mode 100644 index 392693c9..00000000 --- a/elpa/ess-20191014.1343/obsolete/ess-noweb-mode.el +++ /dev/null @@ -1,1938 +0,0 @@ -;;; ess-noweb-mode.el --- edit noweb files with GNU Emacs - -;; Copyright (C) 1995 by Thorsten.Ohl @ Physik.TH-Darmstadt.de -;; with a little help from Norman Ramsey -;; and Mark Lunt -;; and A.J. Rossini -;; Copyright (C) 1999--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2012 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. - -;; ESS-related Changes first added by Mark Lunt and A.J. Rossini, March, 1999. - -;; Maintainer: ESS-core - -;; This program 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. -;; -;; This program 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 for more details. -;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;; See bottom of this file for information on language-dependent -;; highlighting, and recent changes. -;; - -;; BASED ON: (from Mark Lunt). -;; -- Id: ess-noweb-mode.el,v 1.11 1999/03/21 20:14:41 root Exp -- - - -;;; NEWS: - -;; * [tho] M-n q, aka: M-x ess-noweb-fill-chunk -;; -;; * [tho] `M-n TAB', aka: `M-x ess-noweb-complete-chunk' -;; -;; * [tho] ess-noweb-occur -;; -;; * [nr] use `M-n' instead of `C-c n' as default command prefix -;; -;; * [nr] don't be fooled by -;; -;; @ -;; <>= -;; int foo; -;; @ %def foo -;; Here starts a new documentation chunk! -;; <>= -;; int bar; -;; -;; * [nr] switch mode changing commands off during isearch-mode -;; -;; * [tho] ess-noweb-goto-chunk proposes a default -;; -;; * commands for tangling, weaving,.. for Sweave: --> ./ess-swv.el -;; - - -;;; TODO: - -;; * _maybe_ replace our `ess-noweb-chunk-vector' by text properties. We -;; could then use highlighting to jazz up the visual appearance. -;; (Highlighting is sorted: `ess-noweb-chunk-vector' can be -;; ditched. It is simple to determine if we are in a doc or code -;; chunk.) -;; -;; * wrapped `ess-noweb-goto-next' and `ess-noweb-goto-previous' -;; -;; * more range checks and error exits -;; -;; * `ess-noweb-hide-code-quotes' should be superfluous now, and could -;; be removed. For ESS 5.3.10, we disable these, using the new variable -;; ess-noweb-code-quote-handling. If nobody misses that code-protecting -;; behavior, all that should be removed entirely. - -;;; Code: - -(require 'ess-custom) -(require 'ess-utils) - -(defcustom Rnw-mode-hook nil - "Hook run when entering Rnw mode." - :type 'hook - :group 'ess-R) - -(defvar-local ess--make-local-vars-permanent nil - "If this variable is non-nil in a buffer make all variable permannet. -Used in noweb modes.") -(put 'ess--make-local-vars-permanent 'permanent-local t) - -(defvar weave-process) - - -;;; Variables - -;; (defconst ess-noweb-mode-RCS-Id -;; "Imported to ESS Subversion repository and RCS ids not maintained.") - -;; (defconst ess-noweb-mode-RCS-Name -;; " ") - -(defvar-local ess--make-local-vars-permanent nil - "If this variable is non-nil in a buffer make all variable permannet. -Used in noweb modes.") -(put 'ess--make-local-vars-permanent 'permanent-local t) - -(defvar ess-noweb-mode-prefix "\M-n" - "Prefix key to use for noweb mode commands. -The value of this variable is checked as part of loading noweb mode. -After that, changing the prefix key requires manipulating keymaps.") - -(defvar ess-noweb-mode-load-hook nil - "Hook that is run after noweb mode is loaded.") - -(defvar ess-noweb-mode-hook nil - "Hook that is run after entering noweb mode.") - -(defvar ess-noweb-select-code-mode-hook nil - "Hook that is run after the code mode is selected. -This is the place to overwrite keybindings of the ess-noweb-CODE-MODE.") - -(defvar ess-noweb-select-doc-mode-hook nil - "Hook that is run after the documentation mode is selected. -This is the place to overwrite keybindings of the ess-noweb-DOC-MODE.") - -(defvar ess-noweb-select-mode-hook nil - "Hook that is run after the documentation or the code mode is selected. -This is the place to overwrite keybindings of the other modes.") - -(defvar ess-noweb-changed-chunk-hook nil - "Hook that is run every time point moves from one chunk to another. -It will be run whether or not the major-mode changes.") - -(defvar ess-noweb-default-code-mode 'fundamental-mode - "Default major mode for editing code chunks. -This is set to FUNDAMENTAL-MODE by default, but you might want to -change this in the Local Variables section of your file to something -more appropriate, like C-MODE, FORTRAN-MODE, or even -INDENTED-TEXT-MODE.") - -(defvar ess-noweb-code-mode 'c-mode - "Major mode for editing this particular code chunk. -It defaults to ess-noweb-default-code-mode, but can be reset by a comment -on the first line of the chunk containing the string -\"-*- NEWMODE -*-\" or -\"-*- NEWMODE-mode -*-\" or -\"-*- mode: NEWMODE -*- \" or -\"-*- mode: NEWMODE-mode -*- \" -Option three is recommended, as it is the closest to standard emacs usage.") - -(defvar ess-noweb-default-doc-mode 'latex-mode - "Major mode for editing documentation chunks. -Sensible choices would be tex-mode, latex-mode, sgml-mode, or -html-mode. Maybe others will exist someday.") - -(defvar ess-noweb-doc-mode-syntax-table nil - "A syntax-table syntax table that makes quoted code in doc chunks to -behave.") - -(defvar ess-noweb-last-chunk-index 0 - "This keeps track of the chunk we have just been in. If this is not -the same as the current chunk, we have to check if we need to change -major mode.") - -(defvar ess-noweb-chunk-vector nil - "Vector of the chunks in this buffer.") - -(defvar ess-noweb-narrowing nil - "If not NIL, the display will always be narrowed to the -current chunk pair.") - -(defvar ess-noweb-electric-@-and-< t - "If not nil, the keys `@' and `<' will be bound to ess-noweb-ELECTRIC-@ -and ess-noweb-ELECTRIC-<, respectively.") - -(defvar ess-noweb-use-mouse-navigation t - "If not nil, enables moving between chunks using mouse-1. -Clicking on the '<<' at the beginning of a chunk name takes you to the -previous occurence of that chunk name, clicking on the '>>' takes you -to the next. -Assumes mouse-1 is bound to mouse-set-point, so if you have rebound -mouse-1, this will override your binding.") - -(defvar ess-noweb-code-quotes-handling nil - "If not nil, the function pair \\[ess-noweb-hide-code-quotes] and -\\[ess-noweb-restore-code-quotes] are used to \"protect\" code inside -\"[[\" .. \"]]\" pairs. Note that rarely this has been found to be buggy -with the \"catastrophic\" consequence of whole parts of your document being -replaced by sequences of '*'.") - -(defvar ess-noweb-doc-mode ess-noweb-default-doc-mode - "Default major mode for editing noweb documentation chunks. -It is not possible to have more than one doc-mode in a file. -However, this variable is used to determine whether the doc-mode needs -to by added to the mode-line") - -;; The following is apparently broken -- dangling code that was -;; commented out. Need to see if we can get it working? - -(defvar ess-noweb-weave-options "-delay") -(defvar ess-noweb-latex-viewer "xdvi") -(defvar ess-noweb-html-viewer "netscape") - -(defun ess-noweb-weave (&optional name) - (interactive) - (let ((buffer (get-buffer-create "Weave Buffer"))) - (if (not name) - (progn - ;; Assume latex documentation, but set to html if appropriate - (if (eq ess-noweb-doc-mode 'html-mode) - (setq name (concat (substring (buffer-file-name) 0 - (string-match ".nw" name)) - ".html")) - (setq name (concat (substring (buffer-file-name) 0 - (string-match ".nw" name)) - ".tex"))))) - (setq name (concat "> " name)) - (setq ess-noweb-weave-options (concat ess-noweb-weave-options name)) - (start-process weave-process buffer "noweave" ess-noweb-weave-options))) -;;(defun ess-noweb-view ()) - - -;;; Setup -(defvar ess-noweb-mode nil - "Buffer local variable, T iff this buffer is edited in noweb mode.") - -;; For some reason that I do not understand, `newline' does not do the -;; right thing in quoted code. If point is not preceded by whitespace, -;; it moves to the beginning of the current line, not the beginning of -;; the new line. `newline 1' works fine, hence the kludge. I'd love to -;; understand what's going on, though. Try running M-x newline in the -;; middle of a code quote in a doc chunk to see -;; what I mean: its odd. - -(defun ess-noweb-newline (&optional arg) - "A kludge to get round very odd behaviour of newline in quoted code." - (interactive "p") - (if arg (newline arg) (newline 1)) - (ess-noweb-indent-line)) - -(defvar ess-noweb-mode-prefix-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-\M-x" 'ess-eval-chunk) - (define-key map "\C-c" 'ess-eval-chunk-and-step) - (define-key map "\C-n" 'ess-noweb-next-chunk) - (define-key map "\C-p" 'ess-noweb-previous-chunk) - (define-key map "\M-n" 'ess-noweb-goto-next) - (define-key map "\M-m" 'ess-noweb-insert-default-mode-line) - (define-key map "\M-p" 'ess-noweb-goto-previous) - (define-key map "c" 'ess-noweb-next-code-chunk) - (define-key map "C" 'ess-noweb-previous-code-chunk) - (define-key map "d" 'ess-noweb-next-doc-chunk) - (define-key map "D" 'ess-noweb-previous-doc-chunk) - (define-key map "g" 'ess-noweb-goto-chunk) - (define-key map "\C-l" 'ess-noweb-update-chunk-vector) - (define-key map "\M-l" 'ess-noweb-update-chunk-vector) - (define-key map "w" 'ess-noweb-copy-chunk-as-kill) - (define-key map "W" 'ess-noweb-copy-chunk-pair-as-kill) - (define-key map "k" 'ess-noweb-kill-chunk) - (define-key map "K" 'ess-noweb-kill-chunk-pair) - (define-key map "m" 'ess-noweb-mark-chunk) - (define-key map "M" 'ess-noweb-mark-chunk-pair) - (define-key map "n" 'ess-noweb-narrow-to-chunk) - (define-key map "N" 'ess-noweb-narrow-to-chunk-pair) - (define-key map "t" 'ess-noweb-toggle-narrowing) - (define-key map "\t" 'ess-noweb-complete-chunk) - (define-key map "q" 'ess-noweb-fill-chunk) - (define-key map "i" 'ess-noweb-new-chunk) - (define-key map "o" 'ess-noweb-occur) - ;;(define-key map "v" 'ess-noweb-mode-version) - (define-key map "h" 'ess-noweb-describe-mode) - ;; do *NOT* override C-h (give all keybindings startings with M-n! - map) - "noweb minor-mode prefix keymap") - -(defvar ess-noweb-minor-mode-map - (let ((map (make-sparse-keymap))) - (if ess-noweb-electric-@-and-< - (progn - (define-key map "@" 'ess-noweb-electric-@) - (define-key map "<" 'ess-noweb-electric-<))) - (define-key map "\M-q" 'ess-noweb-fill-paragraph-chunk) - (define-key map [(control meta ?\\)] 'ess-noweb-indent-region) - ;;(define-key map "\C-c\C-n" 'ess-noweb-indent-line) ; Override TeX-normal! - (define-key map "\t" 'ess-noweb-indent-line) - ;; (define-key map [tab] 'ess-noweb-indent-line) ;; interferes with ac - (define-key map "\r" 'ess-noweb-newline) - ;; (define-key map [return] 'ess-noweb-newline) ;; interferes with ac - (define-key map [mouse-1] 'ess-noweb-mouse-first-button) - (define-key map ess-noweb-mode-prefix ess-noweb-mode-prefix-map) - map) - "ESS Noweb minor mode keymap") - -(easy-menu-define - ess-noweb-minor-mode-menu ess-noweb-minor-mode-map - "Menu keymap for noweb." - '("Noweb" - ("Movement" - ["Previous chunk" ess-noweb-previous-chunk t] - ["Next chunk" ess-noweb-next-chunk t] - ["Previous chunk of same name" ess-noweb-goto-previous t] - ["Next chunk of same name" ess-noweb-goto-next t] - ["Goto chunk" ess-noweb-goto-chunk t] - ["Previous code chunk" ess-noweb-previous-code-chunk t] - ["Next code chunk" ess-noweb-next-code-chunk t] - ["Previous documentation chunk" ess-noweb-previous-doc-chunk t] - ["Next documentation chunk" ess-noweb-next-doc-chunk t]) - ("Editing" - ["Copy chunk" ess-noweb-copy-chunk-as-kill t] - ["Copy chunk pair" ess-noweb-copy-chunk-pair-as-kill t] - ["Kill chunk" ess-noweb-kill-chunk t] - ["Kill chunk pair" ess-noweb-kill-chunk-pair t] - ["Mark chunk" ess-noweb-mark-chunk t] - ["Mark chunk pair" ess-noweb-mark-chunk-pair t]) - ("Narrowing" - ["Narrow to chunk" ess-noweb-narrow-to-chunk t] - ["Narrow to chunk pair" ess-noweb-narrow-to-chunk-pair t] - ["Toggle auto narrowing" ess-noweb-toggle-narrowing t] - ["Widen" widen t]) - ("Modes" - ["Set documentation mode" ess-noweb-set-doc-mode t] - ["Set default code mode" ess-noweb-set-code-mode t] - ["Set code mode for this chunk" ess-noweb-set-this-code-mode t] - ["Insert default mode line" ess-noweb-insert-default-mode-line t]) - ("Tangling" - ["Tangle current chunk" ess-noweb-tangle-chunk t] - ["Tangle current thread" ess-noweb-tangle-current-thread t] - ["Tangle named thread" ess-noweb-tangle-thread t]) - ("Miscellaneous" - ["Complete chunk name" ess-noweb-complete-chunk t] - ["Fill current chunk" ess-noweb-fill-chunk t] - ["Insert new chunk" ess-noweb-new-chunk t] - ["Update the chunk vector" ess-noweb-update-chunk-vector t] - ["Chunk occurrences" ess-noweb-occur t]) - "--" - ["Help" ess-noweb-describe-mode t] - ;;["Version" ess-noweb-mode-version t] - )) - -;; Add ess-noweb-mode to the list of minor modes -(if (not (assq 'ess-noweb-mode minor-mode-alist)) - (setq minor-mode-alist (append minor-mode-alist - (list '(ess-noweb-mode " Noweb"))))) -;; Add ess-noweb-minor-mode-map to the list of minor-mode keymaps -;; available. Then, whenever ess-noweb-mode is activated, the keymap is -;; automatically activated -(if (not (assq 'ess-noweb-mode minor-mode-map-alist)) - (setq minor-mode-map-alist - (cons (cons 'ess-noweb-mode ess-noweb-minor-mode-map) - minor-mode-map-alist))) - -(defun ess-noweb-minor-mode (&optional arg) - "Minor meta mode for editing noweb files. See ess-noweb-mode." - (interactive) - (ess-noweb-mode arg)) ; this was ess-noweb-minor-mode??? (truly recursive) - -(declare-function ess-noweb-font-lock-mode "ess-noweb-font-lock-mode") - -;;;###autoload -(defun ess-noweb-mode ( &optional arg ) - "Minor meta mode for editing noweb files. -`Meta' refers to the fact that this minor mode is switching major -modes depending on the location of point. - -The following special keystrokes are available in noweb mode: - -Movement: -\\[ess-noweb-next-chunk] \tgoto the next chunk -\\[ess-noweb-previous-chunk] \tgoto the previous chunk -\\[ess-noweb-goto-previous] \tgoto the previous chunk of the same name -\\[ess-noweb-goto-next] \tgoto the next chunk of the same name -\\[ess-noweb-goto-chunk] \t\tgoto a chunk -\\[ess-noweb-next-code-chunk] \t\tgoto the next code chunk -\\[ess-noweb-previous-code-chunk] \t\tgoto the previous code chunk -\\[ess-noweb-next-doc-chunk] \t\tgoto the next documentation chunk -\\[ess-noweb-previous-doc-chunk] \t\tgoto the previous documentation chunk - -Copying/Killing/Marking/Narrowing: -\\[ess-noweb-copy-chunk-as-kill] \t\tcopy the chunk the point is in into the kill ring -\\[ess-noweb-copy-chunk-pair-as-kill] \t\tcopy the pair of doc/code chunks the point is in -\\[ess-noweb-kill-chunk] \t\tkill the chunk the point is in -\\[ess-noweb-kill-chunk-pair] \t\tkill the pair of doc/code chunks the point is in -\\[ess-noweb-mark-chunk] \t\tmark the chunk the point is in -\\[ess-noweb-mark-chunk-pair] \t\tmark the pair of doc/code chunks the point is in -\\[ess-noweb-narrow-to-chunk] \t\tnarrow to the chunk the point is in -\\[ess-noweb-narrow-to-chunk-pair] \t\tnarrow to the pair of doc/code chunks the point is in -\\[widen] \twiden -\\[ess-noweb-toggle-narrowing] \t\ttoggle auto narrowing - -Filling and Indenting: -\\[ess-noweb-fill-chunk] \tfill (or indent) the chunk at point according to mode -\\[ess-noweb-fill-paragraph-chunk] \tfill the paragraph at point, restricted to chunk -\\[ess-noweb-indent-line] \tindent the line at point according to mode - -Insertion: -\\[ess-noweb-insert-default-mode-line] \tinsert a line to set this file's code mode -\\[ess-noweb-new-chunk] \t\tinsert a new chunk at point -\\[ess-noweb-complete-chunk] \tcomplete the chunk name before point -\\[ess-noweb-electric-@] \t\tinsert a `@' or start a new doc chunk -\\[ess-noweb-electric-<] \t\tinsert a `<' or start a new code chunk - -Modes: -\\[ess-noweb-set-doc-mode] \t\tset the major mode for editing doc chunks -\\[ess-noweb-set-code-mode] \tset the major mode for editing code chunks -\\[ess-noweb-set-this-code-mode] \tset the major mode for editing this code chunk - -Misc: -\\[ess-noweb-occur] \t\tfind all occurrences of the current chunk -\\[ess-noweb-update-chunk-vector] \tupdate the markers for chunks -\\[ess-noweb-describe-mode] \tdescribe ess-noweb-mode -" (interactive "P") - ;; This bit is tricky: copied almost verbatim from bib-cite-mode.el - ;; It seems to ensure that the variable ess-noweb-mode is made - ;; local to this buffer. It then sets ess-noweb-mode to `t' if - ;; 1) It was called with an argument greater than 0 - ;; or 2) It was called with no argument, and ess-noweb-mode is - ;; currently nil - ;; ess-noweb-mode is nil if the argument was <= 0 or there - ;; was no argument and ess-noweb-mode is currently `t' - (kill-all-local-variables) - (set (make-local-variable 'ess-noweb-mode) - (if arg - (> (prefix-numeric-value arg) 0) - (not ess-noweb-mode))) - ;; Now, if ess-noweb-mode is true, we want to turn - ;; ess-noweb-mode on - (cond - (ess-noweb-mode ;Setup the minor-mode - (mapc 'ess-noweb-make-variable-permanent-local - '(ess-noweb-mode - ess-local-process-name ;; also made permanent in ess-mode, but let it be - ess-dialect - ess-language - ess-use-flymake - after-change-functions - before-change-functions - ess-noweb-narrowing - ess-noweb-chunk-vector - post-command-hook - isearch-mode-hook - isearch-mode-end-hook - ess-noweb-doc-mode - ess-noweb-code-mode - ess-noweb-default-code-mode - ess-noweb-last-chunk-index)) - (setq-local ess-use-flymake nil) - (ess-noweb-update-chunk-vector) - (setq ess-noweb-last-chunk-index - (if (equal 0 (ess-noweb-find-chunk-index-buffer)) 1 0)) - (if font-lock-mode - (progn - (font-lock-mode -1) - (ess-noweb-font-lock-mode 1))) - (add-hook 'post-command-hook 'ess-noweb-post-command-function) - - (add-hook 'after-change-functions 'ess-noweb-after-change-function nil t) - (add-hook 'before-change-functions 'ess-noweb-before-change-function nil t) - - (add-hook 'ess-noweb-select-doc-mode-hook 'ess-noweb-auto-fill-doc-mode) - (add-hook 'ess-noweb-select-code-mode-hook 'ess-noweb-auto-fill-code-mode) - (add-hook 'isearch-mode-hook 'ess-noweb-note-isearch-mode) - (add-hook 'isearch-mode-end-hook 'ess-noweb-note-isearch-mode-end) - (setq ess-noweb-doc-mode-syntax-table nil) - (run-hooks 'ess-noweb-mode-hook) - (message - "noweb mode: use `M-x ess-noweb-describe-mode' for further information")) - ;; If we didn't do the above, then we want to turn ess-noweb-mode - ;; off, no matter what (hence the condition `t') - (t - (remove-hook 'post-command-hook 'ess-noweb-post-command-function) - - (remove-hook 'after-change-functions 'ess-noweb-after-change-function t) - (remove-hook 'before-change-functions 'ess-noweb-before-change-function t) - - (remove-hook 'ess-noweb-select-doc-mode-hook 'ess-noweb-auto-fill-doc-mode) - (remove-hook 'ess-noweb-select-code-mode-hook 'ess-noweb-auto-fill-code-mode) - (remove-hook 'isearch-mode-hook 'ess-noweb-note-isearch-mode) - (remove-hook 'isearch-mode-end-hook 'ess-noweb-note-isearch-mode-end) - (if (and (boundp 'ess-noweb-font-lock-mode) - ess-noweb-font-lock-mode) - (progn - (ess-noweb-font-lock-mode -1) - (message "ESS-Noweb and ESS-Noweb-Font-Lock Modes Removed")) - (message "ESS-Noweb mode removed"))))) - -(defun ess-noweb-make-variable-permanent-local (var) - "Declare VAR buffer local, but protect it from beeing killed -by major mode changes." - (make-variable-buffer-local var) - (put var 'permanent-local 't)) - -(defun ess-noweb-note-isearch-mode () - "Take note of an incremental search in progress" - (remove-hook 'post-command-hook 'ess-noweb-post-command-function)) - -(defun ess-noweb-note-isearch-mode-end () - "Take note of an incremental search having ended" - (add-hook 'post-command-hook 'ess-noweb-post-command-function)) - -(defun ess-noweb-post-command-function () - "The hook being run after each command in noweb mode." - (ess-noweb-select-mode)) - -(defvar ess-noweb-chunk-boundary-changed nil - "Whether the current change affects a chunk boundary.") - -(defvar ess-noweb-chunk-boundary-regexp "^\\(@[^@]\\)\\|\\(<<\\)") - -(defun ess-noweb-before-change-function (begin end) - "Record changes to chunk boundaries." - (save-excursion - (goto-char begin) - (setq ess-noweb-chunk-boundary-changed - (re-search-forward ess-noweb-chunk-boundary-regexp end t)))) - -(defun ess-noweb-after-change-function (begin end length) - "Function to run after every change in a noweb buffer. -If the changed region contains a chunk boundary, it will update -the chunk vector" - (save-excursion - (goto-char begin) - (when (or ess-noweb-chunk-boundary-changed - (re-search-forward ess-noweb-chunk-boundary-regexp end t)) - (ess-noweb-update-chunk-vector) - (setq ess-noweb-chunk-boundary-changed nil)))) - - -;;; Chunks - -(defun ess-noweb-update-chunk-vector () - "Scan the whole buffer and place a marker at each \"^@\" and \"^<<\". -Record them in ess-noweb-CHUNK-VECTOR." - (interactive) - (save-excursion - (goto-char (point-min)) - (let ((chunk-list (list (cons 'doc (point-marker))))) - (while (re-search-forward "^\\(@\\( \\|$\\|\\( %def\\)\\)\\|<<\\(.*\\)>>=\\)" nil t) - (goto-char (match-beginning 0)) - ;; If the 3rd subexpression matched @ %def, we're still in a code - ;; chunk (sort of), so don't place a marker here. - (if (not (match-beginning 3)) - (setq chunk-list - ;; If the 4th subexpression matched inside <<...>>, - ;; we're seeing a new code chunk. - (cons (cons (if (match-beginning 4) - ;;buffer-substring-no-properties better - ;;than buffer-substring if highlighting - ;;may be used - (buffer-substring-no-properties - (match-beginning 4) (match-end 4)) - 'doc) - (point-marker)) - chunk-list)) - ;; Scan forward either to !/^@ %def/, which will start a docs chunk, - ;; or to /^<<.*>>=$/, which will start a code chunk. - (progn - (forward-line 1) - (while (looking-at "@ %def") - (forward-line 1)) - (setq chunk-list - ;; Now we can tell code vs docs - (cons (cons (if (looking-at "<<\\(.*\\)>>=") - (buffer-substring-no-properties - (match-beginning 1) (match-end 1)) - 'doc) - (point-marker)) - chunk-list)))) - (forward-line 1)) - (setq chunk-list (cons (cons 'doc (point-max-marker)) chunk-list)) - (setq ess-noweb-chunk-vector (vconcat (reverse chunk-list)))))) - -(defun ess-noweb-find-chunk () - "Return a pair consisting of the name (or 'DOC) and the -marker of the current chunk." - (if (not ess-noweb-chunk-vector) - (ess-noweb-update-chunk-vector)) - (aref ess-noweb-chunk-vector (ess-noweb-find-chunk-index-buffer))) - -(defun ess-noweb-chunk-is-code (index) - "Return t if the chunk 'index' is a code chunk, nil otherwise" - (interactive) - (stringp (car (ess-noweb-chunk-vector-aref index)))) - -(defun ess-noweb-in-code-chunk () - "Return t if we are in a code chunk, nil otherwise." - (interactive) - (ess-noweb-chunk-is-code (ess-noweb-find-chunk-index-buffer))) - -(defun ess-noweb-in-mode-line () - "Return the name of the mode to use if we are in a mode line, nil -otherwise." - (interactive) - (let (beg end mode) - (save-excursion - (beginning-of-line 1) - (and (progn - (ess-write-to-dribble-buffer - (format "(n-i-m-l: 1)")) - (search-forward "-*-" - (save-excursion (end-of-line) (point)) - t)) - (progn - (ess-write-to-dribble-buffer - (format "(n-i-m-l: 2)")) - (skip-chars-forward " \t") - (setq beg (point)) - (search-forward "-*-" - (save-excursion (end-of-line) (point)) - t)) - (progn - (ess-write-to-dribble-buffer - (format "(n-i-m-l: 3)")) - (forward-char -3) - (skip-chars-backward " \t") - (setq end (point)) - (goto-char beg) - (setq mode (concat - (downcase (buffer-substring beg end)) - "-mode")) - (if (and (>= (length mode) 11)) - (progn - (if - (equal (substring mode -10 -5) "-mode") - (setq mode (substring mode 0 -5))) - (if - (equal (substring mode 0 5) "mode:") - (setq mode (substring mode 6)))))) - (progn - (ess-write-to-dribble-buffer - (format "(n-i-m-l: 3) mode=%s" mode)) - (intern mode)))))) - -(defun ess-noweb-find-chunk-index-buffer () - "Return the index of the current chunk in ess-noweb-CHUNK-VECTOR." - (ess-noweb-find-chunk-index 0 (1- (length ess-noweb-chunk-vector)))) - -(defun ess-noweb-find-chunk-index (low hi) - (if (= hi (1+ low)) - low - (let ((med (/ (+ low hi) 2))) - (if (< (point) (cdr (aref ess-noweb-chunk-vector med))) - (ess-noweb-find-chunk-index low med) - (ess-noweb-find-chunk-index med hi))))) - -(defun ess-noweb-chunk-region () - "Return a pair consisting of the beginning and end of the current chunk." - (interactive) - (let ((start (ess-noweb-find-chunk-index-buffer))) - (cons (marker-position (cdr (aref ess-noweb-chunk-vector start))) - (marker-position (cdr (aref ess-noweb-chunk-vector (1+ start))))))) - -(defun ess-noweb-copy-code-chunk () - "Copy the current code chunk to the kill ring, excluding the chunk name. -This will be particularly useful when interfacing with ESS." - (interactive) - (let ((r (ess-noweb-chunk-region))) - (save-excursion - (goto-char (car r)) - (if (ess-noweb-in-code-chunk) - (progn - (beginning-of-line 2) - (copy-region-as-kill (point) (cdr r))))))) - -(defun ess-noweb-extract-code-chunk () - "Create a new buffer with the same name as the current code chunk, -and copy all code from chunks of the same name to it." - (interactive) - (save-excursion - (if (ess-noweb-in-code-chunk) - (progn - (let ((chunk-name (car (ess-noweb-find-chunk))) - (chunk-counter 0) - (copy-counter 0) - (this-chunk) (oldbuf (current-buffer))) - (if (get-buffer chunk-name) - (progn - (set-buffer-modified-p nil) - (kill-buffer chunk-name))) - (get-buffer-create chunk-name) - (message "Created buffer %s" chunk-name) - (while (< chunk-counter (- (length ess-noweb-chunk-vector) 2)) - (setq this-chunk (ess-noweb-chunk-vector-aref - chunk-counter)) - (message "Current buffer is %s" (car this-chunk)) - (if (equal chunk-name (car this-chunk)) - (progn - (setq copy-counter (+ copy-counter 1)) - (goto-char (cdr this-chunk)) - (ess-noweb-copy-code-chunk) - (set-buffer chunk-name) - (goto-char (point-max)) - (yank) - (set-buffer oldbuf))) - (setq chunk-counter (+ chunk-counter 1))) - (message "Copied %d bits" copy-counter) - (set-buffer chunk-name) - (copy-region-as-kill (point-min)(point-max))))))) - -(defun ess-noweb-chunk-pair-region () - "Return a pair consisting of the beginning and end of the current pair of -documentation and code chunks." - (interactive) - (let* ((start (ess-noweb-find-chunk-index-buffer)) - (end (1+ start))) - (if (ess-noweb-chunk-is-code start) - (cons (marker-position (cdr (aref ess-noweb-chunk-vector (1- start)))) - (marker-position (cdr (aref ess-noweb-chunk-vector end)))) - (while (not (ess-noweb-chunk-is-code end)) - (setq end (1+ end))) - (cons (marker-position (cdr (aref ess-noweb-chunk-vector start))) - (marker-position (cdr (aref ess-noweb-chunk-vector (1+ end)))))))) - -(defun ess-noweb-chunk-vector-aref (i) - (if (< i 0) - (error "Before first chunk.")) - (if (not ess-noweb-chunk-vector) - (ess-noweb-update-chunk-vector)) - (if (>= i (length ess-noweb-chunk-vector)) - (error "Beyond last chunk.")) - (aref ess-noweb-chunk-vector i)) - -(defun ess-noweb-complete-chunk () - "Complete the chunk name before point, if any." - (interactive) - (if (ess-noweb-in-code-chunk) - (let ((end (point)) - (beg (save-excursion - (if (re-search-backward "<<" - (save-excursion - (beginning-of-line) - (point)) - t) - (match-end 0) - nil)))) - (if beg - (let* ((pattern (buffer-substring beg end)) - (alist (ess-noweb-build-chunk-alist)) - (completion (try-completion pattern alist))) - (cond ((eq completion t)) - ((null completion) - (message "Can't find completion for \"%s\"" pattern) - (ding)) - ((not (string= pattern completion)) - (delete-region beg end) - (insert completion) - (if (not (looking-at ">>")) - (insert ">>"))) - (t - (message "Making completion list...") - (with-output-to-temp-buffer "*Completions*" - (display-completion-list (all-completions pattern alist))) - (message "Making completion list...%s" "done")))) - (message "Not at chunk name..."))) - (message "Not in code chunk..."))) - - -;;; Filling, etc - -(defun ess-noweb-hide-code-quotes () - "Replace all non blank characters in [[...]] code quotes -in the current buffer (you might want to narrow to the interesting -region first) by `*'. Return a list of pairs with the position and -value of the original strings." - (save-excursion - (let ((quote-list nil)) - (goto-char (point-min)) - (while (re-search-forward "\\[\\[" nil 'move) - (let ((beg (match-end 0)) - (end (if (re-search-forward "\\]\\]" nil t) - (match-beginning 0) - (point-max)))) - (goto-char beg) - (while (< (point) end) - ;; Move on to the next word: - (let ((b (progn - (skip-chars-forward " \t\n" end) - (point))) - (e (progn - (skip-chars-forward "^ \t\n" end) - (point)))) - (if (> e b) - ;; Save the string and a marker to the end of the - ;; replacement text. A marker to the beginning is - ;; useless. See ess-noweb-RESTORE-CODE-QUOTES. - (save-excursion - (setq quote-list (cons (cons (copy-marker e) - (buffer-substring b e)) - quote-list)) - (goto-char b) - (insert-char ?* (- e b) t) - (delete-char (- e b)))))))) - (reverse quote-list)))) - -(defun ess-noweb-restore-code-quotes (quote-list) - "Reinsert the strings modified by `ess-noweb-hide-code-quotes'." - (save-excursion - (mapcar (lambda (q) - (let* ((e (marker-position (car q))) - ;; Slightly inefficient, but correct way to find - ;; the beginning of the word to be replaced. - ;; Using the marker at the beginning will loose - ;; if whitespace has been rearranged - (b (save-excursion - (goto-char e) - (skip-chars-backward "*") - (point)))) - (delete-region b e) - (goto-char b) - (insert (cdr q)))) - quote-list))) - -(defun ess-noweb-fill-chunk () - "Fill the current chunk according to mode. -Run `fill-region' on documentation chunks and `indent-region' on code -chunks." - (interactive) - (save-excursion - (save-restriction - (ess-noweb-narrow-to-chunk) - (if (ess-noweb-in-code-chunk) - (progn - ;; Narrow to the code section proper; w/o the first and any - ;; index declaration lines. - (narrow-to-region (progn - (goto-char (point-min)) - (forward-line 1) - (point)) - (progn - (goto-char (point-max)) - (forward-line -1) - (while (looking-at "@") - (forward-line -1)) - (forward-line 1) - (point))) - (if (or indent-region-function indent-line-function) - (indent-region (point-min) (point-max) nil) - (error "No indentation functions defined in %s!" major-mode))) - (if ess-noweb-code-quotes-handling - (let ((quote-list (ess-noweb-hide-code-quotes))) - (fill-region (point-min) (point-max)) - (ess-noweb-restore-code-quotes quote-list)) - (fill-region (point-min) (point-max))))))) - -(defun ess-noweb-indent-region (beg end) - "If region fits inside current chunk, narrow to chunk and then -indent according to mode." - (interactive "r") - (let* ((inx (ess-noweb-find-chunk-index-buffer)) - (ch-beg (marker-position (cdr (aref ess-noweb-chunk-vector inx)))) - (ch-end (marker-position (cdr (aref ess-noweb-chunk-vector (1+ inx)))))) - - (if (and (< ch-beg beg) (> ch-end end)) - (save-excursion - (save-restriction - (setq beg (max beg (progn (goto-char ch-beg) - (forward-line 1) - (point)))) - (setq end (min end (progn (goto-char ch-end) - (forward-line -1) - (point)))) - (narrow-to-region beg end) - (indent-region beg end))) - (indent-region beg end)))) - - -(defun ess-noweb-indent-line () - "Indent the current line according to mode, after narrowing to this chunk." - (interactive) - (ess-noweb-update-chunk-vector) - (save-restriction - (ess-noweb-narrow-to-chunk) - (if (ess-noweb-in-code-chunk) - (progn - ;; Narrow to the code section proper; w/o the first and any - ;; index declaration lines. - (save-excursion - (narrow-to-region (progn - (goto-char (point-min)) - (forward-line 1) - (point)) - (progn - (goto-char (point-max)) - (forward-line -1) - (while (looking-at "@") - (forward-line -1)) - (forward-line 1) - (point)))))) - (indent-according-to-mode))) - -(defun ess-noweb-fill-paragraph-chunk (&optional justify) - "Fill a paragraph in the current chunk." - (interactive "P") - (ess-noweb-update-chunk-vector) - (save-excursion - (save-restriction - (ess-noweb-narrow-to-chunk) - (if (ess-noweb-in-code-chunk) - (progn - ;; Narrow to the code section proper; w/o the first and any - ;; index declaration lines. - (narrow-to-region (progn - (goto-char (point-min)) - (forward-line 1) - (point)) - (progn - (goto-char (point-max)) - (forward-line -1) - (while (looking-at "@") - (forward-line -1)) - (forward-line 1) - (point))) - (fill-paragraph justify)) - (if ess-noweb-code-quotes-handling - (let ((quote-list (ess-noweb-hide-code-quotes))) - (fill-paragraph justify) - (ess-noweb-restore-code-quotes quote-list)) - (fill-paragraph justify)))))) - -(defun ess-noweb-auto-fill-doc-chunk () - "Replacement for `do-auto-fill'." - (save-restriction - (narrow-to-region (car (ess-noweb-chunk-region)) - (save-excursion - (end-of-line) - (point))) - (if ess-noweb-code-quotes-handling - (let ((quote-list (ess-noweb-hide-code-quotes))) - (do-auto-fill) - (ess-noweb-restore-code-quotes quote-list)) - (do-auto-fill)))) - -(defun ess-noweb-auto-fill-doc-mode () - "Install the improved auto fill function, iff necessary." - (if auto-fill-function - (setq auto-fill-function 'ess-noweb-auto-fill-doc-chunk))) - -(defun ess-noweb-auto-fill-code-chunk () - "Replacement for do-auto-fill. Cancel filling in chunk headers" - (unless (save-excursion - (beginning-of-line) - (looking-at "<<")) - (do-auto-fill))) - -(defun ess-noweb-auto-fill-code-mode () - "Install the default auto fill function, iff necessary." - (if auto-fill-function - (setq auto-fill-function 'ess-noweb-auto-fill-code-chunk))) - -;;; Marking - -(defun ess-noweb-mark-chunk () - "Mark the current chunk." - (interactive) - (let ((r (ess-noweb-chunk-region))) - (goto-char (car r)) - (push-mark (cdr r) nil t))) - -(defun ess-noweb-mark-chunk-pair () - "Mark the current pair of documentation and code chunks." - (interactive) - (let ((r (ess-noweb-chunk-pair-region))) - (goto-char (car r)) - (push-mark (cdr r) nil t))) - - -;;; Narrowing - -(defun ess-noweb-toggle-narrowing (&optional arg) - "Toggle if we should narrow the display to the current pair of -documentation and code chunks after each movement. With argument: -switch narrowing on." - (interactive "P") - (if (or arg (not ess-noweb-narrowing)) - (progn - (setq ess-noweb-narrowing t) - (ess-noweb-narrow-to-chunk-pair)) - (setq ess-noweb-narrowing nil) - (widen))) - -(defun ess-noweb-narrow-to-chunk () - "Narrow the display to the current chunk." - (interactive) - (let ((r (ess-noweb-chunk-region))) - (narrow-to-region (car r) (cdr r)))) - -(defun ess-noweb-narrow-to-chunk-pair () - "Narrow the display to the current pair of documentation and code chunks." - (interactive) - (let ((r (ess-noweb-chunk-pair-region))) - (narrow-to-region (car r) (cdr r)))) - - -;;; Killing - -(defun ess-noweb-kill-chunk () - "Kill the current chunk." - (interactive) - (let ((r (ess-noweb-chunk-region))) - (kill-region (car r) (cdr r)))) - -(defun ess-noweb-kill-chunk-pair () - "Kill the current pair of chunks." - (interactive) - (let ((r (ess-noweb-chunk-pair-region))) - (kill-region (car r) (cdr r)))) - -(defun ess-noweb-copy-chunk-as-kill () - "Place the current chunk on the kill ring." - (interactive) - (let ((r (ess-noweb-chunk-region))) - (copy-region-as-kill (car r) (cdr r)))) - -(defun ess-noweb-copy-chunk-pair-as-kill () - "Place the current pair of chunks on the kill ring." - (interactive) - (let ((r (ess-noweb-chunk-pair-region))) - (copy-region-as-kill (car r) (cdr r)))) - - -;;; Movement - -(defun ess-noweb-sign (n) - "Return the sign of N." - (if (< n 0) -1 1)) - -(defun ess-noweb-next-doc-chunk (&optional cnt) - "Goto to the Nth documentation chunk from point." - (interactive "p") - (widen) - (let ((start (ess-noweb-find-chunk-index-buffer)) - (i 1)) - (while (<= i (abs cnt)) - (setq start (+ (ess-noweb-sign cnt) start)) - (while (ess-noweb-chunk-is-code start) - (setq start (+ (ess-noweb-sign cnt) start))) - (setq i (1+ i))) - (goto-char (marker-position (cdr (ess-noweb-chunk-vector-aref start)))) - (forward-char 1)) - (if ess-noweb-narrowing - (ess-noweb-narrow-to-chunk-pair))) - -(defun ess-noweb-previous-doc-chunk (&optional n) - "Goto to the -Nth documentation chunk from point." - (interactive "p") - (ess-noweb-next-doc-chunk (- n))) - -(defun ess-noweb-next-code-chunk (&optional cnt) - "Goto to the Nth code chunk from point." - (interactive "p") - (widen) - (let ((start (ess-noweb-find-chunk-index-buffer)) - (i 1)) - (while (<= i (abs cnt)) - (setq start (+ (ess-noweb-sign cnt) start)) - (while (not (ess-noweb-chunk-is-code start)) - (setq start (+ (ess-noweb-sign cnt) start))) - (setq i (1+ i))) - (goto-char (marker-position (cdr (ess-noweb-chunk-vector-aref start)))) - (forward-line 1)) - (if ess-noweb-narrowing - (ess-noweb-narrow-to-chunk-pair))) - -(defun ess-noweb-previous-code-chunk (&optional n) - "Goto to the -Nth code chunk from point." - (interactive "p") - (ess-noweb-next-code-chunk (- n))) - -(defun ess-noweb-next-chunk (&optional n) - "If in a documentation chunk, goto to the Nth documentation -chunk from point, else goto to the Nth code chunk from point." - (interactive "p") - (if (ess-noweb-in-code-chunk) - (ess-noweb-next-code-chunk n) - (ess-noweb-next-doc-chunk n))) - -(defun ess-noweb-previous-chunk (&optional n) - "If in a documentation chunk, goto to the -Nth documentation -chunk from point, else goto to the -Nth code chunk from point." - (interactive "p") - (ess-noweb-next-chunk (- n))) - -(defvar ess-noweb-chunk-history nil - "") - -(defun ess-noweb-goto-chunk () - "Goto the named chunk." - (interactive) - (widen) - (let* ((completion-ignore-case t) - (alist (ess-noweb-build-chunk-alist)) - (chunk (ess-completing-read - "Chunk" (delete "" (mapcar 'car alist)) nil t nil - ess-noweb-chunk-history (ess-noweb-goto-chunk-default)))) - (goto-char (cdr (assoc chunk alist)))) - (if ess-noweb-narrowing - (ess-noweb-narrow-to-chunk-pair))) - -(defun ess-noweb-goto-chunk-default () - (save-excursion - (if (re-search-backward "<<" - (save-excursion - (beginning-of-line) - (point)) - 'move) - (goto-char (match-beginning 0))) - (if (re-search-forward "<<\\(.*\\)>>" - (save-excursion - (end-of-line) - (point)) - t) - (buffer-substring (match-beginning 1) (match-end 1)) - nil))) - -(defun ess-noweb-build-chunk-alist () - (if (not ess-noweb-chunk-vector) - (ess-noweb-update-chunk-vector)) - ;; The naive recursive solution will exceed MAX-LISP-EVAL-DEPTH in - ;; buffers w/ many chunks. Maybe there is a tail recursivce solution, - ;; but iterative solutions should be acceptable for dealing with vectors. - (let ((alist nil) - (i (1- (length ess-noweb-chunk-vector)))) - (while (>= i 0) - (let* ((chunk (aref ess-noweb-chunk-vector i)) - (name (car chunk)) - (marker (cdr chunk))) - (if (and (stringp name) - (not (assoc name alist))) - (setq alist (cons (cons name marker) alist)))) - (setq i (1- i))) - alist)) - -(defun ess-noweb-goto-next (&optional cnt) - "Goto the continuation of the current chunk." - (interactive "p") - (widen) - (if (not ess-noweb-chunk-vector) - (ess-noweb-update-chunk-vector)) - (let ((start (ess-noweb-find-chunk-index-buffer))) - (if (not (ess-noweb-chunk-is-code start)) - (setq start (1+ start))) - (if (ess-noweb-chunk-is-code start) - (let ((name (car (ess-noweb-chunk-vector-aref start))) - (i 1)) - (while (<= i (abs cnt)) - (setq start (+ (ess-noweb-sign cnt) start)) - (while (not (equal (car (ess-noweb-chunk-vector-aref start)) - name)) - (setq start (+ (ess-noweb-sign cnt) start))) - (setq i (1+ i))) - (goto-char (marker-position - (cdr (ess-noweb-chunk-vector-aref start)))) - (forward-line 1)))) - (if ess-noweb-narrowing - (ess-noweb-narrow-to-chunk-pair))) - -(defun ess-noweb-goto-previous (&optional cnt) - "Goto the previous chunk." - (interactive "p") - (ess-noweb-goto-next (- cnt))) - -(defun ess-noweb-occur (arg) - "Find all occurences of the current chunk. -This function simply runs OCCUR on \"<>\"." - (interactive "P") - (let ((n (if (and arg - (numberp arg)) - arg - 0)) - (idx (ess-noweb-find-chunk-index-buffer))) - (if (ess-noweb-chunk-is-code idx) - (occur (regexp-quote (concat "<<" - (car (aref ess-noweb-chunk-vector idx)) - ">>")) - n) - (setq idx (1+ idx)) - (while (not (ess-noweb-chunk-is-code idx)) - (setq idx (1+ idx))) - (occur (regexp-quote (concat "<<" - (car (aref ess-noweb-chunk-vector idx)) - ">>")) - n)))) - - -;;; Insertion - -(defun ess-noweb-new-chunk (name) - "Insert a new chunk." - (interactive "sChunk name: ") - (insert "@ \n<<" name ">>=\n") - (save-excursion - (insert "@ %def \n")) - (ess-noweb-update-chunk-vector)) - -(defun ess-noweb-at-beginning-of-line () - (equal (save-excursion - (beginning-of-line) - (point)) - (point))) - -(defun ess-noweb-electric-@ (arg) - "Smart incarnation of `@', starting a new documentation chunk, maybe. -If given an numerical argument, it will act just like the dumb `@'. -Otherwise and if at the beginning of a line in a code chunk: -insert \"@ \" and update the chunk vector." - (interactive "P") - (if arg - (self-insert-command (if (numberp arg) arg 1)) - (if (and (ess-noweb-at-beginning-of-line) - (ess-noweb-in-code-chunk)) - (progn - (insert "@ ") - (ess-noweb-update-chunk-vector)) - (self-insert-command 1)))) - -(defun ess-noweb-electric-< (arg) - "Smart incarnation of `<', starting a new code chunk, maybe. -If given an numerical argument, it will act just like the dumb `<'. -Otherwise and if at the beginning of a line in a documentation chunk: -insert \"<<>>=\", a closing \"@\" and a newline if necessary. Leave point -in the middle and and update the chunk vector." - (interactive "P") - (if arg - (self-insert-command (if (numberp arg) arg 1)) - (if (and (ess-noweb-at-beginning-of-line) - (not (ess-noweb-in-code-chunk))) - (progn - (insert "<<") - (save-excursion - (insert ">>=\n@ ") - (if (not (looking-at "\\s *$")) - (newline))) - (ess-noweb-update-chunk-vector)) - (self-insert-command 1)))) - - -;;; Modes - -(defun ess-noweb-set-chunk-code-mode () - "Set the ess-noweb-code-mode for the current chunk" - (interactive) - (if (ess-noweb-in-code-chunk) - (progn - ;; Reset code-mode to default and then check for a mode comment. - (setq ess-noweb-code-mode ess-noweb-default-code-mode) - (let (mode chunk-name) - (save-excursion - (save-restriction - (end-of-line) - (re-search-backward "^[ \t]*<<\\(.*\\)>>=" nil t) - (setq chunk-name (match-string 1)) - (widen) - (goto-char (point-min)) - (re-search-forward (concat "^<<" (regexp-quote chunk-name) ">>=") nil t) - (beginning-of-line 2) - (setq mode (ess-noweb-in-mode-line)) - (if (functionp mode) - (setq ess-noweb-code-mode mode)))))) - (error "This only makes sense in a code chunk"))) - -(defun ess-noweb-set-doc-syntax-table () - "Sets the doc-mode syntax-table to treat code quotes as comments." - (interactive) - (let ((square-bracket-string (char-to-string (char-syntax ?\[)))) - (if (string= square-bracket-string "(") - (progn - (modify-syntax-entry ?\[ "(]12b" ess-noweb-doc-mode-syntax-table) - (modify-syntax-entry ?\] ")[34b" ess-noweb-doc-mode-syntax-table)) - (progn - (modify-syntax-entry ?\[ - (concat square-bracket-string " 12b") - ess-noweb-doc-mode-syntax-table) - (modify-syntax-entry ?\] - (concat square-bracket-string " 34b") - ess-noweb-doc-mode-syntax-table))))) - -(defun ess-noweb-select-mode () - "Select ess-noweb-DOC-MODE or ess-noweb-CODE-MODE, as appropriate." - (interactive) - (let ((this-chunk-index (ess-noweb-find-chunk-index-buffer))) - ;; Has the last change to the buffer taken us into a different - ;; chunk ? - (if (not (equal this-chunk-index ess-noweb-last-chunk-index)) - (progn - (setq ess-noweb-last-chunk-index this-chunk-index) - (if (ess-noweb-in-code-chunk) - ;; Inside a code chunk - (progn - ;; Find out which code mode to use - (ess-noweb-set-chunk-code-mode) - ;; If we aren't already using it, use it. - (if (not (equal major-mode ess-noweb-code-mode)) - (progn - (funcall ess-noweb-code-mode) - (run-hooks 'ess-noweb-select-mode-hook) - (run-hooks 'ess-noweb-select-code-mode-hook)))) - ;; Inside a documentation chunk - (progn - (if (not (equal major-mode ess-noweb-doc-mode)) - (progn - (funcall ess-noweb-doc-mode))) - (if (not ess-noweb-doc-mode-syntax-table) - (progn - (message "Setting up syntax table") - (setq ess-noweb-doc-mode-syntax-table - (make-syntax-table (syntax-table))) - (ess-noweb-set-doc-syntax-table))) - (set-syntax-table ess-noweb-doc-mode-syntax-table) - (run-hooks 'ess-noweb-select-mode-hook) - (run-hooks 'ess-noweb-select-doc-mode-hook))) - (run-hooks 'ess-noweb-changed-chunk-hook))))) - -(defun ess-noweb-set-doc-mode (mode) - "Change the major mode for editing documentation chunks." - (interactive "CNew major mode for documentation chunks: ") - (setq ess-noweb-doc-mode mode) - (setq ess-noweb-doc-mode-syntax-table nil) - ;;Pretend we've changed chunk, so the mode will be reset if necessary - (setq ess-noweb-last-chunk-index (1- ess-noweb-last-chunk-index)) - (ess-noweb-select-mode)) - -(defun ess-noweb-set-code-mode (mode) - "Change the major mode for editing all code chunks." - (interactive "CNew major mode for all code chunks: ") - (setq ess-noweb-default-code-mode mode) - ;;Pretend we've changed chunk, so the mode will be reset if necessary - (setq ess-noweb-last-chunk-index (1- ess-noweb-last-chunk-index)) - (ess-noweb-select-mode)) - -(defun ess-noweb-set-this-code-mode (mode) - "Change the major mode for editing this code chunk. -The only sensible way to do this is to add a mode line to the chunk" - (interactive "CNew major mode for this code chunk: ") - (if (ess-noweb-in-code-chunk) - (progn - (setq ess-noweb-code-mode mode) - (save-excursion - (save-restriction - (let (chunk-name) - (widen) - (end-of-line) - (re-search-backward "^[ \t]*<<\\(.*\\)>>=" nil t) - (setq chunk-name (match-string 1)) - (goto-char (point-min)) - (re-search-forward (concat "^<<" (regexp-quote chunk-name) ">>=") nil t) - (beginning-of-line 2)) - ;; remove mode-line, if there is one - (if (ess-noweb-in-mode-line) - (progn - (kill-line) - (kill-line))) - (if (not (equal ess-noweb-code-mode ess-noweb-default-code-mode)) - (progn - (setq mode (substring (symbol-name mode) 0 -5)) - ;; Need to set major mode so that we can comment out - ;; the mode line - (funcall ess-noweb-code-mode) - (if (not (boundp 'comment-start)) - (setq comment-start "#")) - (insert comment-start - " -*- " mode - " -*- " comment-end "\n"))) - (setq ess-noweb-last-chunk-index (1- ess-noweb-last-chunk-index))))) - (message "This only makes sense in a code chunk."))) - -;;; Misc - -(defvar ess-version) -(defun ess-noweb-mode-version () - "Echo the RCS identification of noweb mode." - (interactive) - (message "Thorsten's ess-noweb-mode, now part of ESS version %s" ess-version)) - -(defun ess-noweb-describe-mode () - "Describe noweb mode." - (interactive) - (describe-function 'ess-noweb-mode)) - -(defun ess-noweb-insert-default-mode-line () - "Insert line that will set the noweb mode of this file in emacs. -The file is set to use the current doc and default-code modes, so -ensure they are set correctly (with ess-noweb-set-code-mode and -ess-noweb-set-doc-mode) before calling this function" - (interactive) - (save-excursion - (goto-char 1) - (if (ess-noweb-in-mode-line) - (progn - (kill-line) - (kill-line))) - (if (not (eq major-mode ess-noweb-doc-mode)) - (ess-noweb-select-mode)) - (insert comment-start " -*- mode: noweb; ess-noweb-default-code-mode: " - (symbol-name ess-noweb-default-code-mode) - (if (not (eq ess-noweb-doc-mode ess-noweb-default-doc-mode)) - (concat "; ess-noweb-doc-mode: " (symbol-name - ess-noweb-doc-mode) ";") - ";") - " -*-" comment-end "\n")) - (ess-noweb-select-mode)) - -(defun ess-noweb-mouse-first-button (event) - (interactive "e") - (mouse-set-point event) - (if (and ess-noweb-use-mouse-navigation - (eq (save-excursion - (end-of-line) - (re-search-backward "^[\t ]*\\(<<\\)\\(.*\\)\\(>>\\)" nil t)) - (save-excursion - (beginning-of-line) (point)))) - (progn - (if (< (point) (match-beginning 2)) - (let ((chunk-name (buffer-substring-no-properties - (match-beginning 2) - (match-end 2)))) - (re-search-backward (concat "<<" (regexp-quote chunk-name) ">>") nil t)) - (if (and (<= (match-end 2) (point)) - (> (+ 2 (match-end 2)) (point))) - (let ((chunk-name (buffer-substring-no-properties - (match-beginning 2) - (match-end 2)))) - (re-search-forward (concat "<<" (regexp-quote chunk-name) ">>") nil t))))))) - - -;;; Debugging - -(defun ess-noweb-log (s) - (let ((b (current-buffer))) - (pop-to-buffer-same-window (get-buffer-create "*noweb-log*")) - (goto-char (point-max)) - (setq buffer-read-only nil) - (insert s) - (setq buffer-read-only t) - (pop-to-buffer-same-window b))) - - - - - -(defvar ess-noweb-thread-alist nil - "A list of threads in the current buffer. -Each entry in the list contains 5 elements: -1) The name of the threads -2) The name of the immdiate parent thread in which it is used (nil if - it is a \"top-level\" thread which is not used anywhere). -3) The name of the top-level parent thread in which it is used (i.e. a - thread in which it is used but which is not itself used anywhere: - nil if this thread is not used anywhere. -4) The format string to use to define line numbers in the output - file of this thread. Should only be set if this thread is not used - anywhere: if a thread is used as part of another thread, the parent - thread's format string should be used. -5) If this is nil, tabs are converted to spaces in the tangled - file. If it is a number, tabs are copied to the tangled file - unchanged, and tabs are also used for indentation, with the number - of spaces per tab defined by this number. This MUST be set in order - to tangle makefiles, which depend on tabs.Should only be set if - this thread is not used anywhere. otherwise set to nil. " - ) - -(defun ess-noweb-update-thread-alist () - "Updates the list of threads in the current buffer. -Each entry in the list contains 5 elements: -1) The name of the thread -2) The name of the immdiate parent thread in which it is used (nil if - it is a \"top-level\" thread which is not used anywhere). -3) The name of the top-level parent thread in which it is used (i.e. a - thread in which it is used but which is not itself used anywhere: - nil if this thread is not used anywhere. -4) The format string to use to define line numbers in the output - file of this thread. Should only be set if this thread is not used - anywhere: if a thread is used as part of another thread, the parent - thread's format string should be used. -5) If this is nil, tabs are converted to spaces in the tangled - file. If it is a number, tabs are copied to the tangled file - unchanged, and tabs are also used for indentation, with the number - of spaces per tab defined by this number. This MUST be set in order - to tangle makefiles, which depend on tabs.Should only be set if - this thread is not used anywhere. otherwise set to nil. " - (interactive) - (save-excursion - (goto-char (point-min)) - (let ((thread-alist) (thread-list-entry) (chunk-use-name) - (current-thread) (new-thread-alist)) - (while (re-search-forward - "^[ \t]*<<\\(.*\\)>>\\(=\\)?" nil t) - (goto-char (match-beginning 0)) - ;; Is this the definition of a chunk ? - (if (match-beginning 2) - ;;We have a chunk definition - (progn - ;; Get the thread name - (setq current-thread - (buffer-substring-no-properties (match-beginning 1) - (match-end 1))) - ;; Is this thread already in our list ? - (if (assoc current-thread thread-alist) - nil - (progn - ;; If not, create an entry with 4 nils at the end - (setq thread-list-entry - (list (cons current-thread - (make-list 4 nil)))) - ;; And add it to the list - (setq thread-alist - (append thread-alist thread-list-entry))))) - - ;; Not a definition but a use - (progn - ;; Get the thread name - (setq chunk-use-name - (buffer-substring-no-properties (match-beginning 1) - (match-end 1))) - ;; Has the thread already been defined before being used ? - (if (setq thread-list-entry (assoc chunk-use-name - thread-alist)) - ;; If it has, set its parent to be the thread we are in at the moment - (setcar (cdr thread-list-entry) current-thread) - ;; If not, add it to the list, with its parent name and 3 nils - (progn - (setq thread-list-entry - (list (cons chunk-use-name - (cons current-thread - (make-list 3 nil))))) - (setq thread-alist (append thread-alist thread-list-entry))))) - ) - ;;Go to the next line - (beginning-of-line 2)) - ;; Now, the second element of each entry points to that thread's - ;; immediate parent. Need to set it to the thread's ultimate - ;; parent. - (let ((thread-counter 0) - (this-thread) - (this-thread-parent)) - (while (<= thread-counter (1- (length thread-alist))) - (setq this-thread (nth thread-counter thread-alist)) - (setq this-thread-parent (assoc - (car (cdr this-thread)) - thread-alist)) - (while (not (equal nil (car (cdr this-thread-parent)))) - (setq this-thread-parent (assoc - (car (cdr this-thread-parent)) - thread-alist))) - (setq this-thread (cons (car this-thread) - (cons (car (cdr this-thread)) - (cons (car this-thread-parent) - (nthcdr 2 this-thread))))) - (setq new-thread-alist (append new-thread-alist (list this-thread))) - (setq thread-counter (1+ thread-counter)))) - - (setq ess-noweb-thread-alist new-thread-alist)))) - - - ; Option setting functions to go here - -(defun ess-noweb-set-thread-line-format ()) - -(defun ess-noweb-set-thread-tabs ()) - - -(defvar ess-noweb-default-line-number-format nil - "The format string to use to define line numbers in this thread. -If nil, do not use line numbers.") - -(defvar ess-noweb-default-line-number-skip-lines 0 - "The number of initial lines to output before the line number. -This may be useful in shell scripts, where the first line (or two) must have a - specific form.") - -(defvar ess-noweb-default-tab-width 8 - "If a number, convert tabs to that number of spaces in the output. If nil, let tabs through to the output unaltered.") - -(defvar ess-noweb-line-number-format ess-noweb-default-line-number-format - "The format string to use to define line numbers in this thread. -If nil, do not use line numbers.") - -(defvar ess-noweb-line-number-skip-lines ess-noweb-default-line-number-skip-lines - "The number of initial lines to output before the line number. -This may be useful in shell scripts, where the first line (or two) must have a - specific form.") - -(defvar ess-noweb-tab-width ess-noweb-default-tab-width - "If a number, convert tabs to that number of spaces in the output. If nil, let tabs through to the output unaltered.") - -(defun ess-noweb-get-thread-local-variables () - "Get the values of the variables that are local to a thread." - (interactive) - (save-excursion - (save-restriction - (end-of-line) - (re-search-backward "^[ \t]*<<\\(.*\\)>>=" nil t) - (let ((chunk-name (match-string 1))) - (widen) - (goto-char (point-min)) - (re-search-forward (concat "^<<" (regexp-quote chunk-name) ">>=") nil t) - (beginning-of-line 2) - (while (looking-at ".*-\*-.*-\*-") - (let ((this-line (buffer-substring-no-properties - (point) - (progn (end-of-line) (point))))) - (if (string-match - "mode:[ \t]*\\([^\t ]*\\)" this-line) - (setq ess-noweb-code-mode - (match-string-no-properties 1 this-line))) - (if (string-match - "ess-noweb-line-number-format:[ \t]*\"\\([^\"]*\\)\"" this-line) - (setq ess-noweb-line-number-format - (match-string-no-properties 1 this-line))) - (if (string-match - "ess-noweb-line-number-skip-lines:[ \t]*\\([^\t ]*\\)" this-line) - (setq ess-noweb-line-number-skip-lines - (string-to-number - (match-string-no-properties 1 this-line)))) - (if (string-match - "ess-noweb-tab-width:[ \t]*\\([^\t ]*\\)" this-line) - (setq ess-noweb-tab-width - (string-to-number - (match-string-no-properties 1 this-line)))) - (beginning-of-line 2))))))) - -(defun ess-noweb-reset-thread-local-variables () - "Resets the thread-local variables to their default values" - (setq ess-noweb-tab-width ess-noweb-default-tab-width) - (setq ess-noweb-line-number-format ess-noweb-default-line-number-format) - (setq ess-noweb-line-number-skip-lines ess-noweb-default-line-number-skip-lines)) - -(defun ess-noweb-write-line-number (line-number-format buffer) - (if line-number-format - (progn - (let ((this-line (count-lines (point-min)(point)))) - (while (string-match ".*\\(%L\\).*" line-number-format) - (setq line-number-format - (replace-match - (format "%d" this-line) t t line-number-format 1))) - (while (string-match ".*\\(%F\\).*" line-number-format) - (setq line-number-format - (replace-match - (format "%s" (buffer-file-name)) t t line-number-format 1))) - (while (string-match ".*\\(%N\\).*" line-number-format) - (setq line-number-format - (replace-match "\n" t t line-number-format 1))) - (with-current-buffer buffer - (insert line-number-format)))))) - - -(defun ess-noweb-tangle-chunk ( &optional buffer prefix-string) - "Generate the code produced by this chunk, & any threads used in this chunk." - (interactive) - (save-excursion - (ess-noweb-reset-thread-local-variables) - (ess-noweb-get-thread-local-variables) - (ess-noweb-update-chunk-vector) - (let* - ((chunk-end (progn - (end-of-line) - (re-search-forward "^@" nil t) - (beginning-of-line) - (point))) - ;;get name and start point of this chunk - (chunk-start (progn - (re-search-backward "^<<\\([^>]*\\)>>=$" nil t) - (beginning-of-line 2) - (point))) - (chunk-name (buffer-substring-no-properties - (match-end 1) - (match-beginning 1))) - ;; get end of this chunk - ;; Get information we need about this thread - (thread-info (assoc chunk-name ess-noweb-thread-alist)) - (thread-tabs (nth 4 thread-info)) - (line-number-format (nth 3 thread-info)) - (thread-name-re) (post-chunk) (pre-chunk) - (first-line t) - (tangle-buffer (generate-new-buffer "Tangle Buffer"))) - - (progn - (goto-char chunk-start) - ;; If this is a mode-line, ignore it - (while (looking-at ".*-\\*-.*-\\*-") - (beginning-of-line 2)) - ;; If we want to include line numbers, write one - (if line-number-format - (while (> ess-noweb-line-number-skip-lines 0) - (append-to-buffer tangle-buffer - (point) - (save-excursion - (progn - (end-of-line) - (point)))) - (beginning-of-line 2) - (1- ess-noweb-line-number-skip-lines)) - (ess-noweb-write-line-number line-number-format buffer)) - (message "Now at %d" (point)) - - (while (< (point) chunk-end) - (untabify (point) (save-excursion (beginning-of-line 2)(point))) - ;; This RE gave me trouble. Without the `\"', it - ;; recognised itself and so could not copy itself - ;; correctly. - (if (looking-at - "\\([^\n\"@]*\\)<<\\(.*\\)\\(>>\\)\\([^\n\"]*\\)$") - (progn - (save-excursion - (save-restriction - (setq thread-name-re - (concat "<<" - (regexp-quote (match-string 2)) - ">>=")) - (setq pre-chunk (match-string 1)) - (if prefix-string - (setq pre-chunk (concat prefix-string - pre-chunk))) - (setq post-chunk (match-string 4)) - (widen) - (goto-char (point-min)) - (while (re-search-forward thread-name-re nil t) - (ess-noweb-tangle-chunk tangle-buffer pre-chunk) - (forward-line 1))) - (if post-chunk - (with-current-buffer tangle-buffer - (backward-char) - (insert post-chunk) - (beginning-of-line 2))))) - - ;; Otherwise, just copy this line - (setq pre-chunk - (buffer-substring - (point) - (save-excursion - (beginning-of-line 2) - (point)))) - ;; Add a prefix if necessary - (if (and prefix-string - (> (length pre-chunk) 1)) - (setq pre-chunk (concat prefix-string - pre-chunk))) - ;; And copy it to the buffer - (with-current-buffer tangle-buffer - (insert pre-chunk))) - ;; If this is the first line of the chunk, we need to change - ;; prefix-string to consist solely of spaces - (if (and first-line - prefix-string) - (progn - (setq prefix-string - (make-string (length prefix-string) ?\ )) - (setq first-line nil))) - ;; Either way, go to the next line - (beginning-of-line 2)) - - (with-current-buffer tangle-buffer - (goto-char (point-min)) - (while (re-search-forward "\@\<<" nil t) - (replace-match "<<" nil nil) - (forward-char 3)) - (if thread-tabs - (progn - (setq tab-width thread-tabs) - (tabify (point-min)(point-max))) - (untabify (point-min)(point-max)))) - - (if buffer - (with-current-buffer buffer - (insert-buffer-substring tangle-buffer) - (kill-buffer tangle-buffer))) - )))) - -(defun ess-noweb-tangle-thread ( name &optional buffer) - "Given the name of a thread, tangles the thread to buffer. -If no buffer is given, create a new one with the same name as the -thread." - (interactive "sWhich thread ? ") - (if (not buffer) - (progn - (setq buffer (get-buffer-create name)) - (with-current-buffer buffer - (erase-buffer)))) - (save-excursion - (goto-char (point-min)) - (let ((chunk-counter 0)) - (while (re-search-forward - "^<<\\(.*\\)>>=[\t ]*" nil t) - (if (string= (match-string 1) - name) - (progn - (setq chunk-counter (1+ chunk-counter)) - (message "Found %d chunks" chunk-counter) - (ess-noweb-tangle-chunk buffer))))))) - -(defun ess-noweb-tangle-current-thread ( &optional buffer) - (interactive) - (save-excursion - (let* ((chunk-start - (progn - (re-search-backward "^<<\\([^>]*\\)>>=[\t ]*$" - nil t) - (beginning-of-line 2) - (point))) - (chunk-name (buffer-substring-no-properties - (match-end 1) - (match-beginning 1)))) - (ess-noweb-tangle-thread chunk-name buffer)))) - ;menu functions - -;;;###autoload -(defun Rnw-mode () - "Major mode for editing Sweave(R) source. -See `ess-noweb-mode' and `R-mode' for more help." - (interactive) - (require 'ess-noweb);; << probably someplace else - (setq ess--make-local-vars-permanent t) - (ess-noweb-mode 1); turn it on - (ess-noweb-set-doc-mode 'latex-mode) - (ess-noweb-set-code-mode 'R-mode) - (setq ess--local-handy-commands - (append '(("weave" . ess-swv-weave) - ("tangle" . ess-swv-tangle)) - ess-handy-commands) - ess-dialect "R" - ess-language "S") - (put 'ess--local-handy-commands 'permanent-local t) - (run-mode-hooks 'Rnw-mode-hook)) - -(fset 'Snw-mode 'Rnw-mode); just a synonym (for now or ever) - -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.[rR]nw\\'" . Rnw-mode)) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.[sS]nw\\'" . Snw-mode)) - - -;;; Finale - -(run-hooks 'ess-noweb-mode-load-hook) -(provide 'ess-noweb-mode) - -;; Changes made by Mark Lunt (mark.lunt@mrc-bsu.cam.ac.uk) 22/03/1999 - -;; The possibility of having code chunks using more than one language -;; was added. This was first developed by Adnan Yaqub -;; (AYaqub@orga.com) for syntax highlighting, but even people who hate -;; highlighting may like to maintain their Makefile with their code, -;; or test-scripts with their programs, or even user documentation as -;; latex-mode code chunks. -;; This required quite a few changes to ess-noweb-mode: -;; 1) A new variable `ess-noweb-default-code-mode' was create to do the job -;; `ess-noweb-code-mode' used to. -;; 2) ess-noweb-code-mode now contains the code-mode of the current chunk -;; 3) Each chunk can now have its own mode-line to tell emacs what -;; mode to use to edit it. The function `ess-noweb-in-mode-line' -;; recognises such mode-lines, and the function -;; `ess-noweb-set-this-code-mode' sets the code mode for the current -;; chunk and adds a mode-line if necessary. If several chunks have -;; the same name, the mode-line must appear in the first chunk with -;; that name. -;; 4) The mechanism for deciding whether to change mode was altered, -;; since the old method assumed a single code mode. Now, -;; `ess-noweb-last-chunk-index' keeps track of which chunk we were in -;; last. If we have moved to a different chunk, we have to check -;; which mode we should be in, and change if necessary. - -;; The keymap and menu-map handling was changed. Easymenu was used to -;; define the menu, and it the keymap was attached to the 'official' -;; minor-modes-keymaps list. This means that -;; 1) It was automatically loaded when ess-noweb-mode was active and -;; unloaded when it was inactive. -;; 2) There was no need to worry about the major mode map clobbering -;; it , since it takes precedence over the major mode -;; map. `ess-noweb-setup-keymap' is therefore now superfluous -;; The menu was also reorganised to make it less cluttered, so there -;; would be room for adding tangling and weaving commands (one day). - -;; Mouse navigation (at least under Emacs (AJR)) is supported, in so -;; far as clicking mouse-1 on the '<<' of a chunk name moves to the -;; previous instance of that chunk name, and clicking in the '>>' -;; moves to the next instance. They are not mouse-hightlighted, -;; though: too much hassle for zero added functionality. - -;; ess-noweb-doc-mode has been given its own syntax-table. It is the same -;; as the current doc-mode syntax-table, except that [[ is a comment -;; start and ]] a comment end. Fixes some ugliness in LaTeX-mode if -;; `$' or `%' appear in quoted code (or even `<<', which happens often -;; in C++). -;; (This should make ess-noweb-hide-code-quotes and -;; ess-noweb-restore-code-quotes unnecessary, but I have not yet removed -;; them, nor the calls to them). - -;; A new function `ess-noweb-indent-line' was defined and bound by default -;; to the tab key. This should indent the current line correctly in -;; whichever mode we are currently in. Previously, c-mode in -;; particular did not behave well with indentation (although -;; `ess-noweb-fill-chunk' worked fine). Indentation is only accurate -;; within the chunk: it does not know the syntax at the end of the -;; previous chunk, so it does not know where to start indenting in -;; this chunk. However, provided the indentation within each chunk is correct, -;; notangle will correctly indented code. - -;; (I think it would be good to separate filling and indenting, -;; though, since `indent-region' and `fill-region' have completely -;; different meanings in LaTeX-mode (and both are useful)) - -;; ess-noweb-mode and ess-noweb-minor-mode were given an optional argument, so -;; that (ess-noweb-mode -1) turns it off, (ess-noweb-mode 1) turns it on, and -;; (ess-noweb-mode) toggles it. This is considered normal for minor modes. - -;; buffer-substring changed to buffer-substring-no-properties: -;; comparisons with buffer-substring can be unreliable if highlighting -;; is used. - -;; New functions `ess-noweb-in-code-chunk' & `ess-noweb-chunk-is-code' created -;; to replace (if (stringp (car (ess-noweb-find-chunk)))) and -;; (if (stringp (car (ess-noweb-chunk-vector-aref index)))). - -;; `ess-noweb-insert-mode-line' was renamed -;; `ess-noweb-insert-default-mode-line' and modified to put the mode-line -;; at the start of the file and remove any existing mode-line. - -;; a '<=' in `ess-noweb-find-chunk-index' changed to '<', so we get the -;; right answer if point is on the first character in a chunk - -;; The name of `ess-noweb-post-command-hook' changed to -;; `ess-noweb-post-command-function', since it is a function. - -;; All the highlighting code moved to a separate file: -;; (ess-noweb-font-lock-mode.el) - -;; Menu driven tangling is in the process of being added. It can -;; currently tangle a single chunk or a series of chunks with the -;; same name (which I refer to as a thread) into a separate -;; buffer. This buffer can then be saved to a file, sent to an -;; interpreter, whatever. I haven't tested using line-numbers as yet. - -;;; ess-noweb-mode.el ends here diff --git a/elpa/ess-20191014.1343/obsolete/ess-noweb.el b/elpa/ess-20191014.1343/obsolete/ess-noweb.el deleted file mode 100644 index 23744dcf..00000000 --- a/elpa/ess-20191014.1343/obsolete/ess-noweb.el +++ /dev/null @@ -1,138 +0,0 @@ -;;; ess-noweb.el --- support for Literate Data Analysis - -;; Copyright (C) 1999 Mark Lunt -;; Copyright (C) 1999--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - -;; Author: Mark Lunt -;; A.J. Rossini -;; Created: April 18, 1999 -;; Maintainer: ESS-core - -;; Keywords: statistics, languages -;; Summary: Noweb support for ESS - -;; This file is part of ESS - -;; This file 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. - -;; This file 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;;; Commentary: - -;; Code for ESS and Literate Data Analysis. - -;;; Code: - - ; Requires and autoloads - -(require 'ess-custom) -(require 'ess-inf) -(require 'ess-noweb-mode) - - ; Variables - -(defvar ess-noweb-use-font-lock font-lock-mode - "Set to t if you want to use font-locking in ESS noweb buffers.") - -(if ess-noweb-use-font-lock - (require 'ess-noweb-font-lock-mode)) - - ; Functions - -;;*;; Code Chunk evaluation. - -(defun ess-noweb-create-tangle-buffer (name) - (let ((buff (get-buffer-create name)) - (elca (eval ess-local-customize-alist))) - (with-current-buffer buff - (erase-buffer) - (ess-setq-vars-local elca buff)) - buff)) - -(defun ess-eval-chunk (vis) - "Tangle the current chunk and send it to the inferior ESS process. -Arg has same meaning as for `ess-eval-region'." - (interactive "P") - (let ((process-name ess-local-process-name) - new-process-name - (cbuf (current-buffer)) - (temp-buffer (ess-noweb-create-tangle-buffer "Tangle Buffer"))) - (save-excursion - (ess-noweb-tangle-chunk temp-buffer) - (set-buffer temp-buffer) - ;; When the temp buffer is created, it does not inherit any value - ;; of ess-local-process-name from the .Rnw buffer, so we have to set it - ;; here. If ess-local-process-name is not set in the .Rnw buffer, - ;; it will inherit the value that is chosen here. - (set (make-local-variable 'ess-local-process-name) process-name) - (ess-eval-region (point-min) (point-max) vis "Eval Chunk") - (if process-name - (kill-buffer temp-buffer) - ;; if process-name was nil, source buffer did not have a local process - ;; so keep value from temp buffer before killing it. - (setq new-process-name ess-local-process-name) - (kill-buffer temp-buffer) - (set-buffer cbuf) - (set (make-local-variable 'ess-local-process-name) new-process-name))))) - - -(defun ess-eval-chunk-and-step (&optional vis) - "Tangle the current chunk and send it to the inferior ESS process and -step to the next chunk" - (interactive) - (ess-eval-chunk vis) - (ess-noweb-next-code-chunk 1)) - -(defun ess-eval-chunk-and-go (vis) - "Tangle the current chunk, send to the ESS process, and go there. -Arg has same meaning as for `ess-eval-region'." - (interactive "P") - (ess-eval-chunk vis) - (ess-switch-to-ESS t)) - -;;*;; Thread code chunk evaluation - -;; -;; Threads are code chunks which fit into the same "buffer" (I'm (AJR) -;; abusing terminology, but what I mean is things like: -;; <>= -;; code for thing1 -;; @ -;; Documentation -;; <>= -;; continuing code for thing1 -;; @ -;; - -(defun ess-eval-thread (vis) - "Tangle all chunks in the current chunk-thread and send to the ESS process. -Arg has same meaning as for `ess-eval-region'." - (interactive "P") - (let ((temp-buffer (ess-noweb-create-tangle-buffer "Tangle Buffer"))) - (ess-noweb-tangle-current-thread temp-buffer) - (set-buffer temp-buffer) - (ess-eval-region (point-min) (point-max) vis "Eval buffer") - (kill-buffer temp-buffer))) - -(defun ess-eval-thread-and-go (vis) - "Tangle all chunks in the current chunk-thread, send to ESS process, -and go there. Arg has same meaning as for `ess-eval-region'." - (interactive "P") - (ess-eval-thread vis) - (ess-switch-to-ESS t)) - - ; Provide package - -(provide 'ess-noweb) - -;;; ess-noweb.el ends here diff --git a/elpa/ess-20191014.1343/obsolete/ess-r-args.el b/elpa/ess-20191014.1343/obsolete/ess-r-args.el deleted file mode 100644 index 207ad998..00000000 --- a/elpa/ess-20191014.1343/obsolete/ess-r-args.el +++ /dev/null @@ -1,354 +0,0 @@ -;;; ess-r-args.el --- Insert R function's arguments - -;; Copyright (C) 2007 Sven Hartenstein -;; Copyright (C) 2007 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - -;; This file is part of ESS - -;; This file 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. - -;; This file 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 for more details. - -;; A copy of the GNU General Public License is available at -;; http://www.r-project.org/Licenses/ - -;; Last update: 2012-02-27 - -;;; Commentary: - -;; == DOCUMENTATION == - -;; This file provides some functions that show or insert a -;; R-function's arguments (and their default values) by using R's -;; args() function. This code requires ESS (http://ess.r-project.org). -;; For screenshots as well as information on requirements, -;; installation, configuration and troubleshooting, please visit -;; http://www.svenhartenstein.de/emacs-ess.php - -;; == Requirements == - -;; * ESS mode must be loaded and running. -;; * A R process must be running within ESS. -;; * For the tooltip option to work, Emacs must not run within a -;; terminal but (directly) under the X window system (in case of -;; GNU/Linux). - -;; == Installation == - -;; To make Emacs aware of the functions defined in this file load it -;; into Emacs by including something like the following in your -;; ~/.emacs file (adapt "/PATH/TO"!). -;; -;; (add-hook 'ess-mode-hook (lambda () (load "/PATH/TO/ess-r-args.el"))) -;; -;; This file is included with ESS; if you are reading this file as -;; part of the ESS distribution, then you do not need to add the above -;; line. - -;; == Configuration == - -;; Configuration should be done by setting some variables in your -;; ~/.emacs file, the following is an example only, adjust it to your -;; needs. - -;; ;; ess-r-args-noargsmsg is printed, if no argument information -;; ;; could be found. You could set it to an empty string ("") for no -;; ;; message. -;; (setq ess-r-args-noargsmsg "No args found.") -;; -;; ;; ess-r-args-show-as determines how (where) the information is -;; ;; displayed. Set it to 'tooltip little tooltip windows or to -;; ;; 'message (the default) which will use the echo area at the bottom of -;; ;; your Emacs frame. -;; (setq ess-r-args-show-as nil) -;; -;; ;; ess-r-args-show-prefix is a string that is printed in front of -;; ;; the arguments list. The default is "ARGS: ". -;; (setq ess-r-args-show-prefix "ARGS: ") - -;; == Usage == - -;; The functions should be called when point (text cursor) is between -;; two parentheses of a R function call (see screenshots above). It -;; will then (invisibly) query R for which arguments the respective -;; function knows as well as their default values and show or insert -;; the result. - -;; There are currently two functions: ess-r-args-show echoes the -;; arguments in the echo area or as tooltip, ess-r-args-insert prints -;; the arguments at point. - -;; In order to not having to type the whole function name each time -;; you want to see the arguments list, you most probably want to bind -;; the functions to a key which again should be done in your ~/.emacs -;; file. You can also let Emacs call the function each time you insert -;; an opening parenthesis ("("). - -;; -----> do this below - -;; Again, the following is an example only: - -;; bind ess-r-args-show to F2 -;; (define-key ess-mode-map [f2] 'ess-r-args-show) - -;; bind ess-r-args-insert to F3 -;; (define-key ess-mode-map [f3] 'ess-r-args-insert) - -;; == Setting the tooltip position == - -;; Unfortunately (?), tooltips are by default shown at the mouse -;; pointer's position, which is not necessarily where you are looking -;; at. If you use Emacs' mouse-avoidance-mode with option "banish" -;; then the mouse pointer will automatically be put at the upper right -;; corner of the Emacs window so that you know where to look for the -;; tooltip. Emacs also allows for setting the tooltip position -;; relative to the upper left corner of your screen. If you know how -;; to let Emacs determine the point (text cursor) position in pixels -;; from the upper left corner of the screen, please let me know. It -;; would then be possible to show the tooltip near the point, which I -;; would consider preferably. -;; SJE: see code at bottom 2009-01-30... - -;; ;; Put mouse away when using keyboard -;; (mouse-avoidance-mode 'banish) - -;; ;; Set the tooltip position in absolute pixels from the upper left -;; ;; corner of the screen -;; (setq tooltip-frame-parameters -;; '((name . "tooltip") -;; (left . 20) -;; (top . 20))) - -;; == Changelog == - -;; * 2007-04-03: The function should now do nothing (instead of -;; irritating cursor movement) if the current ESS process is -;; anything but R. -;; * 2007-04-05: Function names changed. Much more modular. GPLed. New -;; prefix configuration variable. Minor changes. -;; * 2007-04-30: Error handling added. Bugfix: Emacs used to lock up -;; when function was called within parentheses following the "#" -;; character (Thanks to John Bullock for his bug report!). - -;; == Troubleshooting == - -;; Before sending reports of problems, please check the following. - -;; * Doublecheck the requirements section above. -;; * Please be sure you tried both the "tooltip" option and the "echo -;; area" option and tell me whether both failed or just one. -;; * Check whether it is a key binding problem. Run the function with -;; M-x ess-r-args-show RET. If it works but not the key binding, try -;; binding it to another key. Some window managers might not pass -;; the function key keystrokes to Emacs. - -;; If you encounter problems, please send me detailed bug reports. -;; Please also indicate the ESS version you are running and the Emacs -;; type (GNU vs. X) and operating system. I will do my best to help -;; but please be aware that I'm everything but an emacs lisp expert. - -;; == TODO == - -;; These are things that I would like to see improved. Please let me -;; know if you know how it could be done. - -;; * As mentioned above, I would like to place the tooltip near the -;; point (text cursor) but I do not see how this could be done. -;; * Both the message in the echo area and the tooltip automatically -;; disappear as soon as a key is pressed. That is, you will need to -;; call the function again if you have entered the first -;; parameter(s) and wonder what additional parameters are possible. -;; I would prefer the information to be shown, say, five seconds or -;; so. - -;;; Code: - -(require 'ess-custom) -(require 'ess-inf) -(require 'ess-utils) -(eval-when-compile - (require 'tooltip)); for tooltip-show - -;; These defvars were previously defcustoms in ess-custom -(defvar ess-r-args-noargsmsg "No args found." - "Message returned if \\[ess-r-args-get] cannot find a list of arguments.") -(make-obsolete-variable 'ess-r-args-noargsmsg "Use `eldoc-mode' instead." "ESS 18.10") - -(defvar ess-r-args-show-prefix "ARGS: " - "A prefix string that is shown before the arguments list.") -(make-obsolete-variable 'ess-r-args-show-prefix "Use `eldoc-mode' instead." "ESS 18.10") - -(defvar ess-r-args-show-as 'message - "How ess-r-args-show should show the argument list. Possible values -are: 'message' (the default) or 'tooltip'.") -(make-obsolete-variable 'ess-r-args-show-as "Use `eldoc-mode' instead." "ESS 18.10") - -(defvar ess-r-args-keep-silent ess-S-non-functions - "List of functions names which should *not* trigger \\[ess-r-args-show]; -Defaults to `ess-S-non-functions'.") -(make-obsolete-variable 'ess-r-args-keep-silent "Use `eldoc-mode' instead." "ESS 18.10") - -(defvar ess-r-args-electric-paren nil - "Non-nil means re-assign \"(\" to \\[ess-r-args-auto-show].") -(make-obsolete-variable 'ess-r-args-electric-paren "Use `eldoc-mode' instead." "ESS 18.10") - -(defun ess-message (format-string &rest args) - "Shortcut for \\[message] only if `ess-show-load-messages' is non-nil." - (when (bound-and-true-p ess-show-load-messages) - (message format-string args))) - -(defun ess-r-args-current-function () - "Returns the name of the R function assuming point is currently -within the argument list or nil if no possible function name is -found." - (save-excursion - (condition-case nil (up-list -1) - (error (message "Can't find opening parenthesis."))) - (let ((posend (point))) - (backward-sexp 1) - (let ((rfunname (buffer-substring-no-properties posend (point)))) - (if (posix-string-match "^[a-zA-Z0-9_\.]+$" rfunname) - rfunname nil))))) -(make-obsolete 'ess-r-args-current-function "See `eldoc-mode'" "ESS 18.10") - -(defun ess-r-args-get (&optional function trim) - "Returns string of arguments and their default values of R -function FUNCTION or nil if no possible function name -found. Calls `ess-r-args-current-function' if no argument given. -If TRIM is non-nill remove tabs and newlines and replace ' = ' -with '=' (useful for display in minibuffer to avoid window and -buffer readjustments for multiline string)." - (if (null function) - (setq function (ess-r-args-current-function))) - (when (and function - (or ess-current-process-name - (called-interactively-p 'any))) - (ess-force-buffer-current "R process to use: ") - ;; ^^^^^^^^^^^^^^^ has own error handler - (mapconcat (lambda (arg) (concat (car arg) "=" (cdr arg))) - (cadr (ess-function-arguments function)) - ", "))) - -(make-obsolete 'ess-r-args-get "See `eldoc-mode'" "ESS 18.10") - -;;;###autoload -(defun ess-r-args-show (&optional function) - "Show arguments and their default values of R function. Calls -\\[ess-r-args-current-function] if called without argument." - (interactive "*") - (ess-message "(ess-r-args-show): start") - (if (null function) - (setq function (ess-r-args-current-function))) - (ess-message ".... function='%s'" function) - (when function - (let* ((tt (equal ess-r-args-show-as 'tooltip)) - (args (concat ess-r-args-show-prefix - (ess-r-args-get function (not tt))))) - (ess-message "(ess-r-args-show): args='%s'" args) - (when args - (if (not tt) - (message args) - (require 'tooltip) - ;; value of 30 in next call is just a guess, - ;; should really be based - ;; on something like pixel height of 1-2 vertical - ;; lines of text - (ess-tooltip-show-at-point args 0 30)) - )))) -(make-obsolete 'ess-r-args-show "See `eldoc-mode'" "ESS 18.10") - -;;;###autoload -(defun ess-r-args-auto-show () - "Typically assigned to \"(\": If there's an ess-process, automatically show arguments -and their default values of an R function. Built on \\[ess-r-args-show]." - (interactive) - (insert "("); (skeleton-pair-insert-maybe nil) - (if (and (not eldoc-mode) - ess-local-process-name ; has a process and it must still be running - (ess-get-process ess-local-process-name)) - (ess-r-args-show))) -(make-obsolete 'ess-r-args-auto-show "See `eldoc-mode'" "ESS 18.10") - -;; MM: I would strongly discourage use of the following: -;; it leads to clueless newbie-users who indeed -;; explicitly call a function with all its default arguments; -;; instead of only setting the required arguments -(defun ess-r-args-insert (&optional function) - "Insert arguments and their default values of function. Calls -ess-r-args-current-function if no argument given." - (interactive "*") - (if (null function) - (setq function (ess-r-args-current-function))) - (if function - (let ((args (ess-r-args-get function)) - (pointpos (point))) - (insert args) - (goto-char pointpos)))) -(make-obsolete 'ess-r-args-insert "See `eldoc-mode'" "ESS 18.10") - - -;; (defvar ess-r-object-tooltip-alist -;; '((numeric . "summary") -;; (integer . "summary") -;; (factor . "table") -;; (lm . "summary") -;; (other . "str")) -;; "List of ( . ) to be used in \\[ess-r-object-tooltip]. -;; For example, when called while point is on a factor object, a table of that -;; factor will be shown in the tooltip. -;; The special key \"other\" in the alist defines which function to call when -;; the class is not mached in the alist. The default, str(), is a fairly useful -;; default for many, including data.frame and function objects.") - -;; From Erik Iversion, slightly modified, -;; http://www.sigmafield.org/2009/10/01/r-object-tooltips-in-ess/ -;; (defun ess-r-object-tooltip () -;; "Get info for object at point, and display it in a tooltip." -;; (interactive) -;; (let ((proc (ess-get-process)) -;; (objname (current-word)) -;; (curbuf (current-buffer)) -;; (tmpbuf (get-buffer-create " *ess-r-object-tooltip*")) -;; bs) -;; (when objname -;; (ess-write-to-dribble-buffer -;; (format "ess-r-object-tooltip: objname='%s'\n" objname)) -;; (ess-command (concat "class(" objname ")\n") tmpbuf nil nil nil proc) -;; (with-current-buffer tmpbuf -;; (goto-char (point-min)) -;; ;; CARE: The following can only work in an English language locale! -;; ;; .lang. <- Sys.getenv("LANGUAGE"); Sys.setenv(LANGUAGE="en") -;; ;; .lc. <- Sys.getlocale("LC_MESSAGES"); Sys.setlocale("LC_MESSAGES","en_US.utf-8") -;; ;; and *afterward* Sys.setenv(LANGUAGE=.lang.); Sys.setlocale("LC_MESSAGES", .lc.) -;; ;; but that fails sometimes, e.g., on Windows -;; (unless (re-search-forward "\(object .* not found\)\|unexpected" nil t) -;; (re-search-forward "\"\\(.*\\)\"" nil t) -;; (let* ((objcls (match-string 1)) -;; (myfun (or (cdr (assoc-string objcls ess-r-object-tooltip-alist)) -;; (cdr (assoc 'other ess-r-object-tooltip-alist))))) -;; (ess-command (concat myfun "(" objname ")\n") tmpbuf nil nil nil proc)) -;; (setq bs (buffer-string))))) -;; (if bs -;; (ess-tooltip-show-at-point bs 0 30)))) - -;; Erik: my default key map -;;(define-key ess-mode-map "\C-c\C-g" 'ess-r-object-tooltip) - -;; On http://www.sigmafield.org/2009/10/01/r-object-tooltips-in-ess/ -;; in the comments, "Charlie" recommended - -;; (custom-set-faces -;; '(tooltip ((t (:background "white" :foreground "blue" :foundry "fixed"))))) - - - -(provide 'ess-r-args) - -;;; ess-r-args.el ends here diff --git a/elpa/ess-20191014.1343/obsolete/ess-rutils.el b/elpa/ess-20191014.1343/obsolete/ess-rutils.el deleted file mode 100644 index 82813e26..00000000 --- a/elpa/ess-20191014.1343/obsolete/ess-rutils.el +++ /dev/null @@ -1,41 +0,0 @@ -;;; ess-rutils.el --- Convenience features for package and object control. -*- lexical-binding: t; -*- - -;; Author: J. Alexander Branham -;; Maintainer: ESS-Core -;; Keywords: processes - -;; Copyright (c) 2019 Free Software Foundation -;; Copyright (c) 2013-2019 ESS Core -;; Copyright (c) 2005-2013 Sebastian P. Luque - -;; This program 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 3 of the License, or -;; (at your option) any later version. - -;; This program 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 for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; History: - -;; This file was originally written by Sebastian Luque in 2004. It was -;; completely rewritten in 2019 and then merged into ess-r-mode as -;; part of contributing ESS to GNU Emacs. - -;;; Commentary: - -;; This file used to have support for listing packages and a few other -;; misc functions. That is now in ess-r-mode. This file is provided -;; only so that users who have (require 'ess-rutils) in their init -;; files don't encounter errors when they update ESS. - -;;; Code: - -(provide 'ess-rutils) - -;;; ess-rutils.el ends here diff --git a/elpa/ess-20191014.1343/obsolete/ess-swv.el b/elpa/ess-20191014.1343/obsolete/ess-swv.el deleted file mode 100644 index e54f6db0..00000000 --- a/elpa/ess-20191014.1343/obsolete/ess-swv.el +++ /dev/null @@ -1,491 +0,0 @@ -;;; ess-swv.el --- Some simple functions for ESS and Sweave - -;; Copyright (C) 2005 David Whiting, A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2006-2008 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - -;; Author: David Whiting -;; Created: 15 April 2005 -;; Maintainer: ESS-core - -;; Keywords: statistics, tools - -;; This file is part of ESS. - -;; This file 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. - -;; This file 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - -;;; Commentary: - -;; -;; Some simple functions for ESS and Sweave -;; david.whiting at ncl.ac.uk -;; Wed Sep 1 14:55:52 CEST 2004 - -;; I have written some very simple elisp functions that I have found -;; useful and thought others might like to see. I dabble with elisp -;; occasionally at best so there are probably better ways to do what I -;; have done, but so far this seems to work for me. There are several -;; things that are hard-coded, I use Linux and I think that this would -;; probably not work in Windows (not as it is now anyway). - -;; With these functions and key bindings all I need to do is open a .Rnw -;; file and, assuming R is running, I press: - -;; M-n s to Sweave the file, then -;; M-n l to run latex on the results of Sweave, then -;; M-n p to make and display a postscript file , or -;; M-n P to make and display a PDF version. - -;; David Whiting to Anthony Rossini, Mar 30 -;; On Wed, Mar 30, 2005 at 11:51:26AM +0200, A.J. Rossini wrote: -;; > I'm going to go ahead and add this stuff to the distribution tonight -;; > if you don't mind. I'd forgotten about it! -;; It would make me very happy indeed. -;; > (however, need permission to do so). -;; Permission granted! - -;; Dave -;; -- -;; David Whiting -;; School of Clinical Medical Sciences, The Medical School -;; University of Newcastle upon Tyne, NE2 4HH, UK. - - -;;; TODO: -;;; -;;; 1. I want to be able to send ess-swv-latex a parameter to tell it -;;; the number of times to run LaTeX (to get references updated -;;; correctly). -;;; -;;; 2. Also need to add ess-swv-Bibtex. -;;; -;;; 3. Might be good to have a way to chain commands. -;;; -;;; 4. ADD to the ../doc/ess.texi !! - - -;;; Code: - -;;; Autoloads and Requires - -(eval-when-compile - (require 'ess-custom)) - -(require 'ess-utils) -(require 'ess-noweb-mode) -(require 'ess-r-mode); for Rnw-mode -(require 'easymenu) - - - -(defvar TeX-command-list) -(defvar TeX-command-default) -(defvar TeX-file-extensions) -(declare-function TeX-normal-mode "tex") - -(defgroup ess-sweave nil - "Mode for editing Sweave (*.[SR]nw) files." - :group 'ess-S - :prefix "ess-") - -(defcustom ess-pdf-viewer-pref nil - "External pdf viewer you like to use from ESS. -Can be a string giving a name of the program or a list with car -giving heprogram and the tail giving the arguments. For example -'(\"okular\" \"--unique\")." - :type '(choice (const nil) (repeat :tag "Command with arguments" string) (string :tag "Command"))) - -(defcustom ess-ps-viewer-pref nil - "External PostScript viewer you like to use from ESS. -If nil, ESS will try finding one from a list." - :type '(choice (const nil) string)) - -(defcustom ess-swv-pdflatex-commands '("texi2pdf" "pdflatex" "make") - "Commands to run a version of pdflatex in \\[ess-swv-PDF]; -the first entry is the default command." - :group 'ess-sweave - :type '(repeat string)) - -(defcustom ess-swv-plug-into-AUCTeX-p nil - "Non-nil means add commands to AUCTeX's \\[TeX-command-list] -to sweave the current noweb file and latex the result." - :group 'ess-sweave - :type '(choice (const :tag "Off" nil) - (const :tag "On" t))) - -(defcustom ess-swv-processing-command ".ess_weave(%s, %s)" - "Command used by `ess-swv-run-in-R'. - -First %s is literally replaced by the processing command (for -example: Sweave) second %s is replaced with a string containing a -processed file and possibly additional argument encoding (example: -\"path/to/foo.Rnw\", encoding='utf-8') - -.ess_weave changes the working directory to that of the supplied -file. - -If you want to simply call knitr or Sweave in global environment -set this command to \"%s(%s)\"." - :group 'ess-R - :type 'string) - -;; currently use exactly for "Sweave", "Stangle", "knit", and "purl" -(defun ess-swv-run-in-R (cmd &optional choose-process block) - "Run \\[cmd] on the current .Rnw file. Utility function not called by user." - (let* ((rnw-buf (current-buffer))) - (if choose-process ;; previous behavior - (ess-force-buffer-current "R process to load into: ") - ;; else - (update-ess-process-name-list) - (cond ((= 0 (length ess-process-name-list)) - (message "no ESS processes running; starting R") - (sit-for 1); so the user notices before the next msgs/prompt - (run-ess-r) - (set-buffer rnw-buf) - ) - ((not (string= "R" (ess-make-buffer-current))); e.g. Splus, need R - (ess-force-buffer-current "R process to load into: ")) - )) - - (save-excursion - ;; (ess-execute (format "require(tools)")) ;; Make sure tools is loaded. - (basic-save-buffer); do not Sweave/Stangle old version of file ! - (let* ((sprocess (ess-get-process ess-current-process-name)) - (sbuffer (process-buffer sprocess)) - (rnw-file (buffer-file-name)) - (Rnw-dir (file-name-directory rnw-file)) - (buf-coding (symbol-name buffer-file-coding-system)) - ;; could consider other encodings, but utf-8 is "R standard" for non-ASCII: - (cmd-args (concat "\"" rnw-file "\"" - (if (string-match "^utf-8" buf-coding) - ", encoding = \"utf-8\""))) - (Sw-cmd - (format ess-swv-processing-command cmd cmd-args))) - (message "%s()ing %S" cmd rnw-file) - ;; need to block when we are running ess-swv-weave-PDF so we - ;; know when to start compiling the generated .tex file - (if block - (progn - (ess-eval-linewise (concat Sw-cmd "\n") nil nil nil t) - (message "Finished %s()ing %S" cmd rnw-file)) - (ess-execute Sw-cmd 'buffer nil nil) - (pop-to-buffer-same-window rnw-buf) - (display-buffer (buffer-name sbuffer))))))) - -(defcustom ess-swv-processor 'sweave - "Processor to use for weaving and tangling. -Currently 'sweave or 'knitr" - :group 'ess-R - :type '(choice (const sweave) (const knitr))) - - -(defun ess-swv-tangle () - "Run Stangle/purl on the current .Rnw file. -Depending on the `ess-swv-processor' used." - (interactive) - (ess-swv-run-in-R (cond ((eq ess-swv-processor 'sweave) "Stangle") - ((eq ess-swv-processor 'knitr) "purl") - (t (error "Not a valid processor %s" ess-swv-processor))))) - -(defun ess-swv-weave (&optional choose) - "Run Sweave/knit on the current .Rnw file. -Depending on the `ess-swv-processor' used. - -If CHOOSE is non-nil, offer a menu of available weavers. -" - (interactive "P") - (let ((processor (if choose - (ess-completing-read "Weaver" '("sweave" "knitr") nil t) - (symbol-name ess-swv-processor)))) - (ess-swv-run-in-R (cond ((string= processor "sweave") "Sweave") - ((string= processor "knitr") "knit") - (t (error "Not a valid processor %s" processor)))))) - -(defun ess-swv-sweave () - "Run Sweave on the current .Rnw file." - (interactive) - (ess-swv-run-in-R "Sweave")) - -(defun ess-swv-stangle () - "Run Stangle on the current .Rnw file." - (interactive) - (ess-swv-run-in-R "Stangle")) - -(defun ess-swv-knit () - "Run knit on the current .Rnw file." - (interactive) - (ess-swv-run-in-R "knit")) - -(defun ess-swv-purl () - "Run purl on the current .Rnw file." - (interactive) - (ess-swv-run-in-R "purl")) - -;; trying different viewers; thanks to an original patch for -;; ess-swv.el from Leo : -(defun ess-get-ps-viewer () - "Get external PostScript viewer to be used from ESS. -Use `ess-ps-viewer-pref' when that is executably found by \\[executable-find]. -Otherwise try a list of fixed known viewers." - (file-name-nondirectory - (or (and ess-ps-viewer-pref ; -> ./ess-custom.el - (executable-find ess-ps-viewer-pref)) - (executable-find "gv") - (executable-find "evince") - (executable-find "kghostview")))) - -(defun ess-get-pdf-viewer () - "Get external PDF viewer to be used from ESS. -Use `ess-pdf-viewer-pref' when that is executably found by \\[executable-find]. -Otherwise try a list of fixed known viewers." - (let ((viewer (or ess-pdf-viewer-pref - ;; (and (stringp ess-pdf-viewer-pref) ; -> ./ess-custom.el - ;; (executable-find ess-pdf-viewer-pref)) - (executable-find "evince") - (executable-find "kpdf") - (executable-find "okular") - (executable-find "xpdf") - (executable-find "acroread") - (executable-find "xdg-open") - ;; this one is wrong, (ok for time being as it is used only in swv) - (when (fboundp 'ess-get-words-from-vector) - (car (ess-get-words-from-vector - "getOption(\"pdfviewer\")\n")))))) - (when (stringp viewer) - (setq viewer (file-name-nondirectory viewer))) - viewer)) - -(defun ess-swv-weave-PDF (&optional choose) - "Sweave/knit, compile TeX, and display PDF. -Run Sweave or knit depending on `ess-swv-processor' used. - -If CHOOSE is non-nil, offer a menu of available weavers. -" - (interactive "P") - (let ((processor (if choose - (ess-completing-read "Weaver" '("sweave" "knitr") nil t) - (symbol-name ess-swv-processor)))) - (ess-swv-run-in-R (cond ((string= processor "sweave") "Sweave") - ((string= processor "knitr") "knit") - (t (error "Not a valid processor %s" processor))) - nil t) - (ess-swv-PDF nil t))) - - -(defun ess-swv-latex () - "Run LaTeX on the product of Sweave()ing the current file." - (interactive) - (save-excursion - (let* ((namestem (file-name-sans-extension (buffer-file-name))) - (latex-filename (concat namestem ".tex")) - (tex-buf (get-buffer-create " *ESS-tex-output*"))) - (message "Running LaTeX on '%s' ..." latex-filename) - (switch-to-buffer tex-buf) - (call-process "latex" nil tex-buf 1 latex-filename) - (switch-to-buffer (buffer-name)) - (display-buffer tex-buf) - (message "Finished running LaTeX" )))) - - -(defun ess-swv-PS () - "Create a postscript file from a dvi file (name based on the current -Sweave file buffer name) and display it." - (interactive) - (let* ((buf (buffer-name)) - (namestem (file-name-sans-extension (buffer-file-name))) - (dvi-filename (concat namestem ".dvi")) - (psviewer (ess-get-ps-viewer))) - (shell-command (concat "dvips -o temp.ps " dvi-filename)) - (shell-command (concat psviewer " temp.ps & ")) - (switch-to-buffer buf) - )) - -(defun ess-swv-PDF (&optional pdflatex-cmd hide-compile-buffer) - "From LaTeX file, create a PDF (via 'texi2pdf' or 'pdflatex', ...), by -default using the first entry of `ess-swv-pdflatex-commands' and display it." - (interactive) - (setq pdflatex-cmd - (or pdflatex-cmd - (and (eq (length ess-swv-pdflatex-commands) 1) - (car ess-swv-pdflatex-commands)) - (ess-completing-read "pdf latex command" - ess-swv-pdflatex-commands ; <- collection to choose from - nil 'confirm ; or 'confirm-after-completion - nil nil (car ess-swv-pdflatex-commands)))) - (let* ((buf (buffer-name)) - (namestem (file-name-sans-extension (buffer-file-name))) - (latex-filename (concat namestem ".tex")) - (tex-buf (get-buffer-create "*ESS-tex-output*")) - (pdfviewer (ess-get-pdf-viewer)) - (pdf-status) - (cmdstr-win (format "start \"%s\" \"%s.pdf\"" pdfviewer namestem)) - (pdffile (format "%s.pdf" namestem)) - (cmd (if (stringp pdfviewer) - (list pdfviewer pdffile) - (append pdfviewer (list pdffile))))) - - ;;(shell-command (concat "pdflatex " latex-filename)) - (message "Running '%s' on '%s' ..." pdflatex-cmd latex-filename) - (with-current-buffer tex-buf (erase-buffer)) - (setq pdf-status - (call-process pdflatex-cmd nil tex-buf t - (if (string= "texi2" (substring pdflatex-cmd 0 5)) - ;; workaround (bug?): texi2pdf or texi2dvi *fail* to work with full path: - (file-name-nondirectory latex-filename) - latex-filename))) - (if (not (= 0 pdf-status)) - (progn (message "** OOPS: error in '%s' (%d)!" pdflatex-cmd pdf-status) - (display-buffer tex-buf)) - ;; else: pdflatex probably ok - ;; (set-process-sentinel proc 'shell-command-sentinel) - (if (and (and ess-microsoft-p - ;; Silence byte compiler warns about w32-fns - (fboundp 'w32-shell-dos-semantics)) - (w32-shell-dos-semantics)) - (shell-command cmdstr-win) - (message "%s" (mapconcat 'identity cmd " ")) - (apply 'start-process (car cmd) nil cmd)) - (unless hide-compile-buffer (display-buffer tex-buf)) - (message "%s finished with status %d" pdflatex-cmd pdf-status)))) - - -(defun ess-insert-Sexpr () - "Insert Sexpr{} into the buffer at point." - (interactive) - (insert "\\Sexpr{}") - (backward-char)) - - -;;; back-compatible wrappers: -(defun ess-makeSweave () "old *DEPRECATED* version of \\[ess-swv-weave]." - (interactive) (ding) - (message - "** warning: ess-makeSweave is deprecated. Do use (ess-swv-weave) instead!") - (ess-swv-weave)) - -(defun ess-makeLatex () "old *DEPRECATED* version of \\[ess-swv-latex]." - (interactive) (ding) - (message - "** warning: ess-makeLatex is deprecated. Do use (ess-swv-latex) instead!") - (ess-swv-latex)) - -(defun ess-makePS () "old *DEPRECATED* version of \\[ess-swv-PS]." - (interactive) (ding) - (message - "** warning: ess-makePS is deprecated. Do use (ess-swv-PS) instead!") - (ess-swv-PS)) - -(defun ess-makePDF () "old *DEPRECATED* version of \\[ess-swv-PDF]." - (interactive) (ding) - (message - "** warning: ess-makePDF is deprecated. Do use (ess-swv-PDF) instead!") - (ess-swv-PDF)) - - -;; AUCTeX integration. This is independent of this library, but it fits -;; here nonetheless since it's an alternative way of Sweave'ing without -;; starting iESS. - -(defun ess-swv-add-TeX-commands () - "Add commands to AUCTeX's \\[TeX-command-list]." - (unless (and (featurep 'tex-site) (featurep 'tex)) - (error "AUCTeX does not seem to be loaded")) - (add-to-list 'TeX-command-list - '("Sweave" "R CMD Sweave %t" - TeX-run-command nil (latex-mode) :help - "Run Sweave") t) - (add-to-list 'TeX-command-list - '("LaTeXSweave" "%l %(mode) %s" - TeX-run-TeX nil (latex-mode) :help - "Run LaTeX after Sweave") t) - (setq TeX-command-default "Sweave") - (mapc (lambda (suffix) - (add-to-list 'TeX-file-extensions suffix)) - '("nw" "Snw" "Rnw"))) - -(defun ess-swv-remove-TeX-commands (x) - "Helper function: check if car of X is one of the Sweave strings" - (let ((swv-cmds '("Sweave" "LaTeXSweave"))) - (unless (member (car x) swv-cmds) x))) - -(defun ess-swv-plug-into-AUCTeX () - "Add commands to AUCTeX's \\[TeX-command-list] to sweave the current noweb -file and latex the result." - (if ess-swv-plug-into-AUCTeX-p - (add-hook 'Rnw-mode-hook 'ess-swv-add-TeX-commands) - (remove-hook 'Rnw-mode-hook 'ess-swv-add-TeX-commands) - (setq TeX-command-list (mapcar 'ess-swv-remove-TeX-commands TeX-command-list) - ;; this will remove the items, leaving nils, so remove them. - TeX-command-list (delq nil TeX-command-list)))) -;; as ess-swv-plug-into-AUCTeX-p is customizable ... : -(if ess-swv-plug-into-AUCTeX-p - (eval-after-load "tex" '(ess-swv-plug-into-AUCTeX))) - -(defun ess-swv-toggle-plug-into-AUCTeX () - "Toggle inclusion of commands to sweave noweb files and latex the results in -\\[TeX-command-list] on and off. Commands are added via \\[Rnw-mode-hook]." - (interactive) - (unless (and (featurep 'tex-site) (featurep 'tex)) - (error "AUCTeX are not available")) - (setq ess-swv-plug-into-AUCTeX-p (not ess-swv-plug-into-AUCTeX-p)) - (ess-swv-plug-into-AUCTeX) - (TeX-normal-mode t) - (if ess-swv-plug-into-AUCTeX-p - (message "Sweave and LaTeXSweave are activated in AUCTeX.") - (message "Sweave and LaTeXSweave are de-activated in AUCTeX."))) - - -;;; Now bind some keys. -(define-key ess-noweb-minor-mode-map "\M-ns" 'ess-swv-sweave) -(define-key ess-noweb-minor-mode-map "\M-nT" 'ess-swv-tangle) -(define-key ess-noweb-minor-mode-map "\M-nl" 'ess-swv-latex) -(define-key ess-noweb-minor-mode-map "\M-np" 'ess-swv-PS) -(define-key ess-noweb-minor-mode-map "\M-nP" 'ess-swv-PDF) -(define-key ess-noweb-minor-mode-map "\M-nr" 'ess-swv-knit) -(define-key ess-noweb-minor-mode-map "\M-nu" 'ess-swv-purl) -(define-key ess-noweb-minor-mode-map "\M-nv" 'ess-swv-weave-PDF) -(define-key ess-noweb-minor-mode-map "\M-nw" 'ess-swv-weave); depends on proc. - -(define-key ess-noweb-minor-mode-map "\M-nx" 'ess-insert-Sexpr) - -;; AND add these to the noweb menu we have anyway ! : -(easy-menu-define ess-swv-menu - ess-noweb-minor-mode-menu - "Submenu for use in `Rnw-mode'." - - '("Sweaving, Tangling, ..." - ["Sweave" ess-swv-sweave t] - ["Tangle" ess-swv-tangle t] - ["LaTeX" ess-swv-latex t] - ["PDF(LaTeX)" ess-swv-PDF t] - ["PS (dvips)" ess-swv-PS t] - ["Knit" ess-swv-knit t] - ["Purl" ess-swv-purl t] - ["View PDF" ess-swv-weave-PDF t] - ["Weave (Sweave/Knit)" ess-swv-weave t] - ["Insert Sexpr" ess-insert-Sexpr t] - ["AUCTeX Interface" ess-swv-toggle-plug-into-AUCTeX - :style toggle :selected ess-swv-plug-into-AUCTeX-p] - )) - -(easy-menu-add-item ess-noweb-minor-mode-menu - nil ;; <= path - ess-swv-menu) - - ; provides - -(provide 'ess-swv) - -;;; ess-swv.el ends here diff --git a/elpa/ess-20191014.1343/onews.info b/elpa/ess-20191014.1343/onews.info deleted file mode 100644 index f7c08421..00000000 --- a/elpa/ess-20191014.1343/onews.info +++ /dev/null @@ -1,1523 +0,0 @@ -This is onews.info, produced by makeinfo version 6.5 from onews.texi. - -Changes and New Features in 15.09: - - * ESS[R]: The indentation logic has been refactored. It should be - faster, more consistent and more flexible. There are three types - of indentation settings, those starting with 'ess-offset-' give the - actual offsets, those starting with 'ess-indent-' are control - (commonly Boolean) variables, and those starting with 'ess-align-' - are vertical alignment overrides which inhibit default offsets in - specific situations. See 'ess-style-alist' for detailed - description of the new indentation system and provided default - indentation styles. - - * ESS[R]: Deprecation of old indentation settings. As a consequence - of the indentation re-factoring 'ess-brace-imaginary-offset', - 'ess-expression-offset' and all delimiter-specific offsets are - deprecated. The settings for indentation of continued statements - have been replaced by 'ess-offset-continuations'. It can be set to - either 'cascade' or 'straight' (the default). - 'ess-arg-function-offset' has been replaced by - 'ess-indent-from-lhs' and has been generalised to assignments. - This setting now works with both statement blocks and expressions - and only takes effect for offsets set to 'prev-call' and - 'open-delim' in order to produce a consistent indentation. - - * ESS: A test framework has been set up. - - * ESS[R]: A new RStudio style is provided to mimic as closely as - possible R files indented via RStudio. To reproduce the setup of - some of the RStudio users, the RStudio- style with - 'ess-offset-arguments' set to 'prev-line' is also provided. In - addition, the new RRR+ style is equivalent to RRR except it indents - blocks in function calls relatively to the opening delimiter. This - style does not try to save horizontal space and produces more - indentation. - - * ESS[R]: Roxygen fields will now be indented on paragraph refilling - in order to make the documentation more readable. You can also - refill commented lines in the 'examples' field without squashing - the surrounding code in the comments. - - * ESS[R]: ESS can now format your code! This is controlled through - the settings 'ess-fill-calls' and 'ess-fill-continuations'. When - activated, '(fill-paragraph)' formats your calls and your - formulas/continuations while making sure they don't go past - 'fill-column'. Repeated refills cycle through different styles - (see the docstrings for more details). By default, the refilled - region blinks. Set 'ess-blink-filling' to nil to prevent this. - - * ESS[R]: Fix occasional missing error location fontification in - inferior buffers. - - * ESS[R]: ess-developer now correctly assigned the environment of new - functions to the package namespace. - - * ESS[Julia]: ?[topic] now works in the *julia* buffer. Note that - support for editing Julia code now depends on 'julia-mode.el' from - the Julia project. If you install ESS from the official - tarball/zip file, 'julia-mode.el' is already included. Otherwise, - if you install ESS by running 'make', then the latest version of - 'julia-mode.el' is downloaded (and so you need an active internet - connection to install) during the installation process. - Alternatively, if you run ESS without running 'make', then ensure - that you have the 'julia-mode.el', which you can get easily from - MELPA for example. - - * iESS: For naming inferior processes, ESS can use 'projectile''s - project root and it does so when - 'ess-gen-proc-buffer-name-function' is set to - 'ess-gen-proc-buffer-name:projectile-or-simple' as by default, or - to another value beginning with - 'ess-gen-proc-buffer-name:projectile-*'. - - Changes and New Features in 15.03-1: - * ESS[R]: An indentation bug has been fixed (github issue 163) - * ESS[R]: On windows, if 'ess-prefer-higher-bit' is non-nil (the - default), then R-newest will try to run a 64 bit (rather than 32 - bit) version of R. - - Changes and New Features in 15.03: - * ESS[R]: Full native support for 'company-mode'. - * ESS[R]: More efficient caching algorithm for R completion. - * ESS: New offset variable 'ess-close-paren-offset' to control the - indentation of the closing parentheses. - * ESS[R]: Ask for CRAN mirror only once per emacs session. - * ESS[R]: Detect 'library' and 'require' calls for better completion - caching. - * Buffer display is now customizable ('ess-show-buffer-action'). - * Use 'y-or-n-p' instead of 'yes-or-no-p' throughout. - * More support for ODS in ess-sas-graph-view. - * Makefiles are now both UNIX and GNU friendly. - * ESS[R]: Simplify directory lookup in 'ess-developer' (#137). - * Make closed paren indentation consistent - - Bug Fixes in 15.03: - * Fix open brace indentation bug (#27 in ess/R-ESS-bugs.R). - * Fix git version lookup - * Don't check directory modtime in R dialect. - * Declare all ess macros for edebug. - * Add 'ess-smart-comma' to eldoc message functions. - * Inform users when retrieving RDA aliases. - * Line ending in '~' is also a continuation line. - * Filing roxy paragraphs works as expected now. - * In 'ess-developer-add-package', remove incorrect 'wait' argument - from 'ess-get-words-from-vector' call. - * Fix #96, #117, #120, #125, #134, #137. - * Fix ess-quit-r. Call base::q() even if it is masked. - * Fix 'ess-show-buffer' to always display the buffer in another - window. - * Makefile: Fix cd bug for directories with spaces in them - * 'ess-kill-buffer-and-go' modified to not restart R - - Changes / Selected Bug Fixes in 14.09: - * ESS[Julia]: Executable is changed to 'julia'. - * ESS[Julia]: Completion and help system was adjusted to Julia - v.0.3.0. Julia v.0.2.x is no more supported. - * ESS[R]: Running R with 'gdb' debugger now works as expected - * iESS: Inferior ESS buffers are now derived from 'comint-mode' - * ESS[R]: 'ess-execute-screen-options' uses correct screen width in - terminal sessions - * ESS: 'ess-build-tags-for-directory' works when no TAGS file name - was provided - * ESS: 'ess-offset-statement-continued' is now respected everywhere - except inside of the 'if' test condition. - * ESS: New variable 'ess-offset-statement-first-continued' for - indentation of the first line in multiline statements. - * ESSR: Starting ',' in multiline statements indentation is now - ignored to achieve a more pleasant alignment. - * ESSR: Improved behavior of 'RET' in roxygen blocks. - * ESS[R]: command cleaning with 'C-u C-u C-y' was broken with lines - containing " + " - * ESS[R]: fixed "empty watch window bug" - * ESS[R]: don't ask for help location on ac-quick-help (request of - github #81) - * ESS[R]: "importClassesFrom" and "importMethodsFrom" were added to - the list of two-parameter roxygen commands - * ESS[R]: fix vignetes display and hyperlinks (were broken in - 13.09-1) - * ESS[Julia]: recognize function names ending with ! - * ESS[Julia]: fix indentation of "for" comprehension syntax within - brackets. - - Changes / Selected Bug Fixes in 13.09-1: - * ess-remote and TRAMP: R support code is now downloaded in binary - form instead of being injected from local machine. The R code is - stored in '~/.config/ESSR/' directory on the remote machine - * TRAMP: PAGER environment variable is now correctly set to - 'inferior-ess-pager' - * retrieval of help topics on remote machines is fixed - * org-babel: source references of R code executed from org files - correctly point to source references in original org files (version - 8.2.1 or higher of org-mode is required for this feature) - * 'ess-execute' is now bound to 'C-c C-e C-e' in 'ess-extra-map'. - * completion works again in 'ess-execute' - * ESS[R]: 'head' and 'tail' methods were replaced by '.ess_htsummary' - in 'ess-R-describe-object-at-point-commands' - * ESS[roxygen]: evaluation commands now work in roxygen blocks. - Leading comments are automatically removed before the evaluation - * ESS[transcript]: 'Clean Region' now works with multiline - statements; 'ess-transcript-clean-region' etc. correctly treat - multiline statements, i.e., no longer forgets the lines typically - preceded by '+' - * ESS[SAS]: Three features/fixes with special thanks to Matthew - Fidler https://github.com/emacs-ess/ESS/pulls/mlf176f2 - (https://github.com/emacs-ess/ESS/pulls/mlf176f2). Turn on SAS log - mode when appropriate. Indent comments and CARDS statement more - appropriately. - * ESS[SAS]: 'ess-sas-edit-keys-toggle' default returns to 'nil' - * ESS[R]: support for 'prettify-symbols-mode': contribution from - Rudiger Sonderfeld - * ESS[SWV]: knitr now evaluates in the current frame - * ESS[developer]: ess-developer doesn't kill open DESCRIPTION files - anymore - * ESS[roxygen]: 'ess-roxy-preview-HTML' is now on 'C-c C-o C-w' and - 'ess-roxy-preview-text' is now on 'C-c C-o C-t' - * ESS: installation with 'make install' was simplified and should - work out of the box on most *nix systems - * ESS installation instructions simplified - * fixed font-lock bug introduced in 13.09 that was causing very slow - process output - - Changes/New Features in 13.09: - * font-lock in process buffers doesn't "spill" over prompts. Missing - closing string delimiters should not cause wrong fontification of - the following command input. - * ESS[julia]: full features M-TAB completion and auto-complete - support, which now works for modules, structures and data types. - * ESS[julia]: a much better eldoc showing arguments of methods and - data type constructors - * ESS-developer: - - ESS-developer work-flow pattern has been streamlined: - ESS-developer is now automatically activated on per-file basis - if the file is part of a developed package - 'ess-developer-packages'. The old behavior (activation on - per-process basis) is still available on 'M-x ess-developer' - in a process buffer. - - integration with 'devtools' package. New command - 'ess-developer-load-package' calls 'load_all' on the package - containing current file. 'ess-developer-add-package' now - offers IDO menu completions with available loading methods, - currently 'library', and 'load_all'. Loading command can be - customized with 'ess-developer-load-on-add-commands'. - * 'TAB' now indents region if region is active (a contribution of - Matthew Fidler in pull #41) - * 'M-x ess-version' now reports full loading path and recognizes git - and ELPA versions. - * warning and error keyword are now highlighted with - 'font-lock-warning-face' as they should be, (for quite some time - these keywords have been hijacked by compilation mode - fontification). - * eldoc: Eldoc now recognizes multiple processes. If current process - is busy, or current buffer is not associated with a process, eldoc - picks its completions from the first available free process. - * org-babel: evaluation is now org-friendly - * help: new help buffers now try to reuse ess-help buffers. This - behavior is controlled by 'ess-help-reuse-window' custom variable. - * help: ?foo pops IDO menu on multiple help files (so far it worked - only for 'C-c C-v') - * remote evaluation is considerably faster now on slow connections - * ESS[R] tracebug R source references regular expressions are - (mostly) language agnostic. - * 'ess-function-call-face' inherits from - 'font-lock-function-name-face' rather than - 'font-lock-builtin-face'. - * 'ess-inject-source' now accepts 'function-and-buffer' option. - * Documentation: The "New Features" section (and 'NEWS') now - represent recent changes: within the last year or so. All changes - can be found in the new news.html (news.html) (or 'NEWS' and - 'ONEWS'). - * ESS[R] 'ess-rep-regexp' should no longer inf.loop (rarely!), and - hence 'M-x ess-fix-miscellaneous' should neither. - - Changes/New Features in 13.05: - * ESS[gretl]: Support for 'gretl' (both editing and sub-process - interaction). A contribution of Ahmadou Dicko. - * ESS: process output display is 4-10 times faster due to new caching - and only occasional emacs re-display (for the moment this - functionality is available only when 'ess-tracebug' is active). - * ESS: 'C-c `' is now bound to 'ess-show-traceback' and 'C-c ~' is - bound to 'ess-show-call-stack'. - * ESS[R]: ESS stores function in 'ESSR' environment to avoid kludging - users' global environment and accidental deletion. - * ESS[R]: new variable 'ess-swv-processing-command' to control - weaving and tangling. - * ESS[R]: 'ess-default-style' has been changed (from 'DEFAULT') to - 'RRR'. Use something like '(setq ess-default-style 'DEFAULT)' or - '(setq ess-indent-level 2)' in your '~/.emacs' equivalent _before_ - loading ESS, if you do not like this new "incompatible" default - style. - * ESS[julia]: ESS stores its functions in 'ESS' module. - * ESS[julia]: Eldoc is now supported in julia modes - * ESS[julia]: Adjusted error reference detection and interactive help - to julia internal changes - * ESS[R]: 'ess-use-tracebug''s default has been changed to 't'. Set - it to nil if you want to keep the previous behavior. - * ESS[tracebug]: Electric debug keys have been removed [breaking - change] The functionality was replaced with 'ess-debug-minor-mode' - and 'ess-debug-minor-mode-map'. - * ESS[tracebug]: 'ess-tracebug-map' is an alias to 'ess-dev-map' 'C-c - C-t'. - * ESS[tracebug]: 'ess-bp-toggle-state' ('C-c C-t o') can now be used - during the debug session to toggle breakpoints on the fly - (suggestion by Ross Boylan). - * ESS[tracebug]: 'ess-debug-flag-for-debugging' and - 'ess-debug-unflag-for-debugging' work correctly from the debugging - contexts. These commands also recognize non-exported functions for - the packages listed in 'ess-developer-packages' ('C-c C-t C-a'). - - * ESS[R]: Eldoc (activated by 'ess-use-eldoc') has become more - sophisticated, and hence also more intruding in the interface - between the Statistics softare, e.g., R, and the user. - - Note that you can turn off ElDoc, by placing '(setq ess-use-eldoc - nil)' in your '~/.emacs' file, prior to loading ESS, - - * ESS[SAS]: long over-looked 'SAS-mode-hook' appears! - * ESS[SAS]: 'ess-sas-edit-keys-toggle' now defaults to 't' since - 'sas-indent-line' is still broken, i.e. 'TAB' is now bound to - 'ess-sas-tab-to-tab-stop' by default - - Changes/Bug Fixes in 12.09-2: - * ESS: new 'ess-switch-to-end-of-proc-buffer' variable that controls - whether 'C-c C-z' switches to the end of process buffer. The - default is 't'. You can use prefix argument to 'C-c C-z' to toggle - this variable. - * ESS: fix in 'ess-eval-linewise' that was causing emacs to hang - during R debugging with 'ess-eval-visibly' equal to 't'. - * ESS: fix in 'ess-eval-linewise' that was causing emacs to recenter - the prompt in visible window - * ESS[tracebug]: A better handling of "Selection" prompts and debug - related singlekey commands. - * ESS: fix a bug in 'ess-switch-process' that was causing '*new*' - selection to fail. - * ESS[R]: Solve missing 'ess-local-process-name' bug in R-dired. - * ESS[SWV]: 'ess-swv-PDF' doesn't ask for a command to run if there - is only one command in 'ess-swv-pdflatex-commands'. - * ESS[SWV]: 'ess-swv-weave' gained an universal argument to allow for - an interactive choice between available weavers (sweave, knitr). - * ESS: 'ess-eval-*-and-step' functions go to next empty line at eob, - instead of staying at the last line. - - Changes/New Features in 12.09-1: - * ESS _Breaking Changes in Keys_: - - - New keymaps: 'ess-doc-map' bound to 'C-c C-d'; 'ess-extra-map' - bound to 'C-c C-e'; 'ess-dump-object-into-edit-buffer' was - moved on 'C-c C-e C-d' - - roxygen map was moved on 'C-c C-o' and 'ess-roxy-update-entry' - now resides on 'C-c C-o C-o' - - ess-handy-commands is not bound anymore - - 'ess-dev-map' (including 'ess-tracebug' and 'ess-developer') - moved on 'C-c C-t' - - 'C-c C-y' is deprecated in favor of 'C-c C-z C-z' - * ESS[R] new command 'ess-describe-object-at-point' bound to 'C-c C-d - C-e' (repeat 'C-e' or 'e' to cycle). It was inspired by Erik - Iverson's 'ess-R-object-tooltip'. Customize - 'ess-describe-at-point-method' to use tooltip instead of an - electric buffer. - * ESS: New command 'ess-build-tags-for-directory' bound to 'C-c C-e - C-t' for building dialect specific tag tables. After building tags - use 'M-.' to navigate to function and objects definitions. By - default 'C-c C-e C-t' builds tags based on imenu regular - expressions and also include other common languages '.c, .o, .cpp' - etc. But it relies on external 'find' and 'etags' commands. If - 'ess-build-tags-command' is defined (for 'R'), the inferior process - is asked to build tags instead. - * ESS: 'ess-switch-process' offers '*new*' alternative to start a new - process instead of switching to one of the currently running - processes. - * ESS: Switching between processes ('C-c C-s') uses buffer names - instead of the internal process names. Use 'M-x rename-buffer' - command to conveniently rename your process buffers. - * ESS: Process buffers can be automatically named on process creation - according to user specified scheme. Default schemes are *proc*, - *proc:dir* and *proc:abbr-long-dir* where 'proc' stands for the - internal process name and 'dir' stands for the directory where the - process was started in. The default is *proc*. For customization - see 'ess-gen-proc-buffer-name-function'. - * ESS: 'ess-eval-visibly-p' is deprecated in favor of - 'ess-eval-visibly'. - * ESS: New evaluation pattern 'nowait'. In addition to old 'nil' and - 't' values, 'ess-eval-visibly' accepts 'nowait' for a visible - evaluation with no waiting for the process. See 'ess-eval-visibly' - for details on evaluation patterns. - * ESS: New "Process" menu entry with process related commands and - configuration - * iESS: Process buffer is now automatically shown on errors - * ESS: New 'ess-switch-to-inferior-or-script-buffer' command bound to - 'C-c C-z' in both script and process buffers. If invoked form - process buffer it switches to the most recent buffer of the same - dialect. It is a single key command. - * ESSR-help: On multiple help pages with the same name, 'C-c C-v' now - asks for user resolution directly in emacs. - * ESS[R] ess-roxy: new variable 'ess-roxy-re' for fontification of - cases where the number of leading '#' differs from 'ess-roxy-str'. - * ESS[R] Eldoc was considerably enhanced. It now finds hidden - default S3 methods and displays non-default methods' arguments - after trailing ||. - * ESS[R]: New 'ess-display-demos' command bound to 'C-c C-d o' and - 'C-c C-d C-o' - * ESS: New 'ess-help-web-search' command bound to 'C-c C-d w' and - 'C-c C-d C-w' to facilitate interactive search of web resources. - Implemented for 'R', 'Stata' and 'Julia'. See also - 'ess-help-web-search-command'. - * ESS: ess-pdf-viewer-pref accepts now command line arguments - * ESS[Rnw]: Add knitr support. Customize 'ess-swv-processor' for the - default processor. - * ESS[Rnw]: More thorough renaming of remaining 'noweb-*' to - 'ess-noweb-*'. - * ESS[Rnw] new commands 'ess-eval-chunk-and-step' and - 'ess-eval-chunk' bound to 'M-n C-c' and 'M-n C-M-x' to mirror - standard ess commands in C-c map. - * ESS[R] Auto-completion: new variable 'ess-ac-R-argument-suffix' to - customize the insertion of trailing "=". Defaults to " = ". - * ESS[Julia]: Added index, apropos and web-search to julia. - * ESS help: More evaluation commands were added to ess-help mode - ('C-c C-c', 'C-M-x' etc) - - Bug Fixes in 12.09-1: - * iESShelp: Multiple help pages with the same name are properly - handled on 'C-c C-v' - * iESSremote: Evaluation with ESS remote no longer freezes emacs. - * iESS: 'comint-previous-prompt' 'C-c C-p' no longer stops on - secondary prompt "+". - * iESS[R], iESS(Sqpe) [S] on Windows: The 'options("editor")' is now - initialized to 'emacsclient' instead of the previous 'gnuclient'. - The user may need to add the line '(server-start)' to the emacs - initialization file. 'emacsclient' has been included with emacs - since GNU Emacs 22.1. - * ESS[Rnw] Fixed "connection to R" bug (in 12.09 only). - * ESS[Rnw] Explicit 'ess-swv-stangle' and 'ess-swv-sweave' functions. - * ESS[Rnw] Fixed completion and smart underscore problems cause by - unmatched "\"' - * ESS[R] is more careful with the 'R' code injection. It now happens - only once at the start of the session. - * ESS[R]: Fixed auto-scrolling the comint buffer on evaluation. - * ESS[Julia]: Solve several indentation and word navigation problems. - * ESS[Julia]: Help system works again. - - Changes/New Features in 12.09: - - * Due to XEmacs lacking some features that ESS requires, ESS support - of XEmacs ends with ESS 12.04-4. This decision will be re-visited - in the future as XEmacs continues to sync with GNU Emacs. - - * ESS[R]: On Windows, there is now a new customizable variable - (currently called 'ess-directory-containing-R') to tell ESS where - to look for the 'Rterm.exe' executables. The name of the variable - and the values it can take are both in beta and subject to change. - Prior to this variable, ESS searched only in the default - installation directory. Setting this variable now tells ESS how to - find 'Rterm.exe' executables when they are installed somewhere - else. - - * ESS[julia]: _new_ mode for editing julia code ('*.jl'). Start with - 'M-x julia'. - - Full interaction interface, imenu and basic error referencing are - available. - - * ESS[R] noweb: 'noweb-mode' and 'noweb-font-lock-mode' have been - renamed to 'ess-noweb-mode' and 'ess-noweb-font-lock-mode' to avoid - conflicts with the "real" 'noweb-mode'. - - * ESS[R] noweb: The long standing font-lock bug has been solved in - 'ess-noweb' interface. - - * ESS: Basic evaluation keys are now bound to 'ess-eval-region-*-' - functions: - - - 'C-M-x' is bound to 'ess-eval-region-or-function-or-paragraph' - - 'C-c C-c' is bound to - 'ess-eval-region-or-function-or-paragraph-and-step' - - 'C-RET' is bound to 'ess-eval-region-or-line-and-step' - - Each of these functions first evaluates the region whenever the - region is active. - - * ESS: 'C-M-a'/'C-M-e' now step to beginning/end of paragraph if no - function has been detected. - - * ESS: 'ess-eval-*-and-step' family of functions are now smarter, and - don't step to end of buffer or end of chunk code ('@') when at the - end of the code. - - * ESS: 'ess-handy-commands' function is bound to 'C-c h' - - * ESS: ESS is now _blinking_ the evaluated region. Set - 'ess-blink-region' to nil to deactivate; 'ess-blink-delay' gives - the duration of the blink. Evaluated region is "blinked" in - 'highlight' face. - - * ESS[R-help] New key 'a' for "apropos()" in help buffers. Also - available through 'C-c h'. - - * ESS[R-help] All R commands of type foo?bar and foo??bar are - recognized and redirected into appropriate *ESS-help* buffers. - - * ESS[R]: New customization interface for _font-lock_. - - ESS font-lock operates with predefined keywords. Default keywords - are listed in 'ess-R-font-lock-keywords' and - 'inferior-R-font-lock-keywords', which see. The user can easily - customize those by adding new keywords. These variables can also - be interactively accessed and saved through 'ESS/Font-lock' - submenu. - - Several new fontification keywords have been added. Most notably - the keywords for highlighting of function calls, numbers and - operators. - - * ESS[R]: auto-complete is now activated by default whenever - auto-complete package is detected. Set 'ess-use-auto-complete' to - nil to deactivate. - * ESS[R]: R AC sources are no longer auto-starting at 0 characters - but at the default 'ac-auto-start' characters. - * ESS no longer redefines default ac-sources, but only appends - 'ac-source-filename' to it. - * ESS: 'ac-source-R' now concatenates " = " to function arguments. - - * ESS: Menus for ESS and iESS have been reorganized and enriched with - _Tracebug_ and _Developer_ submenus. - - * ESS[R]: 'ess-developer' and 'ess-tracebug' commands are available - by default in 'ess-dev-map' which is bound to 'C-c d' in ESS and - iESS maps. - - * ESS[R]: 'eldoc' truncates long lines whenever - 'eldoc-echo-area-use-multiline-p' is non-nil (the default). Set - this variable to t if you insist on multiline eldoc. See also - 'ess-eldoc-abbreviation-style'. - - * ESS[R]: completion code pre-caches arguments of heavy generics such - as 'plot' and 'print' to eliminated the undesirable delay on first - request. - - * iESS: Prompts in inferior buffers are now highlighted uniformly - with 'comint-highlight-prompt' face. - - * ESS[R]: R process no longer wait for the completion of input in - inferior buffer. Thus, long running commands like 'Sys.sleep(5)' - no longer stall emacs. - - * ESS: [R, S, Stata, Julia] have specialized 'ess-X-post-run-hook's, - which are run at the end of subprocess initialization. - - * ESS[Stata]: All interactive evaluation commands work as expected. - On-line comments are removed before the evaluation and multiline - comments are skipped on 'C-c C-c' and other interactive commands. - - * ESS no longer auto-connects to a subprocess with a different - dialect than the current buffer's one. - - * ESS: 'ess-arg-function-offset-new-line' is now a list for all the - ESS indentation styles, which results in the following indentation - after an open "(": - - a <- some.function(other.function( - arg1, - arg2) - - * ESS[SAS]: Improved MS RTF support for GNU Emacs; try - 'ess-sas-rtf-portrait' and 'ess-sas-rtf-landscape'. - - Changes/Bug Fixes in 12.04-3: - * ESS: basic support for package.el compatibility - * ESS[R]: correct indentation of & and | continuation lines - * 'M-x ess-version' shows the svn revision even after 'make install' - * ESS[SAS]: improved XEmacs support - * iESS[R]: better finding of previous prompt - * ESS[Stata]: adjusted prompt for mata mode - * ESS[R]: resolved name clashes with cl.el - * ESS[R]: removed dependence on obsolete package assoc - * New 'make' target 'lisp', to build the lisp-only part, i.e., not - building the docs. - - Changes/New Features in 12.04-1: - * iESS[Stata]: New interactive help invocation. - * iESS[Stata]: New custom variable 'inferior-STA-start-file'. - * iESS[Stata]: 'inferior-STA-program-name' is now "stata" and can be - customized. - * ESS[Stata] New sections in stata help files Syntax('s-S'), - Remarks('r'), Title('t'). - - Bug Fixes in 12.04-1: - * ESS[R]: Better 'ess-tracebug' error handling. - * ESS[R]: Corrected 'ess-eldoc' help string filtering and improved - argument caching. - * ESS[R]: Indentation of non-block if/else/for/while lines fixed. - * 'M-x ess-version' should work better. - * ESS: Filename completion now again works inside strings. - * iESS[Stata]: Fixed prompt detection issue. - * ESS[Rd]: R is autostarted also from here, when needed. - - Changes/New Features in 12.04: - * ESS: Reverting new behavior of 12.03, 'TAB' in 'ess-mode' no longer - completes by default. If you want smart 'TAB' completion in R and - S scripts, similarly to iESS behavior, set the variable - 'ess-tab-complete-in-script' to 't'. Also see - 'ess-first-tab-never-complete' for how to customize where first - 'TAB' is allowed to complete. - * ESS: completion is consistently bound to 'M-TAB' (aka 'M-C-i') in - both Emacs23 and Emacs24. - * ESS: The variable 'ess-arg-function-offset-new-line' introduced in - ESS(12.03) now accepts a list with the first element a number to - indicate that the offset should be computed from the indent of the - previous line. For example setting it to '(2) results in: - - a <- some.function( - arg1, - arg2) - - Changes/New Features in 12.03: - * ESS indentation: new offset variable - 'ess-arg-function-offset-new-line' controlling for the indentation - of lines immediately following open '('. This is useful to shift - backwards function arguments after a long function call expression: - - a <- some.function( - arg1, - arg2) - - instead of the old - - a <- some.function( - arg1, - arg2) - - If '(' is not followed by new line the behavior is unchanged: - - a <- some.function(arg1, - arg2) - - This variable should be set as part of indentation style lists, or - in ess-mode hook. - * ESS[R]: 'C-c .' sets (indentation) style. - * ESS: In ESS buffers 'yank'('C-y') command accepts double argument - 'C-u C-u' to paste commands only. It deletes any lines not - beginning with a prompt, and then removes the prompt from those - lines that remain. Useful to paste code from emails, - documentation, inferior ESS buffers or transcript files. - * Documentation: ESS user manual has been rearranged and completed - with several new chapters and sections to reflect newly added - features ("Completion", "Developing with ESS", "ESS tracebug", "ESS - developer", "ESS ElDoc", "IDO Completion" and "Evaluating Code") - * RefCard: Reference card was updated to include new features. - * Eldoc: Eldoc was rewritten and is activated by default. See - 'ess-use-eldoc', 'ess-eldoc-show-on-symbol', - 'ess-eldoc-abbreviation-style' variables for how to change the - default behavior. _Note:_ 'skeleton-pair-insert-maybe' prohibits - eldoc display, on '(' insertion. - * ESS[R]: Eldoc shows arguments of a generic function whenever found. - * ESS: 'TAB' in 'ess-mode' now indents and completes, if there is - nothing to indent. Set 'ess-first-tab-never-completes-p' to 't' to - make 'TAB' never complete on first invocation. Completion - mechanism is similar to the completion in the 'inferior-ess-mode' - - a filename expansion is tried, if not found ESS completes the - symbol by querying the process. - * ESS for emacs version 24 or higher: ESS is fully compatible with - the emacs 24 completion scheme, i.e. all the completion is done by - 'completion-at-point'. Also in accordance with emacs conventions, - ESS doesn't bind 'M-TAB' for emacs 24 or higher. 'M-TAB' calls the - default 'complete-symbol'. - - * ESS[R]: Out of the box integration with 'Auto Completion' mode - http://cx4a.org/software/auto-complete - (http://cx4a.org/software/auto-complete) . Three AC sources - 'ac-source-R-args', 'ac-source-R-objects' and 'ac-source-R' are - provided. The last one combines the previous two and makes them - play nicely together. Set 'ess-use-auto-complete' to 't' to start - using it. Refer to documentation string of 'ac-use-auto-complete' - for further information. - * ESS[R]: New unified and fast argument completion system, comprised - of 'ess-funname.start', 'ess-function-arguments', - 'ess-get-object-at-point'. Eldoc and auto-completion integration - are using this system. - * ESS: 'ess-switch-to-end-of-ESS'('C-c C-z'), and - 'ess-switch-to-ESS'('C-c C-y'): Automatically start the process - whenever needed. - * ESS[R]: 'roxy' knows about previewing text version of the - documentation. Bound to 'C-c C-e t'. - * ESS[R]: Solved the "nil filename" bug in roxygen support. - * ESS[R]: 'ess-tracebug' is now part of ESS: - - New Features: - - - Source injection: Tracebug now can inject source references on - the fly during code evaluation, i.e. you don't have to source - your file, but just evaluate your code in normal fashion. - Variable 'ess-tracebug-inject-source-p' controls this behavior - - if t, always inject source reference, if ''function', inject - only for functions (this is the default), if 'nil', never - inject. - - During the source injection the value of 'ess-eval-visibly' is - ignored. - - Org-mode support: Visual debugger is now aware of the - temporary org source editing buffer ('C-c '') and jumps - through this buffers if still alive, or in original org buffer - otherwise. - - New keys in watch mode: '?' and 'd' - - Two new hooks: ess-tracebug-enter-hook and - ess-tracebug-exit-hook - - * ESS[R]: New package 'ess-developer' to evaluate 'R' code directly - in the package environment and namespace. It can be toggled on and - off with 'C-c d t'. When 'ess-developer' is on all ESS evaluation - commands are redefined to evaluate code in appropriate - environments. Add package names to the list of your development - packages with 'C-d a', and remove with 'C-d r'. Source the current - file with 'C-d s'.Evaluation function which depend on - '`ess-eval-region'' ask for the package to source the code into, - 'ess-eval-function' and alternatives search for the function name - in the development packages' environment and namespace and insert - the definition accordingly. See the documentation section - "Developing with ESS/ESS developer" for more details. - - * ESS[R] help system: - - New Features: - - - 'q' quits window instead of calling - 'ess-switch-to-end-of-ESS'. This is consistent with emacs - behavior help and other special buffers (_breaking change_). - - 'k' kills window without asking for the name (pointed by Sam - Steingold) - - Help map inherits from 'special-mode-map' as sugested by Sam - Steingold. - - Package index: new function 'ess-display-index' bound to 'i' - in help mode map. - - Package vignettes: new function 'ess-display-vignettes' bound - to 'v' in help mode map. - - Display help in HTML browser: new function - 'ess-display-help-in-browser' bound to 'w' in help mode map. - It depends on 'R''s 'browser' option. - - New custom variable 'ess-help-pop-to-buffer': if non-nil ESS - help buffers are given focus on display. The default is 't' - (_breaking change_). - - New menu entries for the above functions. - - Bogus help buffers are no longer generated by default, i.e. - buffers of the form "No documentation for 'foo' in specified - packages and libraries: you could try '??foo' ". - 'ess-help-kill-bogus-buffers' now defaults to 't'. Beware, - there may be instances where the default is unsatisfactory - such as debugging and/or during R development. Thanks to Ross - Boylan for making the suggestion, Sam Steingold for reminding - us of this variable and Martin Maechler for the warning. - * ESS now uses 'IDO' completing read functionality for all the - interactive requests. It uses ido completion mechanism whenever - available, and falls back on classical completing-read otherwise. - You can set 'ess-use-ido' to nil if you don't want the IDO - completion. See the documentation string of 'ess-use-ido' for more - information about 'IDO' and ESS configuration. - - * ESS[S]: "','" is bound to ess-smart-comma: If comma is invoked at - the process marker of an ESS inferior buffer, request and execute a - command from '`ess-handy-commands'' list. If - 'ess-R-smart-operators' is t '`ess-smart-comma' also inserts " " - after comma. - * ESS[S], notably 'R': Variable '`ess-handy-commands'' stores an - alist of useful commands which are called by 'ess-smart-comma' in - the inferior buffer. - - Currently containing: - - change-directory - 'ess-change-directory' - help-index - 'ess-display-index' - help-object - 'ess-display-help-on-object' - vignettes - 'ess-display-vignettes' - objects[ls] - 'ess-execute-objects' - search - 'ess-execute-search' - set-width - 'ess-execute-screen-options' - install.packages - 'ess-install.packages' - library - 'ess-library' - setRepos - 'ess-setRepositories' - sos - 'ess-sos' - - Handy commands: 'ess-library', 'ess-install.packages', etc - ask - for item with completion and execute the correspond command. - 'ess-sos' is a interface to 'findFn' function in package 'sos'. If - package 'sos' is not found, ask user for interactive install. - - * ESS: New dynamic mode line indicator: Process status is - automatically reflected in all mode-lines of associated with the - process buffers. Particularly useful for displaying debug status - of 'ess-tracebug' and developer status of 'ess-developer' in all - associated buffers. - - * ESS: New 'ess-completing-read' mechanism: ESS uses 'ido' - completions whenever possible. Variable 'ess-use-ido' controls - whether to use ido completion or not. Active by default. - - * ESS now supports comint fields for output and input detection. - This feature is not used by default, but might be useful in the - future. - - * ESS[S]: New custom variable 'inferior-ess-S-prompt' to customize - prompt detection regular expression in the inferior ESS buffers. - You can customize this variable to enhance comint navigation - ('comint-previous-prompt' and 'comint-next-prompt') the inferior - buffers. - - * ESS[R]: Internal 'R' completion retrieval - ('ess-R-complete-object-name') was rewritten and is faster now. - - * ESS is using process plist to store process specific variables, as - opposed to buffer local variables as it was using before. The use - of buffer local variables to store process variables is - discouraged. - - * ESS: new functions to manipulate process plists: 'ess-process-get' - and 'ess-process-set'. - - * ESS: Internal process waiting mechanism was completely rewritten. - ESS no more relies on prompt regular expressions for the prompt - detection. The only requirement on the primary process prompt is - to end in '> '. This could be overwritten by setting - 'inferor-ess-primary-prompt'. - - * ESS[S], notably 'R': Saved command history: ESS-HISTORY-FILE now - accepts 't' (default), 'nil', or a file name. By setting it to - 'nil' no command line history is saved anymore. - ESS-HISTORY-DIRECTORY now allows to have the history all saved in - one "central" file. - * ESS[R]: more Roxygen improvements. - * ESS[R]: 'C-c .' to set (indentation) style. - - * ESS[R]: Functions with non-standard names (for example - 'aaa-bbb:cc') are properly handled by font-lock and evaluation - routines. - * ESS[R]:Several regexp bugs (described in etc/R-ESS-bugs.el) were - fixed in 'ess-get-words-from-vector' and 'ess-command'. - - Changes/New Features in 5.14: - * ESS[BUGS/JAGS]: Batch BUGS is back! For recent OpenBUGS versions, - 3.0.8+, a batch BUGS script is once again available, but for Linux - only. Therefore, since it seems that BUGS and JAGS must co-exist - (rather than a transition from BUGS to JAGS), .bug files are now in - ESS[BUGS] mode and .jag files are in ESS[JAGS] mode. ESS[BUGS] now - works like ESS[JAGS] rather than the original mode ESS[BUGS] mode - which was difficult to maintain. Although, ESS[BUGS] appears to - work, there still may be some features missing as well as bugs. - - * ESS[R]: New customizable variable 'ess-swv-plug-into-AUCTeX-p' - Commands to Sweave current file and LaTeX the result are now - available to AUCTeX users, if this variable is set to 't'. - - * ESS[S]: 'C-c C-c' ('ess-eval-function-or-paragraph-and-step') is - now skipping over comments as the other paragraph functions do. It - (and similar functions) should no longer wrongly find 'function()' - beginnings inside comments or strings. - - * ESS[SAS]: improved by better support for GNU Emacs - - Changes/New Features in 5.13: - * ESS[R]: On Windows, for R 2.12.0 and later, the Rterm executables - (in subdirectories i386 / x64) now are found as well as for earlier - R versions. - * ESS[S+]: on Windows, both 32- and 64-bit versions of S+ ("S-PLUS") - are found now and made available on the menu. - * ESS[R]: When prompting for a starting directory, the R version is - (always?) correct now. - * ESS[R]: on non-Windows platforms, the 'use-dialog-box' variable is - no longer temporarily changed (to 'nil' for R-x.y.z version - functions and to 't' for 'R' itself), but rather the user - customization is obeyed. - * ESS[R]: more Roxygen improvements. - * 'Rd-preview-help' now generates preview buffers with navigation - facilities the same as regular help buffers. - * ESS: New functions and keys C-c [up] / [down] for evaluating the - buffer "from beginning till here". - - Changes/New Features in 5.12: - * ESS[SAS] Font-locking: update of PROCs keywords (up to SAS 9.22); - error/warnings. - * ESS[R]: Roxygen improvements: S4 classes; also optionally keep - spaces when filling arguments - * ESS[Rd]: support new keywords: section-name \subsection plus a - dozen "new" keywords; should match R 2.12.x now. - * 'ess-display-help-on-object' ('C-c C-v') now _caches_ the list of - topics, thus speeding up the improvement feature introduced in 5.9. - - Changes/New Features in 5.11: - * Filename completion within buffers now adds only trailing - characters to complete the filename, rather than expanding to an - absolute file path. This filename completion is bound to the TAB - key. - - * 'M-n P' in Sweave buffers now prompts for the command to run - instead of using 'pdflatex' unconditionally, offering completion - from customizable collection 'ess-swv-pdflatex-commands', the first - of which is taken as default and that defaults to 'texi2pdf'. - * 'M-RET' is now also bound in S language (R and S+) buffers to - 'ess-use-this-dir'. It sends 'setwd(..)' to the S process to set - the working directory to the one of the source file. - - Changes/New Features in 5.10: - * 'M-RET' in *S* buffers is now bound to 'ess-dirs'. This function - will set Emacs's current directory to be the same as the *S* - process. This is useful if you use 'setwd()' within a *S* process. - - Changes/New Features in 5.9: - * Toolbar: The toolbar now has an icon for starting Splus. - * Indentation: New documentation and code has been added to make it - easier to change how ESS indents code. In particular, see - 'ess-default-style', 'ess-own-style-list' and the documention - subsection "Changing indentation styles". - * 'ess-display-help-on-object' ('C-c C-v') now offers completion - candidates for help file aliases, in addition to object names. - * Font locking: is now turned on even without 'window-system' is - 'nil', whenever ESS-FONT-LOCK-MODE is non-nil, i.e., by default. - * ESS script editing: ess-eval-deactivate-mark default is now t, as - suggested by Leo Alekseyev and subsequent "unanimous" ESS-help - discussion. - * ESS[R]: Editing support for "#!" (Rscript / littler) editing, - thanks to Jeffrey Arnold. - * ESS[R]: Now finds all R versions, both 64-bit and 32-bit, on some - 64-bit Windows machines. Please report back to ess-core success or - failure on your 64-bit Windows machine. - * ESS Manual now more visually pleasing; - - * ESS[R]: Roxygen on XEmacs no longer font locks for now (as it - required missing features and hence broke ESS startup, there). - * ESS[R]: Roxygen has a sub-menu on the [ESS] menu. - * ESS[R]: Function 'ess-rutils-htmldocs' in 'ess-rutils.el' offers an - alternative to 'help.start()' for navigating R documentation, using - the 'browse-url' Emacs function. - - Changes/New Features in 5.8: - * ESS[R]: New 'ess-rutils.el' with utilities for listing, loading, - installing, and updating packages, as well as object manipulation - (listing, viewing, and deleting). It also provides an alternative - to 'RSiteSearch()' that uses the 'browse-url' function, so results - can be viewed in an Emacs web browser. - * ESS[R]: much more extensive Roxygen interface, via ess-roxy.el from - Henning Redestig. Ess-roxy supports filling of roxygen fields, - generation and updating roxygen templates, completion of roxygen - tags, basic navigation (marking and moving between entries), - folding using hs-minor-mode and preview of the Rd file. - * Emacs lisp files have got better names (partly, for now). - - Changes/New Features in 5.7: - * ESS[R]: loading a source file ('C-c C-l') now works in Windows, - similarly to other platforms; (further; it had accidentally been - broken in ESS 5.6 on all platforms) - - Changes/New Features in 5.6: - * ESS[R]: help() calls have to differ from old default, with newer - versions of R; currently via .help.ESS <- function(...) hack. - - Changes/New Features in 5.4: - * ESS[SAS]: The long overdue change from 'make-regexp' to - 'regexp-opt' for font-locking is complete. The new 'regexp-opt' is - now the default since it is better than the old code in many ways - (and especially more maintainable). However, there are certainly - some special cases missed (bug reports and patches welcome!). - Setting 'ess-sas-run-regexp-opt' to 'nil' will result in the old - code being used. - * ESS[BUGS] and ESS[JAGS]: typing '=' now results in '<-'. - * ESS[R] function arguments "show" '(ess-r-args-show)' now uses the - new '(tooltip-show-at-point)' contributed by Erik Iverson. - * Toolbar icons now also work in (beta) Emacs 23. - * ESS[S]: New function 'ess-change-directory' for setting both emacs' - current directory and the directory of an *R* or *S* buffer. - * ESS[S] when transient-mark-mode is true, the mark is now kept, - rather than deactivated, thanks to a patch from David Reitter. - - Changes/New Features in 5.3.11: - * ESS[SAS]: work around bug in Emacs 22.2 & 22.3 which fails to set - case-fold fontification automatically. - * Rd mode: support new keyword 'Rdversion' - * ESS[R]: now again works with Emacs 21.x - - Changes/New Features in 5.3.10: - * Fixed noweb-mode bug accidentally introduced into 5.3.9 - * In noweb-mode, e.g., Rnw-mode, electric "<" also inserts closing - "@". Further, the code chunk boundaries are better kept - up-to-date, such that code[R] <-> text[LaTeX] minor mode switching - should happen more reliably. - * In noweb-mode, fix a buglet in rare [Enter] or [Tab] behavior; - further, by default disable the former '[[' .. ']]' - code-protection-when-filling behavior which has been found to be - buggy. - - Changes/New Features in 5.3.9: - * ESS[SAS]: evince PDF viewer now supported as well; search order: - evince, Xpdf, Adobe/Acrobat Reader - * ESS[R]: added support for Roxygen, potentially to be extended. - * ESS[S] (and R): inferior ('*R*') and transcript modes no longer - fontify language keywords (such as 'for', 'in', etc). - * iESS[Stata]: Customize the 'ess-sta-delimiter-friendly' setting to - 't' to convert embedded semi-colons to newlines for Stata - processing. - * Sweave fix for embedded blanks in PDF reader and PDF files - * Several fixes for Major Mode Convention violations in 'ess-mode' - and 'noweb-mode'. - * ESS[JAGS]: 'M-x comment-region' now available! - * ESS[S] The 'ess-swv-*' commands (and keybindings) are now in a - submenu of the "Noweb" menu, when editing Sweave files. - - Changes/New Features in 5.3.8: - * ESS[JAGS]: more separation from ESS[BUGS] (as much as is currently - planned); now 'C-c C-c' on an empty '.jmd' creates a template as it - should; symbolic links are created for CODA output so BOA is happy: - from 'index.txt' to '.ind' and 'chain#.txt' to '#.out' - * ESS[SAS]: buffer-local 'ess-sas-submit-command' and - 'ess-sas-submit-command-options' now recognized by - 'ess-sas-submit-region' - * ESS[S]: When trying to evaluate code in an S language buffer and - there is no associated process, now start R automatically instead - of signalling an error. Also, restart R if there is an associated - process which is not running. However, do not start R just via the - "electric" '(' ('ess-r-args-auto-show'). - * ESS[S]: For (one-line) functions withOUT '{ .. }' bodys, the end - of function is now correctly found more often. This notably - improves 'C-c C-c' ('ess-eval-function-or-paragraph-and-step'). - * ESS[JAGS]: cleanup/re-organization of elisp code; symbolic links - for CODA output are now only created by the new JAGS 'system' - command in version 1.0.3; specify whether this command is available - via 'ess-jags-system'; if not present, then no links are created so - that the '*shell*' buffer does not become unresponsive during the - batch run - - Changes/New Features in 5.3.7: - * ESS: 'ess-default-style' now *is* customizable, i.e., changing its - value in '~/.emacs' now does have the desired effect. - * ESS: 'ess-font-lock-mode' is a new variable (default: t) which - controls whether font-locking is enabled in ESS buffers. - * ESS[R]: for XEmacs on Windows; another tweak to find R versions - * ESS[SAS]: font-locking updated for ODS and SAS Bayesian Procedures; - a more consistent handling of SAS options by - 'ess-sas-submit-command-options' which is buffer-local; portable - snooze for MS Windows via customize-able 'ess-sleep-for' (floats - welcome); Xpdf now supported as a PDF viewer - * ESS[Rnw]: now also works with "emacs -nw" and Emacs 22. - * ESS[JAGS]: now requires JAGS 1.0 (see the new ESS for JAGS help - section for more information): both need work; suggestions welcome - * ESS[R]: [TAB] completion now uses the R-internal completion - mechanism (for R >= 2.5.0). - * ESS[R] ([S]): interpretation of "_" as assignment has been removed - in 'ess-continued-statement-p' for R and S. - * several internal code cleanups. - * ESS[R]: An experimental version of a new command 'Rgui' on MS - Windows to send lines directly from emacs to 'Rgui' is available in - file 'lisp/essd-rgui.el'. Preliminary documentation is in file - 'doc/rgui-doc.txt'. - - Changes/New Features in 5.3.6: - * ESS: for XEmacs, using "gnuclient" (without a "-q") works for - things like fix() after M-x gnuserv-start has been done. - * ESS[R]: M-x R-newest should now work in more situations on MS - Windows, e.g., when R has been installed in a non-default - "ProgramFiles" directory tree. In these cases, there's no need to - specify the name (and full path) of the R program anymore. - * ESS[R]: For XEmacs, startup (with new tooltip code) works again. - - Changes/New Features in 5.3.5: - * ESS[R] a new defun is available, 'M-x R-newest', which will start - the newest version of R that it can find on your system. - * ESS[R] add Sven Hartenstein's "R function arguments tips" - functionality, via new file '../lisp/essd-r-args.el'. Note that - this includes an "electric "("" behavior inside 'R-mode' which is - _active by default_ and can be customized via - 'ess-r-args-electric-paren'; i.e., use '(setq - ess-r-args-electric-paren nil)' to turn it off. Further, - 'ess-r-args-show-as' allows to switch to the "tooltip" mode. - * ESS: functions 'ess-get-pdf-viewer' and *-ps-viewer; built on new - customizable variables 'ess-pdf-viewer-pref' and - 'ess-ps-viewer-pref'; currently used in 'ess-swv-PDF' and '*-PS'. - * ESS[R] Improved 'ess-swv-PDF' to run pdf viewer only if pdflatex - was ok - * ESS[R] Improved 'ess-swv-weave' to start R automatically if none is - running. - * ESS: Do no longer ask _which_ ESS process to use if there is only - one. - - Changes/New Features in 5.3.4: - * ESS[R] now better work with options(error=recover); and the new - default of CHM help files on windows. - * ESS[R] some more cleanup in the "sweave" functions - * miscellaneous fixes - - Changes/New Features in 5.3.3: - * ESS[S] fix buglet (5.3.2 only) which left command prompt in - "execute buffer" and hence help files. - * new customizable variable 'ess-display-buffer-reuse-frames' set to - true (which changes default behavior) such that execution or help - *frames* are reused. - - Changes/New Features in 5.3.2: - * Classic BUGS now supported by '(require 'essd-bugs)' with ESS[BUGS] - and JAGS by '(require 'essd-jags)' with ESS[JAGS]. But, only one - of them can be used at a time since they don't play nice together. - Also, 'C-c C-c' is now bound to the function 'ess-bugs-next-action' - ('F12' has been retired). And finally, note that 'essl-bug.el' is - deprecated and the replacement is 'essl-bugs.el'. - * ESS[R] Improved some of the "Sweave-make" functions (yet scarcely - documented) in 'ess-swv.el'. - * ESS[S] No longer mess with .Last.value (nor in other "languages"). - - Changes/New Features in 5.3.1: - * See the docs for 2 ways to install ESS for XEmacs - 1. by uncommenting the XEmacs part of Section 1 of 'Makeconf' and - performing 'make install' - 2. by unpacking either 'ess-5.3.1.tgz' or 'ess-5.3.1.zip' into - 'PREFIX/lib/xemacs/site-packages' on unix or - 'PREFIX\XEmacs\site-packages' on windows - * ESS[R]: fixed bugs so that Rterm.exe can be found by XEmacs - * ESS[S]: 'ess-toggle-S-assign-key' is slightly changed; in - particular, the default 'ess-assign-key' is now 'C-x ='. - * ESS[R]: 'M-x R-site-search' is a new (slightly experimental) - utility similar to R's 'RSiteSearch(..)' but with the advantage of - using Emacs' preferred browser, see 'browse-url-browser-function' - - Changes/New Features in 5.3.0: - * ESS[BUGS]: sanely re-format statistical output, '.bog', from - scientific notation to numbers rounded with 4 decimal places with - 'M-x ess-bugs-sci-round-to-4-dp'. - * The keys for navigating among section headings in help buffers - worked, but only for one language per session; they should now work - for multiple languages. (They were also broken on Windows - machines.) - * ESS[S] long standing buglets in the internal logic for loading lisp - code on Windows. Particularly fixed behavior in help mode with - S-plus GUI. - * New variable, 'ess-use-inferior-program-name-in-buffer-name', which - enables using the executable name instead of the dialect name for - R. Feature request. - * ESS[S] 'ess-execute-screen-options' now also works correctly when - there is more than one window *side-by-side* in the same frame and - runs in the correct buffer also when there is more than one S - buffer. - * iESS[S] new functions 'ess-eval-paragraph-and-step' and - 'ess-eval-function-or-paragraph-and-step' are bound to keys 'C-c - C-p' and 'C-c C-c' respectively and to the menu in ESS-mode; also - bound in the help mode (for evaluating examples). - * ESS[S] new function 'ess-toggle-S-assign-key' allows to assign the - " <- " insertion to an arbitrary key. - - Changes/New Features in 5.2.12: - * ESS[SAS]: 'M-;' fixed, but the XEmacs function 'comment-dwim' may - be broken, if so, use 'M-x comment-region' and 'M-x - uncomment-region' instead; only valid PROCs are fontified which is - very helpful finding syntax errors (currently supported: BASE, ETS, - FSP, GRAPH, IML, INSIGHT and STAT); the "feature" where 'F'-keys - take you to an empty buffer when the requested destination is a - file that does not exist has been fixed, now the request results in - a no-op. Further, sas-mode now also works in simple terminals. - * Rterm/Cygwin combination works under Microsoft Windows. - * ESS[R]: internal calls use baseenv() instead of NULL and define - 'baseenv' where needed. - * New experimental support for installing ESS. See the file - 'lisp/ess-install.el'. - - Changes/New Features in 5.2.11: - * ESS Info entry and 'dir' handled more effectively for GNU Emacs - users - * ESS[SAS]: temporary files created for batch submission of a region - are now named based on the current file; see 'ess-sas-file-root' - for details; all 'lag' and 'dif' functions now fontified correctly - * iESS[SAS]: fixed a few nagging bugs, however, still does not appear - to work at this time; please let us know if you have any ideas. - * ESS[S]: Support for running other versions of Splus has been added - for unix. Two new variables, 'ess-s-versions' and - 'ess-s-versions-list', are used to tell ESS what other versions of - Splus you would like to run. - - Changes/New Features in 5.2.10: - * ESS[R]: ess-r-versions can no longer be customized (since the - customization was not taking effect unless customizations were - loaded before ESS). Its value has been changed so that it will also - find R executables beginning "R-devel" and "R-patched". If you - wish to change this variable, it must be set in your '.emacs' - before ESS is loaded. - * Installation with GNU Make enhanced: unix and unix-like operating - systems will now be able to install ESS for all users in either a - GNU Emacs site-lisp or an XEmacs package configuration by editing - 'lisp/ess-site.el' and 'Makeconf' accordingly, then issuing 'make - install' - * ESS[S]: Filename completion (inside strings) now also works in - XEmacs for R and S-plus. - - Changes/New Features in 5.2.9: - * ESS[R] for Windows: the \ directory character bug with respect to - ess-load-file has been eradicated. - * iESS[SAS]: 'C-c C-r' and 'C-c C-b' once again work as intended and - documented. - * ESS[S]: M-x ess-fix-EQ-assign is a bit more agressive. - * ESS[S]: Imenu now also shows setAs(), etc. - * ESS[R]: R function pattern enhanced with underlying code such that - 'M-C-a' ('ess-beginning-of-function') etc now work for many more - cases, including S4 method definitions. - * iESS[R]: myOwnhelp(1) no longer wrongly triggers help(1). - * ESS[R]: Improved detection of bogus help buffers: valid help - buffers containing with the string "no documentation"(e.g. - contour) were being treated as bogus. - * ESS[R]: In R help buffers, if 'options("help.try.all.packages" = - TRUE)' then '?rlm' will list which packages rlm is defined in. - This help buffer is not bogus, but instead is now relabelled - "*help[R](rlm in packages)*". - * ESS[STA]: add "//" as comment starting character to syntax-table. - - Changes/New Features in 5.2.8: - * iESS: [Tab] completes *file* names "inside string" as in earlier - (<= 5.2.3) ESS versions. - - Changes/New Features in 5.2.7: - * If you use Custom to change the variable ess-toolbar-items, the new - toolbar is used in all subsequent ESS buffers. - * ESS[SAS]: new feature: if ess-sas-log-max >0 and your .log grows to - more than ess-sas-log-max bytes, just the first ess-sas-log-max - bytes are refreshed; this is helpful when your .sas program - generates lots of error messages and gets too big for emacs to - display - * ESS[R/S]: 'M-;' in R/S editing modes will now indent with either - one or two hashes depending on context. - * ESS[R]: David Whiting's Sweave extensions (to 'noweb') are now - available (from ess-swv.el loaded by default). - - Changes/New Features in 5.2.6: - * Removed non-ASCII characters in a few files. - * ESS[R]: now works better when UTF-8 locale is active; in - particular, you get correct directional quotes in R's startup - message for R-devel (unstable development version of R 2.1.0) when - using environment variables LANGUAGE=en@quot LC_ALL=en_US.UTF-8 - * ESS[SAS]: toggling of .log mode improved ('F10'); toggling of .lst - mode now also available ('C-F10'); killing all buffers associated - with .sas program no longer bound to 'C-F10' since its a bit - overzealous. - * S-Plus 7 for Windows is now recognized. - * ESS[S] (incl. R): in auto-fill mode, strings are not wrapped - anymore. - * ESS[S] (incl. R): font-lock now correctly differs between R and S, - e.g., for "_"; both now fontify warning(.) and S does terminate() - additionally. - * Support for 'bell' aka 'beep' aka 'ding' aka 'alarm' in all - inferior modes: When \a is output "to the the console" at the - beginning of a line, the bell is rung. - - Changes/New Features in 5.2.5: - * ESS[R]: 'C-c C-q' or 'Quit S' from the menu now should work (again - and less klunkily) and do not append '-exited' to the buffer name. - Further, the behavior of '(ess-cleanup)', called from ess-quit, now - depends on the new customizable variable - 'ess-S-quit-kill-buffers-p' which defaults to 'nil'. Consequently, - the question _"Delete all buffers associated with ..?"_ will not - be asked anymore by default. - * ESS[SAS] - ess-ebcdic-to-ascii-search-and-replace will now work - with the 'recode' application as well which is available on many - platforms - * ESS[S] (incl. R): Name completion for slots of S4 objects now - works! - - Changes/New Features in 5.2.4: - * The documentation now includes an overview of how to use the emacs - TAGS facility for S functions. (The distribution also used to - contain a directory 'etc/other/Tags' where a ~1990 version of - 'etags.c' was distributed; this is no longer relevant and so has - been deleted.) - * ESS[SAS] - When you are working with EBCDIC files on an ASCII - platform, .log NOTEs may display as gibberish since the EBCDIC - characters are not converted to ASCII prior to their display. So, - the function ess-ebcdic-to-ascii-search-and-replace is provided for - convenience and is bound to 'C-F11'. This function requires the - 'dd' command (only available on unix or unix-like platforms). - * ESS: Completion of object names is now always done dynamically - rather than allowing the option of using a pre-computed database - (by 'ess-create-object-name-db') since modern computers seem fast - enough for dynamic completion. (We expect few users, if any, have - been using the pre-computed database method.) - * ESS: object completion in iESS buffers running on Windows was very - slow (for GNU Emacs, but not XEmacs) and has now been fixed. - Further, it was more or less broken for all versions of S-plus 6.x, - and has been fixed to work everywhere but with the Windows' GUI of - S-plus. The list of objects now shows unique names also when an - object appears more than once in the search path. - * ESS[R]: Completion of object names now also includes those starting - with ".". - - Changes/New Features in 5.2.3: - * ESS: When new inferior ESS processes are created, by default they - will replace the current buffer (this restores behavior from pre - 5.2.0). If you wish new ESS processes to start in another window - of the current frame, set inferior-ess-same-window to nil. - * New variables inferior-Splus-args and inferior-R-args provide a way - to pass command line arguments to starting S and R processes. - - Changes/New Features in 5.2.2: - * bug-fixes for 5.2.1 (require 'executable), html docs, etc. - * ess-lisp-directory/../doc/info added to Info-directory-list if - ess-info not found by info - * ESS[R]: If you have other versions of R on your exec-path, such as - "R-1.8.1" with Unix or "rw1081" with Windows, ESS will find them - and create appropriate functions, such as 'M-x R-1.8.1' or 'M-x - rw1081', for calling them. By default only Unix programs beginning - "R-1" and "R-2" and Windows programs parallel to the version of R - in your exec-path will be found, but see ess-r-versions and - ess-rterm-versions for ways to find other versions of R. - * ESS[R]: Other versions of R, such as "R-1.8.1" on Unix and "rw1081" - on Windows, are added to the "ESS / Start Process / Other" menu. - * ESS[S]: If you have other versions of S-Plus on your Windows - computer, such as S-Plus 6.1 or S-Plus 4.5, ESS will find them and - create appropriate functions, such as 'M-x splus61', for calling - the console version (Sqpe) inside an emacs buffer. By default only - programs installed in the default location will be found, but see - ess-SHOME-versions for ways to find other versions of S-Plus. - * ESS[S]: Other versions of Sqpe on Windows, such as "splus61", are - added to the "ESS / Start Process / Other" menu. - * ESS[R]: (bug fix) ess-quit (bound to 'C-c C-q') should now quit the - inferior R process, when issued from either the inferior buffer, or - from a .R buffer. - - Changes/New Features in 5.2.1: - * ESS[S] (R and S-plus): now have toolbar support with icons to - evaluate code in the inferior process or to switch there. This - code is experimental and likely to change as XEmacs/Emacs issues - get resolved. The toolbar should be enabled if your Emacs displays - images, but can be disabled with the variable ess-use-toolbar. - Thanks to David Smith from Insightful for the S-plus logo. - * ESS[SAS]: ess-sas-graph-view ('F12') enhanced; you can specify - external file viewers for each graphics file type via the alist - ess-sas-graph-view-viewer-alist; also .jpg/.gif are now handled by - image-mode on XEmacs, if available, otherwise by graphics - primitives as before - - Changes/New Features in 5.2.0: - * ESS[BUGS]: new info documentation! now supports interactive - processing thanks to Aki Vehtari (mailto:Aki.Vehtari@hut.fi); new - architecture-independent unix support as well as support for BUGS - v. 0.5 - * ESS[SAS]: convert .log to .sas with ess-sas-transcript; info - documentation improved; Local Variable bug fixes; SAS/IML - statements/functions now highlighted; files edited remotely by - ange-ftp/EFS/tramp are recognized and pressing SUBMIT opens a - buffer on the remote host via the local variable - ess-sas-shell-buffer-remote-init which defaults to "ssh"; changed - the definition of the variable ess-sas-edit-keys-toggle to boolean - rather than 0/1; added the function ess-electric-run-semicolon - which automatically reverse indents lines containing only "run;"; - 'C-F1' creates MS RTF portrait from the current buffer; 'C-F2' - creates MS RTF landscape from the current buffer; 'C-F9' opens a - SAS DATASET with PROC INSIGHT rather than PROC FSVIEW; "inferior" - aliases for SAS batch: 'C-c C-r' for submit region, 'C-c C-b' for - submit buffer, 'C-c C-x' for goto .log; 'C-c C-y' for goto .lst - * ESS[S]: Pressing underscore ("_") once inserts " <- " (as before); - pressing underscore twice inserts a literal underscore. To stop - this smart behaviour, add "(ess-toggle-underscore nil)" to your - .emacs after ess-site has been loaded; - ess-dump-filename-template-proto (new name!) now can be customized - successfully (for S language dialects); Support for Imenu has been - improved; set ess-imenu-use-S to non-nil to get an "Imenu-S" item - on your menubar; ess-help: Now using nice underlines (instead of - 'nuke-* ^H_') - * ESS[R]: After (require 'essa-r), 'M-x ess-r-var' allows to load - numbers from any Emacs buffer into an existing *R* process; 'M-x - ess-rdired' gives a "directory editor" of R objects; fixed - ess-retr-lastvalue-command, i.e. .Last.value bug (thanks to David - Brahm) - * ESS: Support for creating new window frames has been added to ESS. - Inferior ESS processes can be created in dedicated frames by - setting inferior-ess-own-frame to t. ESS help buffers can also - open in new frames; see the documentation for ess-help-own-frame - for details. (Thanks to Kevin Rodgers for contributing code.) - - Changes/New Features in 5.1.24: - * The version number is now correct even inside ESS/Emacs - - Changes/New Features in 5.1.23: - * Minor more Makefile clean up. - - Changes/New Features in 5.1.22: - * Besides info documentation, PDF and HTML documentation are also - provided (instead of built using "make") and available on the web - as well; see ESS web page (https://ess.r-project.org/) and StatLib - (http://lib.stat.cmu.edu/general/ESS/doc) - * Now that info documentation is available, the README.* files are no - longer supported. However, they are still distributed for what - it's worth. - * ESS is now an XEmacs package! See XEmacs Installation HOWTO - (https://www.xemacs.org/Install/index.html) for details - (specifically, items 10-15). - * ESS[SAS]: more user-friendly enhancements for remote SAS batch jobs - with Kermit file transfers (LOG and OUTPUT function key features - now supported). Multiple shells now supported so you can run SAS - on different computers from different buffers by setting the - buffer-local variable ess-sas-shell-buffer to unique buffer names. - * Major re-vamping of Makefile/Makeconf. - - Changes/New Features in 5.1.21: - * ESS[SAS]: info documentation now available!, see ESS->Help for SAS; - 'F12' opens GSASFILE nearest point for viewing either within emacs, - when available, or via an external viewer; more syntax highlighting - keywords; more enhancements for remote SAS batch jobs with Kermit; - new framework for remote SAS interactive jobs, see ess-remote - * ESS[S]: info documentation now available!, see ESS->Help for the S - family - * Makefile: tag now independent of rel; info files made by - doc/Makefile and installed in new info sub-directory - - Changes/New Features in 5.1.20: - * New 'options()$STERM' in the S dialects (S, S-Plus, R). The S - program can determine the environment in which it is currently - running. ESS sets the option to 'iESS' or 'ddeESS' when it starts - an S language process. We recommend other specific values for S - language processes that ESS does not start. - * New 'ess-mouse-me' function, assigned to S-mouse-3 by default. - User may click on a word or region and then choose from the menu to - display the item, or a summary, or a plot, etc. This feature is - still under development. - * GNU Emacs 21.1 is now supported (fixed for S dialects, SAS & BUGS), - (some from Stephen Eglen). - * XEmacs 21.x is now supported (fixed w32-using-nt bug) - * XEmacs on Win (NT) is better supported. - * Workaround for bug in Sqpe+6 (S-PLUS 6 for Win). - * should now work even when imenu is not available (for old - XEmacsen). - * ESS[SAS]: XEmacs-Imenu fix; 'C-TAB' is globalized along with your - function-key definitions, if specified; you can specify your SAS - library definitions outside of autoexec.sas for ess-sas-data-view - with SAS code placed in the variable ess-sas-data-view-libname, - also the dataset name is defaulted to the nearest permanent dataset - to point; Speedbar support now works for permanent datasets, please - ignore first./last.; new font-locking is now the default with more - improvements for font-locking PROCs, macro statements, * ; and %* ; - comments; you can toggle sas-log-mode with 'F10' which will - font-lock your .log (if it isn't too big); submit remote .sas files - accessed with ange-ftp, EFS or Tramp (Kermit is experimental) by - setting ess-sas-submit-method to 'sh; ess-sas-submit-command and - ess-sas-submit-command-options are buffer-local so you can have - local file variable sections at the end of your .sas files to - request different executables or specify special options and the - local file variables are re-read at submit instead of only at file - open so that if you make a change it is picked up immediately; - * ESS[BUGS]: font-lock with 'in' fixed. - * for STATA: font-lock bug fixed. - * for Rd mode: 'C-c C-v' and 'switch-process' in menu. further, 'C-c - C-f' prefix (Rd-font) for inserting or surrounding a word by things - such as \code{.}, \code{\link{.}}, \emph{.} etc. - * new functions (ess-directory-function) and (ess-narrow-to-defun) - ess-directory <-> default-directory logic (Jeff Mincy). - * Re-organized Makefile and fixed a few bugs. - - Changes/New Features in 5.1.19: - * S+6 now supported (Tony Rossini (Unix) and Rich Heiberger - (Windows)) - * New BUGS support through ESS[BUGS] mode (Rodney Sparapani) - Templates assist you in writing .bug and .cmd code (.cmd and .log - are replaced by .bmd and .bog to avoid emacs extension collisions). - Substitution" parameters facilitate "automagic" generation of - data...in" and "init...in" filenames, "const N=" from your data - file and "monitor()/stats()" commands. Activated by pressing - 'F12'. - * Fixes for 'ess-smart-underscore' SAS breakage (Rich Heiberger) - * You can change between PC and Unix, local and global SAS - function-key definitions interactively (Rich Heiberger) - * 'C-Submit' a highlighted region to SAS batch (Rodney Sparapani) - * New and improved SAS syntax highlighting (Rodney Sparapani) To get - the new functionality, set ess-sas-run-make-regexp to nil. Also - available in .log files via 'F10'. - * Open a permanent SAS dataset for viewing via 'F9' (Rodney - Sparapani) You must have the library defined in autoexec.sas for it - to work. - * User-friendly defaults for 'sas-program', - 'ess-sas-batch-pre-command' and 'ess-sas-batch-post-command' as - well Customize support for these and other ESS[SAS] variables - (Rodney Sparapani) - * 'ess-sas-suffix-2' now defaults to .dat via 'F11' (Rodney - Sparapani) - * Emacs/XEmacs, Unix/Windows issues collectively handled in - ess-emcs.el - * defadvice solves problem of missing *ESS* (thanks to Jeff Mincy) - * Improved manual a bit by including things that were only in - 'README'. - - Changes/New Features in 5.1.18: - * New 'ess-smart-underscore' function, now assigned to "_" by - default. Inserts 'ess-S-assign' (customizable " <- "), unless - inside string and comments where plain "_" is used instead. (MM) - * Fixes for longstanding interactive SAS breakage (RMH) - - Changes/New Features in 5.1.17: - * Documentation for Windows Installation (Rich Heiberger) - * removal of ess-vars, finalization of customize support (in the - sense that there is no more use of ess-vars, but that we need to - fix ess-cust) (AJ Rossini) - * Many small (and large) fixes/contributions (MMaechler) - * addition of the "S-equal" variable and provide 'M-x - ess-add-MM-keys' a way to remap "_" to 'ess-S-assign', typically " - <- ", but customizable. (MMaechler) - - Changes/New Features in 5.1.16: - * BUG FIXES - * Better SAS support - - Changes/New Features in 5.1.15: - * BUG FIXES - - Changes/New Features in 5.1.14: - * Yet more fixes to SAS mode, (Rich Heiberger and Rodney Sparapani) - * Customize support (for most Emacsen which support it) (AJRossini) - * ARC and ViSta support out of the box, and fixes for XLispStat - (AJRossini) - - Changes/New Features in 5.1.13: - * Version numbering finally all depending on the ./VERSION file, - thanks to Martin Maechler. - * Yet more fixes to SAS mode, thanks to Rich Heiberger. - - Changes/New Features in 5.1.12: - * Splus 5.1 stabilized, thanks to Martin Maechler, Bill Venables, - Chuck Taylor, and others. - * More fixes to SAS mode, thanks to Rodney Sparapani and Rich - Heiberger. - - Changes/New Features in 5.1.11: - * More fixes to Stata mode, thanks to Brendan Halpin - (mailto:brendan@essex.ac.uk). - * fixed bugs in ESS-elsewhere, thanks to many testers - * README.SPLUS4WIN has DETAILED instructions for S-PLUS 2000, thanks - to David Brahm (mailto:brahm@alum.mit.edu). - * Fixes to SAS mode, thanks to Rodney Sparapani - - Changes/New Features in 5.1.10: - * More fixes to Stata mode - * primitive generic version of ESS-elsewhere - * Small fixes to SAS/Stata. - - Changes/New Features in 5.1.9: - * Stata mode works - * Literate Data Analysis using Noweb works - - Changes/New Features in 5.1.8: - * Bug fixes - * R documentation mode defaults changed - - Changes/New Features in 5.1.2: - * able to use inferior iESS mode to communicate directly with a - running S-Plus 4.x process using the Microsoft DDE protocol. We - use the familiar (from Unix ESS) 'C-c C-n' and related key - sequences to send lines from the S-mode file to the inferior S - process. We continue to edit S input files in ESS[S] mode and - transcripts of previous S sessions in ESS Transcript mode. All - three modes know the S language, syntax, and indentation patterns - and provide the syntactic highlighting that eases the programming - tasks. - - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/readme.info b/elpa/ess-20191014.1343/readme.info deleted file mode 100644 index 589dcea9..00000000 --- a/elpa/ess-20191014.1343/readme.info +++ /dev/null @@ -1,742 +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 -() did the initial port to XEmacs and has been -the primary coder. Martin Maechler () and -Kurt Hornik () have assisted with the S -family and XLispStat. Stephen Eglen () has worked -mostly on R support. Richard M. Heiberger () has -assisted with S/S-PLUS development for Windows. Richard and Rodney A. -Sparapani () 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: . '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]: 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 - -mode-hook and -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. See - *Note (ess)Controlling buffer display:: for more information and - examples. - - * '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. - - * 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. - - 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 , - , or markdown-mode with edit-indirect - . - - * 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" )' 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. *Note (ess)Activating and Loading ESS:: for more - information on this feature. - - * 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 , -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 ; contributions -to the list may be mailed to . 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 Bugs28610 -Node: Mailing Lists29508 -Node: Authors30224 - -End Tag Table diff --git a/elpa/ess-20191014.1343/requires.info b/elpa/ess-20191014.1343/requires.info deleted file mode 100644 index 9bc3ab78..00000000 --- a/elpa/ess-20191014.1343/requires.info +++ /dev/null @@ -1,15 +0,0 @@ -This is requires.info, produced by makeinfo version 6.5 from -requires.texi. - -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. - - -Tag Table: - -End Tag Table diff --git a/elpa/ess-20191014.1343/dir b/elpa/ess-20230419.1527/dir similarity index 82% rename from elpa/ess-20191014.1343/dir rename to elpa/ess-20230419.1527/dir index 3623cfa5..02022aa6 100644 --- a/elpa/ess-20191014.1343/dir +++ b/elpa/ess-20230419.1527/dir @@ -2,10 +2,10 @@ This is the file .../info/dir, which contains the topmost node of the Info hierarchy, called (dir)Top. The first time you invoke Info you start off looking at this node.  -File: dir, Node: Top, This is the top of the INFO tree +File: dir, Node: Top This is the top of the INFO tree This (the Directory node) gives a menu of major topics. - Typing "q" exits, "?" lists all Info commands, "d" returns here, + Typing "q" exits, "H" lists all Info commands, "d" returns here, "h" gives a primer for first-timers, "mEmacs" visits the Emacs manual, etc. diff --git a/elpa/ess-20191014.1343/ess-autoloads.el b/elpa/ess-20230419.1527/ess-autoloads.el similarity index 56% rename from elpa/ess-20191014.1343/ess-autoloads.el rename to elpa/ess-20230419.1527/ess-autoloads.el index 7de8a602..82426df6 100644 --- a/elpa/ess-20191014.1343/ess-autoloads.el +++ b/elpa/ess-20230419.1527/ess-autoloads.el @@ -1,25 +1,25 @@ -;;; ess-autoloads.el --- automatically extracted autoloads +;;; ess-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- ;; ;;; Code: -(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + -;;;### (autoloads nil "ess" "ess.el" (23994 46764 990680 902000)) +;;;### (autoloads nil "ess" "ess.el" (0 0 0 0)) ;;; Generated autoloads from ess.el (autoload 'ess-version "ess" "\ -Return a string with ESS version information. - -\(fn)" t nil) +Return a string with ESS version information." t nil) (autoload 'ess-submit-bug-report "ess" "\ -Submit a bug report to the ESS maintainers. +Submit a bug report to the ESS maintainers." t nil) -\(fn)" t nil) +(register-definition-prefixes "ess" '("ess")) ;;;*** -;;;### (autoloads nil "ess-bugs-d" "ess-bugs-d.el" (23994 46764 917667 -;;;;;; 161000)) +;;;### (autoloads nil "ess-bugs-d" "ess-bugs-d.el" (0 0 0 0)) ;;; Generated autoloads from ess-bugs-d.el (autoload 'ess-bugs-mode "ess-bugs-d" "\ @@ -33,10 +33,18 @@ Major mode for BUGS. (add-to-list 'auto-mode-alist '("\\.[Bb][Mm][Dd]\\'" . ess-bugs-mode)) +(register-definition-prefixes "ess-bugs-d" '("ess-")) + ;;;*** -;;;### (autoloads nil "ess-custom" "ess-custom.el" (23994 46764 953959 -;;;;;; 908000)) +;;;### (autoloads nil "ess-bugs-l" "ess-bugs-l.el" (0 0 0 0)) +;;; Generated autoloads from ess-bugs-l.el + +(register-definition-prefixes "ess-bugs-l" '("ess-bugs-")) + +;;;*** + +;;;### (autoloads nil "ess-custom" "ess-custom.el" (0 0 0 0)) ;;; Generated autoloads from ess-custom.el (defvar ess-lisp-directory (file-name-directory (or load-file-name buffer-file-name)) "\ @@ -44,18 +52,19 @@ Directory containing ess-site.el(c) and other ESS Lisp files.") (custom-autoload 'ess-lisp-directory "ess-custom" t) -(add-to-list 'load-path ess-lisp-directory) +(add-to-list 'load-path (directory-file-name ess-lisp-directory)) -(add-to-list 'load-path (file-name-as-directory (expand-file-name "obsolete" ess-lisp-directory))) +(add-to-list 'load-path (directory-file-name (expand-file-name "obsolete" ess-lisp-directory))) (put 'ess-indent-offset 'safe-local-variable #'numberp) (put 'ess-style 'safe-local-variable #'symbolp) +(register-definition-prefixes "ess-custom" '("R-" "S+" "S-" "comint-highlight-prompt" "ess-" "inferior-")) + ;;;*** -;;;### (autoloads nil "ess-gretl" "ess-gretl.el" (23994 46764 949104 -;;;;;; 258000)) +;;;### (autoloads nil "ess-gretl" "ess-gretl.el" (0 0 0 0)) ;;; Generated autoloads from ess-gretl.el (autoload 'ess-gretl-mode "ess-gretl" "\ @@ -64,7 +73,7 @@ Major mode for editing gretl source. See `ess-mode' for more help. \(fn)" t nil) (autoload 'gretl "ess-gretl" "\ -Call 'gretl', +Call `gretl', Optional prefix (C-u) allows to set command line arguments, such as --vsize. This should be OS agnostic. If you have certain command line arguments that should always be passed @@ -72,10 +81,18 @@ to gretl, put them in the variable `inferior-gretl-args'. \(fn &optional START-ARGS)" t nil) +(register-definition-prefixes "ess-gretl" '("ess-gretl-" "gretl-" "inferior-gretl-args")) + +;;;*** + +;;;### (autoloads nil "ess-help" "ess-help.el" (0 0 0 0)) +;;; Generated autoloads from ess-help.el + +(register-definition-prefixes "ess-help" '("ess-")) + ;;;*** -;;;### (autoloads nil "ess-inf" "ess-inf.el" (23994 46764 956265 -;;;;;; 802000)) +;;;### (autoloads nil "ess-inf" "ess-inf.el" (0 0 0 0)) ;;; Generated autoloads from ess-inf.el (autoload 'ess-load-file "ess-inf" "\ @@ -84,10 +101,11 @@ This handles Tramp when working on a remote. \(fn &optional FILENAME)" t nil) +(register-definition-prefixes "ess-inf" '("ess-" "inferior-ess" "update-ess-process-name-list")) + ;;;*** -;;;### (autoloads nil "ess-jags-d" "ess-jags-d.el" (23994 46764 989659 -;;;;;; 375000)) +;;;### (autoloads nil "ess-jags-d" "ess-jags-d.el" (0 0 0 0)) ;;; Generated autoloads from ess-jags-d.el (autoload 'ess-jags-mode "ess-jags-d" "\ @@ -97,10 +115,11 @@ Major mode for JAGS. (add-to-list 'auto-mode-alist '("\\.[Jj][Aa][Gg]\\'" . ess-jags-mode)) +(register-definition-prefixes "ess-jags-d" '("ess-jags-")) + ;;;*** -;;;### (autoloads nil "ess-julia" "ess-julia.el" (23994 46764 987711 -;;;;;; 280000)) +;;;### (autoloads nil "ess-julia" "ess-julia.el" (0 0 0 0)) ;;; Generated autoloads from ess-julia.el (autoload 'ess-julia-mode "ess-julia" "\ @@ -120,10 +139,11 @@ always be passed to julia, put them in the variable (defalias 'julia #'run-ess-julia) +(register-definition-prefixes "ess-julia" '("ac-source-ess-julia-objects" "company-ess-julia-objects" "ess-" "inferior-")) + ;;;*** -;;;### (autoloads nil "ess-mode" "ess-mode.el" (23994 46764 952949 -;;;;;; 668000)) +;;;### (autoloads nil "ess-mode" "ess-mode.el" (0 0 0 0)) ;;; Generated autoloads from ess-mode.el (autoload 'ess-mode "ess-mode" "\ @@ -196,10 +216,26 @@ indentation style. See `ess-style-alist' for predefined styles. \(fn)" t nil) +(register-definition-prefixes "ess-mode" '("ess-")) + ;;;*** -;;;### (autoloads nil "ess-r-mode" "ess-r-mode.el" (23994 46764 919684 -;;;;;; 960000)) +;;;### (autoloads nil "ess-r-completion" "ess-r-completion.el" (0 +;;;;;; 0 0 0)) +;;; Generated autoloads from ess-r-completion.el + +(register-definition-prefixes "ess-r-completion" '("ac-source-R" "company-R-" "ess-")) + +;;;*** + +;;;### (autoloads nil "ess-r-flymake" "ess-r-flymake.el" (0 0 0 0)) +;;; Generated autoloads from ess-r-flymake.el + +(register-definition-prefixes "ess-r-flymake" '("ess-r-")) + +;;;*** + +;;;### (autoloads nil "ess-r-mode" "ess-r-mode.el" (0 0 0 0)) ;;; Generated autoloads from ess-r-mode.el (autoload 'run-ess-r "ess-r-mode" "\ @@ -215,16 +251,19 @@ will be prompted to enter arguments interactively. \(fn &optional START-ARGS)" t nil) -(defalias 'R #'run-ess-r) +(autoload 'R "ess-r-mode" "\ + + +\(fn &optional START-ARGS)" t nil) (autoload 'ess-r-mode "ess-r-mode" "\ Major mode for editing R source. See `ess-mode' for more help. \(fn)" t nil) -(defalias 'R-mode 'ess-r-mode) +(defalias 'R-mode #'ess-r-mode) -(defalias 'r-mode 'ess-r-mode) +(defalias 'r-mode #'ess-r-mode) (add-to-list 'auto-mode-alist '("/R/.*\\.q\\'" . ess-r-mode)) @@ -241,19 +280,42 @@ A Major mode for R transcript files. \(fn)" t nil) -(add-to-list 'auto-mode-alist '("\\.[Rr]out" . ess-r-transcript-mode)) +(add-to-list 'auto-mode-alist '("\\.[Rr]out\\'" . ess-r-transcript-mode)) (add-to-list 'interpreter-mode-alist '("Rscript" . ess-r-mode)) (add-to-list 'interpreter-mode-alist '("r" . ess-r-mode)) -(add-to-list 'auto-mode-alist '("/Makevars\\(\\.win\\)?$" . makefile-mode)) +(add-to-list 'auto-mode-alist '("/Makevars\\(\\.win\\)?\\'" . makefile-mode)) -(add-to-list 'auto-mode-alist '("DESCRIPTION$" . conf-colon-mode)) +(add-to-list 'auto-mode-alist '("DESCRIPTION\\'" . conf-colon-mode)) + +(register-definition-prefixes "ess-r-mode" '("R-" "ess-" "inferior-ess-r-" "r-transcript-mode" "run-ess-r-newest")) + +;;;*** + +;;;### (autoloads nil "ess-r-package" "ess-r-package.el" (0 0 0 0)) +;;; Generated autoloads from ess-r-package.el + +(register-definition-prefixes "ess-r-package" '("ess-")) ;;;*** -;;;### (autoloads nil "ess-rd" "ess-rd.el" (23994 46764 952078 13000)) +;;;### (autoloads nil "ess-r-syntax" "ess-r-syntax.el" (0 0 0 0)) +;;; Generated autoloads from ess-r-syntax.el + +(register-definition-prefixes "ess-r-syntax" '("ess-")) + +;;;*** + +;;;### (autoloads nil "ess-r-xref" "ess-r-xref.el" (0 0 0 0)) +;;; Generated autoloads from ess-r-xref.el + +(register-definition-prefixes "ess-r-xref" '("ess-r-xref-")) + +;;;*** + +;;;### (autoloads nil "ess-rd" "ess-rd.el" (0 0 0 0)) ;;; Generated autoloads from ess-rd.el (autoload 'Rd-mode "ess-rd" "\ @@ -263,50 +325,73 @@ Type \\[list-abbrevs] to display the built-in abbrevs for Rd keywords.To automatically turn on the abbrev(iate) features, add the following to your Emacs configuration file: - (add-hook 'Rd-mode-hook #'abbrev-mode) + (add-hook \\='Rd-mode-hook #\\='abbrev-mode) \(fn)" t nil) (add-to-list 'auto-mode-alist '("\\.Rd\\'" . Rd-mode)) +(register-definition-prefixes "ess-rd" '("Rd-")) + ;;;*** -;;;### (autoloads nil "ess-rdired" "ess-rdired.el" (23994 46764 947244 -;;;;;; 10000)) +;;;### (autoloads nil "ess-rdired" "ess-rdired.el" (0 0 0 0)) ;;; Generated autoloads from ess-rdired.el (autoload 'ess-rdired "ess-rdired" "\ Show R objects from the global environment in a separate buffer. You may interact with these objects, see `ess-rdired-mode' for -details. +details." t nil) -\(fn)" t nil) +(register-definition-prefixes "ess-rdired" '("ess-rdired-")) ;;;*** -;;;### (autoloads nil "ess-roxy" "ess-roxy.el" (23994 46764 944362 -;;;;;; 342000)) +;;;### (autoloads nil "ess-roxy" "ess-roxy.el" (0 0 0 0)) ;;; Generated autoloads from ess-roxy.el (autoload 'ess-roxy-mode "ess-roxy" "\ Minor mode for editing ROxygen documentation. +This is a minor mode. If called interactively, toggle the +`Ess-Roxy mode' mode. If the prefix argument is positive, enable +the mode, and if it is zero or negative, disable the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `ess-roxy-mode'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + \(fn &optional ARG)" t nil) +(register-definition-prefixes "ess-roxy" '("ess-")) + ;;;*** -;;;### (autoloads nil "ess-s-lang" "ess-s-lang.el" (23994 46764 906213 -;;;;;; 450000)) +;;;### (autoloads nil "ess-s-lang" "ess-s-lang.el" (0 0 0 0)) ;;; Generated autoloads from ess-s-lang.el (add-to-list 'auto-mode-alist '("\\.[Ss]t\\'" . S-transcript-mode)) -(add-to-list 'auto-mode-alist '("\\.Sout" . S-transcript-mode)) +(add-to-list 'auto-mode-alist '("\\.Sout\\'" . S-transcript-mode)) + +(register-definition-prefixes "ess-s-lang" '("S+common-cust-alist" "S-" "ess-" "inferior-S-language-start")) + +;;;*** + +;;;### (autoloads nil "ess-sas-a" "ess-sas-a.el" (0 0 0 0)) +;;; Generated autoloads from ess-sas-a.el + +(register-definition-prefixes "ess-sas-a" '("ess-" "sas-program")) ;;;*** -;;;### (autoloads nil "ess-sas-d" "ess-sas-d.el" (23994 46764 991721 -;;;;;; 22000)) +;;;### (autoloads nil "ess-sas-d" "ess-sas-d.el" (0 0 0 0)) ;;; Generated autoloads from ess-sas-d.el (autoload 'SAS-mode "ess-sas-d" "\ @@ -316,10 +401,18 @@ Major mode for editing SAS source. See `ess-mode' for more help. (add-to-list 'auto-mode-alist '("\\.[Ss][Aa][Ss]\\'" . SAS-mode)) +(register-definition-prefixes "ess-sas-d" '("SAS" "ess-" "inferior-SAS-args")) + +;;;*** + +;;;### (autoloads nil "ess-sas-l" "ess-sas-l.el" (0 0 0 0)) +;;; Generated autoloads from ess-sas-l.el + +(register-definition-prefixes "ess-sas-l" '("SAS-" "backward-page-top-of-window" "beginning-of-sas-" "ess-" "fix-page-breaks" "forward-page-top-of-window" "indent-sas-statement" "next-sas-proc" "sas-" "set-sas-file-" "submit-sas" "switch-to-")) + ;;;*** -;;;### (autoloads nil "ess-sp6-d" "ess-sp6-d.el" (23994 46764 922686 -;;;;;; 856000)) +;;;### (autoloads nil "ess-sp6-d" "ess-sp6-d.el" (0 0 0 0)) ;;; Generated autoloads from ess-sp6-d.el (autoload 'S+-mode "ess-sp6-d" "\ @@ -327,25 +420,25 @@ Major mode for editing S+ source. See `ess-mode' for more help. \(fn &optional PROC-NAME)" t nil) +(register-definition-prefixes "ess-sp6-d" '("S+" "ess-")) + ;;;*** -;;;### (autoloads nil "ess-stata-mode" "ess-stata-mode.el" (23994 -;;;;;; 46764 927433 996000)) -;;; Generated autoloads from ess-stata-mode.el - -(autoload 'ess-stata-mode "ess-stata-mode" "\ -Major mode for editing Stata source. +;;;### (autoloads nil "ess-toolbar" "ess-toolbar.el" (0 0 0 0)) +;;; Generated autoloads from ess-toolbar.el -\(fn)" t nil) +(register-definition-prefixes "ess-toolbar" '("ess-")) -(add-to-list 'auto-mode-alist '("\\.do\\'" . ess-stata-mode)) +;;;*** + +;;;### (autoloads nil "ess-tracebug" "ess-tracebug.el" (0 0 0 0)) +;;; Generated autoloads from ess-tracebug.el -(add-to-list 'auto-mode-alist '("\\.ado\\'" . ess-stata-mode)) +(register-definition-prefixes "ess-tracebug" '("ess-" "inferior-ess-" "org-")) ;;;*** -;;;### (autoloads nil "ess-trns" "ess-trns.el" (23994 46764 942470 -;;;;;; 496000)) +;;;### (autoloads nil "ess-trns" "ess-trns.el" (0 0 0 0)) ;;; Generated autoloads from ess-trns.el (autoload 'ess-transcript-mode "ess-trns" "\ @@ -361,10 +454,51 @@ in the region, leaving only the commands. \(fn)" t nil) +(register-definition-prefixes "ess-trns" '("ess-transcript-")) + +;;;*** + +;;;### (autoloads nil "ess-utils" "ess-utils.el" (0 0 0 0)) +;;; Generated autoloads from ess-utils.el + +(defvar ess-elisp-trace-mode nil "\ +Non-nil if Ess-Elisp-Trace mode is enabled. +See the `ess-elisp-trace-mode' command +for a description of this minor mode. +Setting this variable directly does not take effect; +either customize it (see the info node `Easy Customization') +or call the function `ess-elisp-trace-mode'.") + +(custom-autoload 'ess-elisp-trace-mode "ess-utils" nil) + +(autoload 'ess-elisp-trace-mode "ess-utils" "\ +Toggle tracing of ess-prefixed functions. +Tracing is useful for debugging background ESS behaviour. When +enabled, all functions prefixed in `ess-' and `inferior-ess' are +instrumented with `trace-function'. Tracing is turned off by +calling `untrace-function' on these functions. + +This is a minor mode. If called interactively, toggle the +`Ess-Elisp-Trace mode' mode. If the prefix argument is positive, +enable the mode, and if it is zero or negative, disable the mode. + +If called from Lisp, toggle the mode if ARG is `toggle'. Enable +the mode if ARG is nil, omitted, or is a positive number. +Disable the mode if ARG is a negative number. + +To check whether the minor mode is enabled in the current buffer, +evaluate `(default-value \\='ess-elisp-trace-mode)'. + +The mode's hook is called both when the mode is enabled and when +it is disabled. + +\(fn &optional ARG)" t nil) + +(register-definition-prefixes "ess-utils" '("ess-" "with-ess-process-buffer")) + ;;;*** -;;;### (autoloads nil "essd-els" "essd-els.el" (23994 46764 908205 -;;;;;; 460000)) +;;;### (autoloads nil "essd-els" "essd-els.el" (0 0 0 0)) ;;; Generated autoloads from essd-els.el (autoload 'ess-remote "essd-els" "\ @@ -387,13 +521,11 @@ DIALECT is the desired ess-dialect. If nil, ask for dialect \(fn &optional PROC-NAME DIALECT)" t nil) +(register-definition-prefixes "essd-els" '("S+elsewhere" "ess-" "inferior-ess-remote-pager")) + ;;;*** -;;;### (autoloads nil nil ("ess-bugs-l.el" "ess-help.el" "ess-pkg.el" -;;;;;; "ess-r-completion.el" "ess-r-flymake.el" "ess-r-package.el" -;;;;;; "ess-r-syntax.el" "ess-r-xref.el" "ess-sas-a.el" "ess-sas-l.el" -;;;;;; "ess-site.el" "ess-stata-lang.el" "ess-toolbar.el" "ess-tracebug.el" -;;;;;; "ess-utils.el" "make-regexp.el") (23994 46764 993654 130000)) +;;;### (autoloads nil nil ("ess-pkg.el" "ess-site.el") (0 0 0 0)) ;;;*** @@ -401,5 +533,6 @@ DIALECT is the desired ess-dialect. If nil, ask for dialect ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t +;; coding: utf-8 ;; End: ;;; ess-autoloads.el ends here diff --git a/elpa/ess-20191014.1343/ess-bugs-d.el b/elpa/ess-20230419.1527/ess-bugs-d.el similarity index 96% rename from elpa/ess-20191014.1343/ess-bugs-d.el rename to elpa/ess-20230419.1527/ess-bugs-d.el index 9ae86d1d..44605856 100644 --- a/elpa/ess-20191014.1343/ess-bugs-d.el +++ b/elpa/ess-20230419.1527/ess-bugs-d.el @@ -1,25 +1,27 @@ ;;; ess-bugs-d.el --- ESS[BUGS] dialect -*- lexical-binding: t; -*- -;; Copyright (C) 2008-2011 Rodney Sparapani +;; Copyright (C) 2008-2022 Free Software Foundation, Inc. ;; Author: Rodney Sparapani -;; Created: 13 March 2008 ;; Maintainer: ESS-help -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Code: @@ -249,7 +251,7 @@ (setq ess-language "S") ; mimic S for ess-smart-underscore (unless (when (fboundp 'w32-shell-dos-semantics) (w32-shell-dos-semantics)) - (add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh))) + (add-hook 'comint-output-filter-functions #'ess-bugs-exit-notify-sh))) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.[Bb][Uu][Gg]\\'" . ess-bugs-mode)) diff --git a/elpa/ess-20191014.1343/ess-bugs-l.el b/elpa/ess-20230419.1527/ess-bugs-l.el similarity index 89% rename from elpa/ess-20191014.1343/ess-bugs-l.el rename to elpa/ess-20230419.1527/ess-bugs-l.el index dc886c26..5cb707f3 100644 --- a/elpa/ess-20191014.1343/ess-bugs-l.el +++ b/elpa/ess-20230419.1527/ess-bugs-l.el @@ -1,26 +1,27 @@ ;;; ess-bugs-l.el --- ESS[BUGS] languages -*- lexical-binding: t; -*- -;; Copyright (C) 2006-2011 Rodney Sparapani +;; Copyright (C) 2006-2020 Free Software Foundation, Inc. ;; Author: Rodney Sparapani -;; Created: 16 August 2006 ;; Maintainer: ESS-help -;; This file is part of ESS +;; This file is part of GNU Emacs -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Code: @@ -51,20 +52,20 @@ "Method used by `ess-bugs-batch'. The default is based on the value of the Emacs variable `system-type' and, on Windows machines, the function `w32-shell-dos-semantics'. -'sh if *shell* runs a Bourne-like or a C-like Unix shell -'dos if *shell* runs a DOS-like Windows shell +\\='sh if *shell* runs a Bourne-like or a C-like Unix shell +\\='dos if *shell* runs a DOS-like Windows shell -Unix users will get 'sh by default. +Unix users will get \\='sh by default. -Windows users running a DOS-like *shell* will get 'dos by default, -while those running a Unix-like *shell* will get 'sh by default. +Windows users running a DOS-like *shell* will get \\='dos by default, +while those running a Unix-like *shell* will get \\='sh by default. -Users whose default is not 'sh, but are accessing a remote machine with +Users whose default is not \\='sh, but are accessing a remote machine with `telnet' or `ssh', should have the following in their init file: - (setq-default ess-bugs-batch-method 'sh)" + (setq-default ess-bugs-batch-method \\='sh)" :group 'ess-bugs - :type '(choice (const 'sh :tag "Bourne/C-like Unix Shell") - (const 'dos :tag "DOS-like Windows shell"))) + :type '(choice (const sh :tag "Bourne/C-like Unix Shell") + (const dos :tag "DOS-like Windows shell"))) (defcustom ess-bugs-batch-post-command (if (equal ess-bugs-batch-method 'sh) "&" " ") @@ -141,7 +142,7 @@ Users whose default is not 'sh, but are accessing a remote machine with (define-key map (quote [f2]) #'ess-revert-wisely) (define-key map "\C-c\C-c" #'ess-bugs-next-action) (define-key map "=" #'ess-bugs-hot-arrow) - (define-key map "_" #'ess-bugs-hot-arrow) +;; (define-key map "_" #'ess-bugs-hot-arrow) map) "ESS[BUGS]: Keymap for mode.") diff --git a/elpa/ess-20191014.1343/ess-custom.el b/elpa/ess-20230419.1527/ess-custom.el similarity index 93% rename from elpa/ess-20191014.1343/ess-custom.el rename to elpa/ess-20230419.1527/ess-custom.el index c07f24ae..f631e04d 100644 --- a/elpa/ess-20191014.1343/ess-custom.el +++ b/elpa/ess-20230419.1527/ess-custom.el @@ -1,16 +1,28 @@ ;;; ess-custom.el --- Customize variables for ESS -*- lexical-binding: t; -*- -;; Copyright (C) 1997--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2015 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. - -;; Author: A.J. Rossini -;; Created: 05 June 2000 -;; Maintainer: ESS-core +;; Copyright (C) 1997-2020 Free Software Foundation, Inc. +;; Author: Rodney Sparapani +;; Maintainer: ESS-help ;; Keywords: languages +;; This file is part of GNU Emacs + +;; This file 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. +;; +;; This file 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 for more details. +;; +;; A copy of the GNU General Public License is available at +;; https://www.r-project.org/Licenses/ + + + ;; This file is part of ESS ;; This file is free software; you can redistribute it and/or modify @@ -97,11 +109,6 @@ :group 'ess :prefix "ess-") -(defgroup ess-Stata nil - "ESS: Stata." - :group 'ess - :prefix "ess-") - (defgroup ess-roxy nil "Mode for editing in-code Roxygen documentation." :group 'ess @@ -111,7 +118,7 @@ :group 'tools) (defgroup ess-extras nil - "Extra utilities for ESS" + "Extra utilities for ESS." :group 'ess :prefix "ess-") @@ -155,11 +162,11 @@ for ESS, such as icons." ;; the `lisp' directory. For this reason we need to add it before we ;; start requiring ESS files ;;;###autoload -(add-to-list 'load-path ess-lisp-directory) +(add-to-list 'load-path (directory-file-name ess-lisp-directory)) ;; Add ess-lisp-directory/obsolete to load-path; files here will ;; automatically warn that they are obsolete when loaded. ;;;###autoload -(add-to-list 'load-path (file-name-as-directory (expand-file-name "obsolete" ess-lisp-directory))) +(add-to-list 'load-path (directory-file-name (expand-file-name "obsolete" ess-lisp-directory))) (unless (file-directory-p ess-etc-directory) (display-warning 'ess (format "Could not find directory `ess-etc-directory': %s" @@ -189,9 +196,11 @@ lot." (defcustom ess-auto-width nil "When non-nil, set the width option when the window configuration changes. -When 'frame, set the width to the frame width. When 'window, set +When \\='frame, set the width to the frame width. When \\='window, set the width to the window width. If an integer, set the width to -that integer. Anything else is treated as 'window." +that integer. If it's a negative integer, set the width to the +window's width minus that number. Anything else is treated as +\\='window." :group 'ess :type '(choice (const :tag "Do nothing" :value nil) (const :tag "Frame width" :value frame) @@ -223,7 +232,7 @@ These are available for call by function `ess-handy-commands' and (defcustom ess-describe-at-point-method nil "Whether `ess-describe-object-at-point' should use a tooltip. -If nil display in an electric buffer. If 'tooltip display in +If nil display in an electric buffer. If \\='tooltip display in a tooltip. See also `tooltip-hide-delay' and variable `tooltip-delay'." @@ -277,7 +286,9 @@ See also `ess-blink-delay'" :type 'number) (defcustom ess-ask-for-ess-directory t - "Non-nil means request the process directory each time S is run." + "When non-nil ask the process directory when ESS process starts. +When set to nil, and the process is invoked with an universal +argument, the directory is prompted for." :group 'ess :type 'boolean) @@ -302,26 +313,41 @@ This, plus `ess-language', should be able to determine the exact version of the statistical package being executed in the particular buffer.") -(defcustom ess-directory-function nil +(defvaralias 'ess-directory-function 'ess-startup-directory-function) +(defcustom ess-startup-directory-function nil "Function to return the directory that ESS is run from. -If nil or if the function returns nil then you get `ess-startup-directory'." - :group 'ess - :type '(choice (const nil) function)) - -(defcustom ess-setup-directory-function nil - "Function to setup the directory that ESS is run from. -This function can be called to set environment variables or to create -a workspace." +Value of `ess-startup-directory' has precedence over this function." :group 'ess :type '(choice (const nil) function)) (defvaralias 'ess-directory 'ess-startup-directory) (defcustom ess-startup-directory nil - "The directory ESS is run from. It must end in a slash. -Provided as a default if `ess-ask-for-ess-directory' is non-nil. -A nil value means use the current buffer's default directory." + "The directory to run ESS processes from. +If a string it should be a directory from which to start the +process. If a symbol, the symbol's value should be a directory. + +For example, the following setting would always start the process +in the directory of the current file: + + (setq ess-startup-directory 'default-directory) + +If `ess-startup-directory' is nil (the default) and +`ess-startup-directory-function' is non-nil, the value returned +by `ess-startup-directory-function' is used as a directory. + +If `ess-startup-directory-function' is nil, then the current +project as returned by `project-current' is used. For files which +mark an R project see `ess-r-project'. For example you can add +.Rprofile to a sub-directory of a project to mark it as R +sub-project. + +Finally, if not in a project (`project-current' returned nil) the +`default-directory' is used. It is normally the directory of the +current file. + +See also `ess-ask-for-ess-directory'." :group 'ess - :type '(choice (const nil) directory)) + :type '(choice (const nil) directory symbol)) (defcustom ess-history-directory nil @@ -385,16 +411,16 @@ See also `ess-first-tab-never-complete'." 'ess-first-tab-never-complete "ESS 19.04") (defcustom ess-first-tab-never-complete 'symbol "If t, first TAB never tries to complete in `ess-mode'. -If 'symbol first TAB doesn't try to complete if next char is a +If \\='symbol first TAB doesn't try to complete if next char is a valid symbol constituent. -If 'symbol-or-paren don't complete if next char is closed paren +If \\='symbol-or-paren don't complete if next char is closed paren )}] or symbol character. -If 'symbol-or-paren-or-punct don't complete if next char is +If \\='symbol-or-paren-or-punct don't complete if next char is punctuation +-=% etc, or closed paren or symbol. -If 'unless-eol - first TAB completes only at end of line. +If \\='unless-eol - first TAB completes only at end of line. If nil first TAB always tries to complete (this might be too aggressive and dangerous)." @@ -408,7 +434,7 @@ aggressive and dangerous)." (defcustom ess-use-eldoc t "If t, activate eldoc in `ess-mode' and `inferior-ess-mode' buffers. -If 'script-only activate in `ess-mode' buffers only. +If \\='script-only activate in `ess-mode' buffers only. See also `ess-eldoc-show-on-symbol'." :group 'ess-extras @@ -435,7 +461,7 @@ A symbol which can be - aggressive (or t): Try strong + truncate the doc string to fit into minibuffer. -The default style is 'normal. +The default style is \\='normal. Ess-eldoc also honors the value of `eldoc-echo-area-use-multiline-p'. If this variable is not t (the @@ -447,7 +473,7 @@ truncation." (defcustom ess-use-flymake t "If non-nil activate flymake in `ess-mode' buffers. -If 'process, only check if the buffer has an inferior process." +If \\='process, only check if the buffer has an inferior process." :group 'ess :type '(choice (const :tag "Always" t) (const :tag "With running inferior process" process) @@ -457,7 +483,7 @@ If 'process, only check if the buffer has an inferior process." (defcustom ess-use-auto-complete t "If non-nil, activate auto-complete support. If t, activate auto-complete support in `ess-mode' and -`inferior-ess-mode' buffers. If 'script-only activate in `ess-mode' +`inferior-ess-mode' buffers. If \\='script-only activate in `ess-mode' buffers only. If non-nil add `ac-source-R' and `ac-source-filename' to the @@ -475,7 +501,7 @@ to install your custom sources." (defcustom ess-use-company t "If t, activate company support in `ess-mode' and `inferior-ess-mode' buffers. If non-nil add `company-R-args' and `company-R-objects' to the -`company-backends'. If 'script-only activate in `ess-mode' buffers +`company-backends'. If \\='script-only activate in `ess-mode' buffers only." :group 'ess-extras :type '(choice (const t) (const script-only) (const nil))) @@ -578,10 +604,10 @@ Anything else, never delete. This variable only affects the behavior of `ess-load-file'. Dump files are never deleted if an error occurs during the load." :group 'ess-edit - :type '(choice (const :tag "Check" :value 'check) - (const :tag "Ask" :value 'ask) - (const :tag "Always keep" :value t) - (const :tag "Always delete" :value nil))) + :type '(choice (const :tag "Check" :value check) + (const :tag "Ask" :value ask) + (const :tag "Always keep" :value t) + (const :tag "Always delete" :value nil))) (defcustom ess-delete-dump-files nil "Non-nil means delete dump files after they are created. @@ -717,7 +743,7 @@ set refill styles." (define-obsolete-variable-alias 'ess-mode-silently-save 'ess-save-silently "ESS 19.04") (defcustom ess-save-silently 'auto "If non-nil, possibly save buffers without asking. -If t, save without asking. If 'auto, save without asking if +If t, save without asking. If \\='auto, save without asking if either `compilation-ask-about-save' or variable `auto-save-visited-mode' is non-nil. Affects `ess-save-file'." :group 'ess-edit @@ -882,21 +908,21 @@ for other offsets controlling indentation.") "This setting controls indentation of continued statements. That is, consecutive statements separated by operators. -When set to 'straight, continued statements are indented as follows: +When set to \\='straight, continued statements are indented as follows: object %>% some_function() %>% other_function() -When set to 'cascade: +When set to \\='cascade: object %>% some_function() %>% other_function() -The 'straight and 'cascade settings are actually equivalent to -'(straight . t) and '(cascade . t), where t represents the -base indent size. More generally, you can supply '(straight . N) +The \\='straight and \\='cascade settings are actually equivalent to +\\='(straight . t) and \\='(cascade . t), where t represents the +base indent size. More generally, you can supply \\='(straight . N) to control the size of indentation. See `ess-style-alist' for for an overview of ESS indentation.") @@ -913,7 +939,7 @@ indented like this: See `ess-style-alist' for for an overview of ESS indentation.") (defvar ess-align-arguments-in-calls '("function[ \t]*(") - "A list of refexes where `ess-offset-arguments' is ignored. + "A list of regexes where `ess-offset-arguments' is ignored. List of regexes specifying the calls where `ess-offset-arguments' should have no effect on function declarations. The arguments of those calls will be aligned from the opening parenthesis. @@ -1296,7 +1322,7 @@ these values, use the customize interface. See the documentation of each variable for its meaning." :group 'ess-edit :type 'alist - :initialize 'custom-initialize-set + :initialize #'custom-initialize-set :set (lambda (symbol value) (set symbol value) (ess-add-style 'OWN value))) @@ -1374,7 +1400,11 @@ Good for setting up your directory." (defcustom ess-post-run-hook nil "Hook to call just after the ESS process starts up. -Good for evaluating ESS code." +Currently this should not be used to interact with the inferior +process because this hook runs too early, before the inferior +mode had a chance to properly start up the process. To interact +with the process, you must use a mode-specific hook like +'ess-r-post-run-hook'." :group 'ess-hooks :type 'hook) @@ -1404,11 +1434,12 @@ Used to decide highlighting and tag completion." "seealso" "source" "docType" "title" "TODO" "usage" "import" "exportClass" "exportPattern" "S3method" - "inheritParams" + "inherit" "inheritParams" "inheritSection" "importFrom" "importClassesFrom" "importMethodsFrom" "useDynLib" + "rawNamespace" "rdname" "section" "slot" "description" - "md" "eval") + "md" "eval" "family") "The tags used in roxygen fields that require a parameter. Used to decide highlighting and tag completion." :group 'ess-roxy @@ -1431,7 +1462,7 @@ syntactically correct roxygen entries)" :type '(alist :key-type string :value-type string)) (defcustom ess-roxy-fill-param-p nil - "Non-nil causes parameter descriptions to be filled (word-wrapped) upon `ess-roxy-update-entry'." + "When non-nil `ess-roxy-update-entry' fills (wraps) parameters." :group 'ess-roxy :type '(choice (const :tag "Off" nil) (const :tag "On" t))) @@ -1456,7 +1487,7 @@ point" :type 'string) (defvar ess-roxy-insert-prefix-on-newline t - "When non-nil, `ess-roxy-newline-and-indent' makes newlines start with the roxy prefix.") + "When non-nil, `ess-roxy-newline' inserts the roxy prefix on newlines.") ; System variables @@ -1468,7 +1499,7 @@ point" (put 'ess-local-process-name 'permanent-local t) (defcustom ess-switch-to-end-of-proc-buffer t - "If non-nil, `ess-switch-to-inferior-or-script-buffer' goes to the end of the process buffer." + "If non-nil, \\\\[ess-switch-to-inferior-or-script-buffer] goes to the end of the process buffer." :group 'ess :type 'boolean) @@ -1521,13 +1552,12 @@ there is no project root in the current directory." ;;*;; Regular expressions -;; -- Note: Some variables not-to-customize moved to ./ess-mode.el : -;; ess-r-set-function-start - -;; Fixme: the following is just for S dialects : (defcustom ess-dumped-missing-re "\\(<-\nDumped\n\\'\\)\\|\\(<-\\(\\s \\|\n\\)*\\'\\)" - "If a dumped object's buffer matches this re, then it is replaced by `ess-function-template'." + "Regex determines if dumped objects are replaced by `ess-function-template'. + +If a dumped object's buffer matches this re, then it is replaced +by `ess-function-template'." :group 'ess :type 'regexp) @@ -1547,8 +1577,8 @@ This variable is deprecated. please add an entry to `display-buffer-alist' instead. See Info node `(ess)Customizing startup'. For example: -\(add-to-list 'display-buffer-alist - '(\"*R\" +\(add-to-list \\='display-buffer-alist + \\='(\"*R\" (display-buffer-reuse-window display-buffer-pop-up-frame)))") (make-obsolete-variable 'inferior-ess-own-frame 'display-buffer-alist "ESS 19.04") (make-obsolete-variable 'inferior-ess-frame-alist "It is ignored. Use `display-buffer-alist' and `pop-up-frame-alist' instead." "ESS 19.04") @@ -1589,12 +1619,6 @@ name completion. This can mess up evaluation completely." :group 'ess-R :type 'boolean) -(defcustom inferior-STA-start-args "" - "String of switches used when starting Stata. -Also see `inferior-STA-program'." - :group 'ess-Stata - :type 'string) - (defvaralias 'inferior-R-objects-command 'inferior-ess-r-objects-command) (defcustom inferior-ess-r-objects-command "print(objects(pos=%d, all.names=TRUE), max=1e6)\n" "Format string for R command to get a list of objects at position %d. @@ -1608,7 +1632,7 @@ Used in e.g., \\[ess-execute-objects] or \\[ess-display-help-on-object]." (defvar ess-setwd-command nil "Command string to set working directory. Should contain a formatting %s to be replaced by a -path (as in 'setwd(%s)\\n'.") +path (as in `setwd(%s)\\n'.") (defcustom ess-program-files ;; 32 bit version (if (and ess-microsoft-p @@ -1617,14 +1641,20 @@ path (as in 'setwd(%s)\\n'.") (w32-short-file-name (getenv "ProgramFiles(x86)"));; always 32 on 64 bit OS (w32-short-file-name (getenv "ProgramFiles"))) ;; always 32 on 32 bit OS nil) - "Safe (no embedded blanks) 8.3 name for 32-bit programs that works across internationalization." + "Name for 32-bit programs. + +Safe (no embedded blanks) 8.3 name for 32-bit programs that works +across internationalization." :group 'ess :type '(choice (string) (const nil))) (defcustom ess-program-files-64 ;; 64 bit version (when (and ess-microsoft-p (fboundp 'w32-short-file-name) (getenv "ProgramW6432")) (w32-short-file-name (getenv "ProgramW6432"))) - "Safe (no embedded blanks) 8.3 name for 64-bit programs that works across internationalization." + "Name for 64-bit programs. + +Safe (no embedded blanks) 8.3 name for 64-bit programs that works +across internationalization." :group 'ess :type '(choice (string) (const nil))) @@ -1673,7 +1703,7 @@ file." (defvaralias 'S+6-dialect-name 'S+-dialect-name) (defcustom S+-dialect-name "S+" - "Name of 'dialect' for S-PLUS 6.x and later. + "Name of `dialect' for S-PLUS 6.x and later. Easily changeable in a user's `.emacs'." :group 'ess-SPLUS :type 'string) @@ -1725,40 +1755,33 @@ ask - ask the user whether the S buffers should be killed." :group 'ess-sas :type '(choice (string) (file))) -(define-obsolete-variable-alias 'inferior-STA-program-name - 'inferior-STA-program "ESS 18.10") -(defcustom inferior-STA-program "stata" - "Program name for invoking an inferior ESS with stata(). -This is NOT Stata, because we need to call Stata with TERM=emacs in -order for it to work right. And Emacs is too smart for it." - :group 'ess-Stata - :type '(choice (string) (file))) - (defvaralias 'R-editor 'ess-r-editor) (defcustom ess-r-editor "emacsclient" - "Editor called by R process with 'edit()' command." + "Editor called by R process with `edit()' command." :group 'ess :type 'string) (defvaralias 'R-pager 'ess-r-pager) (defcustom ess-r-pager 'nil ; Usually nil is correct as ESS and page() cooperate. - "Pager called by R process with 'page()' command." + "Pager called by R process with `page()' command." :group 'ess :type '(choice (const nil) string)) (defcustom S-editor "emacsclient" - "Editor called by S process with 'edit()' command." + "Editor called by S process with `edit()' command." :group 'ess :type 'string) (defcustom S-pager (if ess-microsoft-p "emacsclientw.exe" "emacsclient") - "Pager called by S process with 'page()' command." + "Pager called by S process with `page()' command." :group 'ess :type 'string) (defvar-local ess-editor nil - "Editor by which the process sends information to an Emacs buffer + "Editor command. + +Editor by which the process sends information to an Emacs buffer for editing and then to be returned to the process.") (defvar-local ess-pager nil @@ -1790,7 +1813,7 @@ If you wish to pass arguments to a process, see e.g. `inferior-R-args'.") "Regular expression used by `ess-mode' to detect the primary prompt.") (defvar-local inferior-ess-secondary-prompt nil - "Regular expression used by ess-mode to detect the secondary prompt. + "Regular expression used by `ess-mode' to detect the secondary prompt. This is issued by S to continue an incomplete expression. Set to nil if language doesn't support secondary prompt.") @@ -1799,7 +1822,7 @@ Set to nil if language doesn't support secondary prompt.") ;; Need this to recognize prompts of the form + + + > > > ;; and "+ . + ", but not "Abcd. " -(defvar inferior-S-prompt "[]a-zA-Z0-9.[]*[>+] \\(?:[>+.] \\)*" +(defvar inferior-S-prompt "[]a-zA-Z0-9.[]*[+ ]*> \\(?:[>+.] \\)*" "Regexp used in S and R inferior and transcript buffers for prompt navigation. Must not be anchored to BOL.") @@ -1818,22 +1841,24 @@ Otherwise, they get their own temporary buffer." (defvaralias 'ess-eval-visibly-p 'ess-eval-visibly) -(defcustom ess-eval-visibly t +(defcustom ess-eval-visibly 'nowait "Non-nil means ess-eval- commands display commands in the process buffer. +If \\='nowait, ESS shows input commands in the process buffer, but +doesn't wait for the process. Thus all the output is printed +after the input lines. + If t, ESS waits after each line of the command for the process output. This results in a nice sequence of input and output but stalls Emacs on long output (like Sys.sleep(5) in R). -If 'nowait, ESS still shows the input commands, but don't wait -for the process. Thus all the output is printed after the input -lines. - -If nil, ESS doesn't print input commands and doesn't wait for the process. +If nil, ESS doesn't print input commands and doesn't wait for the +process. This variable also affect the evaluation of input code in iESS. The effect is similar to the above. If t then ess waits for the process output, otherwise not." :group 'ess-proc + :package-version '(ess . "19.04") :type '(choice (const t) (const nowait) (const nil))) (defcustom ess-eval-deactivate-mark (fboundp 'deactivate-mark); was nil till 2010-03-22 @@ -1866,13 +1891,12 @@ Each symbol must evaluate to one of the standard mode line objects. See info node `(elisp)Mode Line Data'). Add a symbol with `add-to-list' and remove with `delq'. Note that the symbols which are part of this list should better have -'risky-local-variable property set to t, otherwise the text +\\='risky-local-variable property set to t, otherwise the text properties are not displayed. External utilities such as `ess-tracebug' and `ess-developer' customize this variable to indicate changes in the process -status. -") +status.") (put 'ess--mode-line-process-indicator 'risky-local-variable t) (defvar-local ess--local-mode-line-process-indicator '("") @@ -1945,7 +1969,7 @@ Really set in -customize-alist in ess[dl]-*.el") "Format string for ESS command to extract names from an object *safely*. %s is replaced by an \"object name\" -- usually a list or data -frame, but in R also e.g., 'package:stats'." +frame, but in R also e.g., `package:stats'." :group 'ess-command :type 'string) @@ -1978,7 +2002,9 @@ from `inferior-ess-primary-prompt' and `inferior-ess-secondary-prompt'.") "Alist of modification times for all ess directories accessed this session.") (defvar-local ess-prev-load-dir/file nil - "This symbol saves the (directory . file) pair used in the last + "Cached value for `ess-load-file'. + +This symbol saves the (directory . file) pair used in the last `ess-load-file' command. Used for determining the default in the next one.") (defvar-local ess-object-list nil @@ -2089,7 +2115,7 @@ internal variable.") "Font lock for equal sign (=).") (defvar ess-fl-keyword:operators - (cons "[-=+> ;; Created: 01-10-2012 (ESS 12.09) -;; Keywords: ESS, gretl, econometrics -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; This file is *NOT* part of GNU Emacs. -;; -;; This program 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 3, any later version. -;; -;; This program 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 for more -;; details. -;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; This file is part of GNU Emacs. + +;;; License: ;; +;; This program 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 3 of the License, or +;; (at your option) any later version. ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This program 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 for more details. ;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; + ;;; Commentary: ;; start the inferior with M-x gretl. -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; + +;;; Code: + (require 'compile); for compilation-* below (require 'ess-r-mode) -;;; Code: -(add-to-list 'auto-mode-alist '("\\.inp$" . ess-gretl-mode)) + +(add-to-list 'auto-mode-alist '("\\.inp\\'" . ess-gretl-mode)) (defvar gretl-syntax-table @@ -261,19 +254,13 @@ parenthetical grouping.") (defconst gretl-font-lock-keywords (list ;; Fontify all builtin keywords. - (cons (concat "\\<\\(" - (mapconcat 'identity gretl-keywords "\\|") - "\\)\\>") + (cons (concat "\\<\\(" (regexp-opt gretl-keywords) "\\)\\>") 'font-lock-keyword-face) ;; Fontify all option flags. - (cons (concat "[ \t]--\\(" - (mapconcat 'identity gretl-option-flags "\\|") - "\\)") + (cons (concat "[ \t]--\\(" (regexp-opt gretl-option-flags) "\\)") 'font-lock-constant-face) ;; Fontify all command words. - (cons (concat "\\<\\(" - (mapconcat 'identity gretl-command-words "\\|") - "\\)\\>") + (cons (concat "\\<\\(" (regexp-opt gretl-command-words) "\\)\\>") 'font-lock-builtin-face) ;; Fontify all builtin operators. (cons "\\(&\\||\\|<=\\|>=\\|==\\|<\\|>\\|!=\\|!\\)" @@ -281,15 +268,11 @@ parenthetical grouping.") 'font-lock-builtin-face 'font-lock-preprocessor-face)) ;; Fontify all internal variables. - (cons (concat "\\$\\(" - (mapconcat 'identity gretl-internal-vars "\\|") - "\\)\\>") + (cons (concat "\\$\\(" (regexp-opt gretl-internal-vars) "\\)\\>") 'font-lock-variable-name-face) ;; Fontify all genr functions. - (cons (concat "\\<\\(" - (mapconcat 'identity gretl-genr-functions "\\|") - "\\)\\>") + (cons (concat "\\<\\(" (regexp-opt gretl-genr-functions) "\\)\\>") 'font-lock-variable-name-face) ;; Fontify all function declarations. (list gretl-function-header-regexp @@ -299,19 +282,13 @@ parenthetical grouping.") (defvar gretl-block-begin-regexp - (concat "\\<\\(" - (mapconcat 'identity gretl-block-start-keywords "\\|") - "\\)\\>")) + (concat "\\<\\(" (regexp-opt gretl-block-start-keywords) "\\)\\>")) (defvar gretl-block-else-regexp - (concat "\\<\\(" - (mapconcat 'identity gretl-block-other-keywords "\\|") - "\\)\\>")) + (concat "\\<\\(" (regexp-opt gretl-block-other-keywords) "\\)\\>")) (defvar gretl-block-end-regexp - (concat "\\<\\(" - (mapconcat 'identity gretl-block-end-keywords "\\|") - "\\)\\>")) + (concat "\\<\\(" (regexp-opt gretl-block-end-keywords) "\\)\\>")) (defvar gretl-block-begin-or-end-regexp (concat gretl-block-begin-regexp "\\|" gretl-block-end-regexp)) @@ -385,7 +362,7 @@ end keywords as associated values.") (interactive) (end-of-line) (indent-line-to - (or (and (ess-inside-string-p (point-at-bol)) 0) + (or (and (ess-inside-string-p (line-beginning-position)) 0) (save-excursion (ignore-errors (gretl-form-indent))) (save-excursion (let ((endtok (progn @@ -460,7 +437,7 @@ end keywords as associated values.") (inferior-ess-primary-prompt . "\\? ") (inferior-ess-secondary-prompt . "\\ ") (inferior-ess-prompt . "\\? ") - (ess-local-customize-alist . 'gretl-customize-alist) + (ess-local-customize-alist . gretl-customize-alist) (inferior-ess-program . "gretlcli") (ess-load-command . "open \"%s\"\n") ;; (ess-dump-error-re . "in \\w* at \\(.*\\):[0-9]+") @@ -529,7 +506,7 @@ end keywords as associated values.") ;;;###autoload (defun gretl (&optional start-args) - "Call 'gretl', + "Call `gretl', Optional prefix (C-u) allows to set command line arguments, such as --vsize. This should be OS agnostic. If you have certain command line arguments that should always be passed @@ -551,7 +528,7 @@ to gretl, put them in the variable `inferior-gretl-args'." "'] ? ")) nil))) (inf-buf (inferior-ess r-start-args gretl-customize-alist))) - (setq-local indent-line-function 'gretl-indent-line) + (setq-local indent-line-function #'gretl-indent-line) (setq-local gretl-basic-offset 4) (setq indent-tabs-mode nil) (goto-char (point-max)) diff --git a/elpa/ess-20191014.1343/ess-help.el b/elpa/ess-20230419.1527/ess-help.el similarity index 90% rename from elpa/ess-20191014.1343/ess-help.el rename to elpa/ess-20230419.1527/ess-help.el index 02bb8a75..0b2ccd13 100644 --- a/elpa/ess-20191014.1343/ess-help.el +++ b/elpa/ess-20230419.1527/ess-help.el @@ -1,32 +1,28 @@ ;;; ess-help.el --- Support for viewing ESS help files -*- lexical-binding: t; -*- -;; Copyright (C) 1989-1994, 2017 Bates, Kademan, Ritter and Smith -;; Copyright (C) 1997, A.J. Rossini -;; Copyright (C) 1998--2001 A.J. Rossini, Martin Maechler, Kurt Hornik and -;; Richard M. Heiberger . -;; Copyright (C) 2001--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2012 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. +;; Copyright (C) 1989-2022 Free Software Foundation, Inc. ;; Author: David Smith ;; Created: 7 Jan 1994 ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -57,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: @@ -136,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) ")*")) @@ -155,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 @@ -162,7 +168,7 @@ ignored." (ess-process-put 'sp-for-help-changed? t) (ess-display-help-on-object ess-help-object)) -(defalias 'ess-help 'ess-display-help-on-object) +(defalias 'ess-help #'ess-display-help-on-object) (cl-defgeneric ess-build-help-command (object) "Build a string command for retrieving help on OBJECT." @@ -175,7 +181,8 @@ 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))) (ess-help-underline) (unless (string= ess-language "STA") (ess-nuke-help-bs)) @@ -199,36 +206,12 @@ ignored." (defun ess-display-help-in-browser () "Displaying HTML help where available, using \\[browse-url]." (interactive) - ;; Three ways to find HTML help, 1) ask sub-process 2) get URL/file from subprocess - ;; 3) call elisp function to get the file path - ;; For 2 and 3 call browse-url on the output - (let (com-html-help ;1) command for sub-process to trigger - ;help, must contain %s for help obj - com-get-file-path ;2) command for sub-process to return a - ; location for the help page, must - ; contain %s for help obj - fun-get-file-path ;3) elisp function to return the - ;location, gets one argument, help topic - not-implemented - ) - (cond - ((string-match "^R" ess-dialect) - (setq com-html-help "help('%s', help_type='html')\n")) - (t (setq not-implemented t)) - ) - (if not-implemented - (message "Sorry, not implemented for %s " ess-dialect) - (if (or (not ess-help-object) - (not (eq ess-help-type 'help))) - (message "No help topic found") - (if com-html-help - (ess-command (format com-html-help ess-help-object)) - (require 'browse-url) - (if com-get-file-path - (browse-url (car (ess-get-words-from-vector - (format com-get-file-path ess-help-object)))) - (when (functionp fun-get-file-path) - (browse-url (funcall fun-get-file-path ess-help-object))))))))) + (unless (string-match "^R" ess-dialect) + (user-error "Sorry, not implemented for %s " ess-dialect)) + (if (or (not ess-help-object) + (not (eq ess-help-type 'help))) + (message "No help topic found") + (ess-command (format "help('%s', help_type='html')\n" ess-help-object)))) (defun ess--button-action (&optional button) "Provide help on object at the beginning of line. @@ -241,12 +224,15 @@ if necessary. It is bound to RET and C-m in R-index pages." (cl-defgeneric ess-help-commands () "Return an alist of dialect specific retriever commands. Currently understood commands: - - package-for-object - command to get the package of current help object - - packages - command to get a list of available packages (REQUIRED) - - package-index - command to get the package index (REQUIRED) - - index-keyword-reg - regexp used to find keywords for linking in index listing - only (1st subexpression is used) - - index-start-reg - regexp from where to start searching for keywords in index listing" +- package-for-object - command to get the package of current + help object +- packages - command to get a list of available + packages (REQUIRED) +- package-index - command to get the package index (REQUIRED) +- index-keyword-reg - regexp used to find keywords for linking in + index listing only (1st subexpression is used) +- index-start-reg - regexp from where to start searching for + keywords in index listing" (user-error "Not implemented for %s " ess-dialect)) (cl-defmethod ess-help-commands (&context (ess-dialect "R")) @@ -285,7 +271,8 @@ TITLE of the help page, HELP-TYPE to be stored in `ess-help-type' local variable, ACTION is a function with no argument (default is `ess--button-action'), HELP-ECHO if given becomes the help-echo property of the button, -REG-START gives the start location from where to search linkifying, and HELP-OBJECT becomes `ess-help-object'." +REG-START gives the start location from where to search linkifying, + and HELP-OBJECT becomes `ess-help-object'." (let ((inhibit-modification-hooks t) (alist ess-local-customize-alist) (pname ess-local-process-name) @@ -295,10 +282,10 @@ REG-START gives the start location from where to search linkifying, and HELP-OBJ (delete-region (point-min) (point-max)) (setq ess-local-process-name pname) (ess--help-major-mode) - (ess-setq-vars-local (eval alist)) + (ess-setq-vars-local (eval alist t)) (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)) @@ -343,7 +330,7 @@ REG-START gives the start location from where to search linkifying, and HELP-OBJ (ess--display-indexed-help-page (format com pattern) regexp (format "*ess-apropos[%s](%s)*" ess-current-process-name pattern) - 'appropos))) + 'apropos))) (defun ess-display-demos () "Create an ess-demos buffer with a *linked* list of available demos." @@ -389,7 +376,7 @@ See `ess-display-vignettes' for ALL." (get-text-property pos 'vignette) (get-text-property pos 'package)))) -(defalias 'ess-help-quit 'quit-window) +(defalias 'ess-help-quit #'quit-window) (make-obsolete 'ess-help-quit 'quit-window "16.04") (defun ess-display-help (buff) @@ -672,7 +659,7 @@ nil otherwise." (defun ess-get-help-files-list () "Return a list of files which have help available." - (apply 'nconc + (apply #'nconc (mapcar (lambda (str) (let ((dirname (concat str "/.Help"))) (and (file-directory-p dirname) @@ -685,7 +672,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 () @@ -751,11 +740,11 @@ If region is active use it instead of the object at point. This is an electric command (`ess--execute-electric-command'), which means that you can use the last key to cycle through the action set (in this case `C-e'). After invocation of this command -all standard Emacs commands, except those containing 'window' in +all standard Emacs commands, except those containing `window' in their names, remove the electric *ess-describe* buffer. Use `other-window' to switch to *ess-describe* window. -Customize `ess-describe-at-point-method' if you wan to display +Customize `ess-describe-at-point-method' if you want to display the description in a tooltip. See also `ess-r-describe-object-at-point-commands' (and similar option for other dialects)." @@ -769,7 +758,8 @@ other dialects)." (ess-symbol-at-point))) ess--descr-o-a-p-commands) ;; used in ess--describe-object-at-point (unless objname (error "No object at point ")) - (define-key map (vector last-command-event) 'ess--describe-object-at-point) + (define-key map (vector last-command-event) + #'ess--describe-object-at-point) ;; todo: put digits into the map (let* ((inhibit-quit t) ;; C-g removes the buffer (buf (ess--execute-electric-command diff --git a/elpa/ess-20191014.1343/ess-inf.el b/elpa/ess-20230419.1527/ess-inf.el similarity index 79% rename from elpa/ess-20191014.1343/ess-inf.el rename to elpa/ess-20230419.1527/ess-inf.el index 815b8313..0bd967ca 100644 --- a/elpa/ess-20191014.1343/ess-inf.el +++ b/elpa/ess-20230419.1527/ess-inf.el @@ -1,31 +1,28 @@ ;;; ess-inf.el --- Support for running S as an inferior Emacs process -*- lexical-binding: t; -*- -;; Copyright (C) 1989-1994 Bates, Kademan, Ritter and Smith -;; Copyright (C) 1997-1999 A.J. Rossini , -;; Martin Maechler . -;; Copyright (C) 2000--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2012 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. +;; Copyright (C) 1989-2022 Free Software Foundation, Inc. ;; Author: David Smith ;; Created: 7 Jan 1994 ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -106,7 +103,8 @@ been initialized." (progn (setq-local inferior-ess-mode-syntax-table (eval (or (alist-get 'inferior-ess-mode-syntax-table ess-local-customize-alist) - (alist-get 'ess-mode-syntax-table ess-local-customize-alist)))) + (alist-get 'ess-mode-syntax-table ess-local-customize-alist)) + t)) (inferior-ess-mode))))) ;;*;; Process handling @@ -132,6 +130,11 @@ If `ess-plain-first-buffername', then initial process is number-free." (defvar-local inferior-ess--local-data nil "Program name and arguments used to start the inferior process.") +(defvar inferior-ess--last-started-process-buffer nil + "Useful in unit tests to check initialisation errors. +In that case the command fails before it can return the process +buffer to us. This global variable can be checked instead.") + (defun inferior-ess (start-args customize-alist &optional no-wait) "Start inferior ESS process. Without a prefix argument, starts a new ESS process, or switches @@ -163,7 +166,7 @@ This may be useful for debugging." ;; This function is primarily used to figure out the Process and ;; buffer names to use for inferior-ess. (run-hooks 'ess-pre-run-hook) - (let* ((dialect (eval (cdr (assoc 'ess-dialect customize-alist)))) + (let* ((dialect (eval (cdr (assoc 'ess-dialect customize-alist)) t)) (process-environment process-environment) ;; Use dialect if not R, R program name otherwise (temp-dialect (if ess-use-inferior-program-in-buffer-name ;VS[23-02-2013]: FIXME: this should not be here @@ -172,18 +175,17 @@ This may be useful for debugging." dialect) dialect)) (inf-buf (inferior-ess--get-proc-buffer-create temp-dialect)) - (proc-name (buffer-local-value 'ess-local-process-name inf-buf)) - (cur-dir (inferior-ess--maybe-prompt-startup-directory proc-name temp-dialect)) - (default-directory cur-dir)) + (proc-name (buffer-local-value 'ess-local-process-name inf-buf))) (with-current-buffer inf-buf ;; TODO: Get rid of this, we should rely on modes to set the ;; variables they need. (ess-setq-vars-local customize-alist) (inferior-ess--set-major-mode ess-dialect) - ;; Set local variables after changing mode because they might - ;; not be permanent - (setq default-directory cur-dir) - (setq inferior-ess--local-data (cons inferior-ess-program start-args)) + ;; Set local variables after changing mode because they might + ;; not be permanent + (setq default-directory + (inferior-ess--maybe-prompt-startup-directory proc-name temp-dialect)) + (setq inferior-ess--local-data (cons inferior-ess-program start-args)) ;; Read the history file (when ess-history-file (setq comint-input-ring-file-name @@ -206,15 +208,14 @@ This may be useful for debugging." (ess-wait-for-process proc nil 0.01 t)) (unless (and proc (eq (process-status proc) 'run)) (error "Process %s failed to start" proc-name)) - (when ess-setwd-command - (ess-set-working-directory cur-dir)) (setq-local font-lock-fontify-region-function #'inferior-ess-fontify-region) (setq-local ess-sl-modtime-alist nil) (run-hooks 'ess-post-run-hook) ;; User initialization can take some time ... (unless no-wait - (ess-write-to-dribble-buffer "(inferior-ess 3): waiting for process after hook") + (ess-write-to-dribble-buffer "(inferior-ess): waiting for process (after hook)\n") (ess-wait-for-process proc))) + (setq inferior-ess--last-started-process-buffer inf-buf) inf-buf))) (defun inferior-ess--get-proc-buffer-create (name) @@ -263,6 +264,7 @@ generated the latter from NAME." buf))) (defun ess--accumulation-buffer (proc) + "Return, creating if needed, the accumulation buffer for PROC." (let ((abuf (process-get proc :accum-buffer))) (if (buffer-live-p abuf) abuf @@ -287,9 +289,10 @@ Default depends on the ESS language/dialect and hence made buffer local") Default depends on the ESS language/dialect and hence made buffer local") (defun inferior-ess-fontify-region (beg end &optional verbose) - "Fontify output by output to avoid fontification spilling over prompts." + "Fontify output by output to avoid fontification spilling over prompts. +BEG and END signify the bounds, VERBOSE gets passed to +`font-lock-default-fontify-region'." (let* ((buffer-undo-list t) - (inhibit-point-motion-hooks t) (font-lock-dont-widen t) (font-lock-extend-region-functions nil) (pos1 beg) @@ -315,14 +318,14 @@ See `ess-gen-proc-buffer-name-function'." (format "*%s*" proc-name)) (defun ess-gen-proc-buffer-name:directory (proc-name) - "Function to generate buffer name by wrapping PROC-NAME in *PROC-NAME:DIR-NAME*. + "Return a buffer name by wrapping PROC-NAME in *PROC-NAME:DIR-NAME*. DIR-NAME is a short directory name. See `ess-gen-proc-buffer-name-function'." (format "*%s:%s*" proc-name (file-name-nondirectory (directory-file-name default-directory)))) (defun ess-gen-proc-buffer-name:abbr-long-directory (proc-name) - "Function to generate buffer name in the form *PROC-NAME:ABBREVIATED-LONG-DIR-NAME*. + "Return a buffer name in the form *PROC-NAME:ABBREVIATED-LONG-DIR-NAME*. PROC-NAME is a string representing an internal process name. ABBREVIATED-LONG-DIR-NAME is an abbreviated full directory name. Abbreviation is performed by `abbreviate-file-name'. See @@ -331,13 +334,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 directory has been found use +PROC-NAME is a string representing an internal process name. 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 +347,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))) @@ -358,14 +360,13 @@ defined. If no project directory has been found, use ;; This ensures that people who have this set in their init file don't ;; get errors about undefined functions after upgrading ESS: (define-obsolete-function-alias 'ess-gen-proc-buffer-name:projectile-or-simple - 'ess-gen-proc-buffer-name:project-or-simple "ESS 19.04") + #'ess-gen-proc-buffer-name:project-or-simple "ESS 19.04") (define-obsolete-function-alias 'ess-gen-proc-buffer-name:projectile-or-directory - 'ess-gen-proc-buffer-name:project-or-directory "ESS 19.04") + #'ess-gen-proc-buffer-name:project-or-directory "ESS 19.04") (defun inferior-ess-available-p (&optional proc) "Return non-nil if PROC is not busy." - (when-let ((proc (or proc (and ess-local-process-name - (get-process ess-local-process-name))))) + (when-let ((proc (or proc (ess-get-current-process)))) (unless (process-get proc 'busy) (or (ess-debug-active-p proc) ; don't send empty lines in debugger (when-let ((last-check (process-get proc 'last-availability-check))) @@ -396,7 +397,7 @@ Return non-nil if the process is in a ready (not busy) state." ;; When "\n" inserted from inferior-ess-available-p, delete the prompt. (when (and ready (process-get proc 'availability-check) - (string-match-p (concat "^" inferior-ess-primary-prompt "\\'") string)) + (string-match-p (concat inferior-ess-primary-prompt "\\'") string)) (process-put proc 'suppress-next-output? t)) (process-put proc 'availability-check nil) (when ready @@ -407,7 +408,92 @@ Return non-nil if the process is in a ready (not busy) state." (string-match (concat "\\(" inferior-ess-secondary-prompt "\\)\\'") string))) ready)) +(defun ess--command-delimited-output-info (buf delim) + "Detect positions of accumulated output. +Return positions after START, before END, after prompt. If any is +not found, returns nil. The last position marks the start of new +output, if any." + (with-current-buffer buf + (save-excursion + (save-match-data + (goto-char (point-min)) + (when (re-search-forward (ess--delimiter-start-re delim) nil t) + (let ((start (1+ (match-end 0)))) + (when (re-search-forward (ess--delimiter-end-re delim) nil t) + (when (not (equal (line-beginning-position) + (match-beginning 0))) + (error "Missing newline in command output")) + (let ((end (max (1- (match-beginning 0)) + start))) + (goto-char (1+ (match-end 0))) + (when (re-search-forward inferior-ess-primary-prompt nil t) + (let* ((prompt-end (match-end 0)) + (new (when (> (point-max) prompt-end) + prompt-end))) + (list start end new))))))))))) + +(defun ess--command-output-info (buf) + "Detect positions of accumulated output. +Like `ess--command-delimited-output-info' but detects prompts +without the benefit of output delimiters. This is much less +robust. This might leave parasite output at the start of BUF +(e.g. `+' prompts with multiline commands). The result might be +incomplete if the command output includes a line that ends with +`> ' and which happens to be the last characters in a partial +output (process output passed to filters is split in batches at +arbitrary locations). In that case the rest of the output will be +inserted in the process buffer instead of the command buffer." + (with-current-buffer buf + (save-excursion + (save-match-data + (goto-char (point-min)) + (when (re-search-forward (concat inferior-ess-primary-prompt + "\\(\n\\|\\'\\)") + nil t) + (goto-char (match-beginning 0)) + (let ((end (max (1- (line-beginning-position)) + (point-min))) + (new (when (> (point-max) (line-end-position)) + (1+ (line-end-position))))) + (list (point-min) end new))))))) + +;; Be careful that new output might come in after the closing +;; delimiter or prompt. This could happen when a background command is +;; interrupted asynchronously and the user has sent new inputs before +;; the process has finished interrupting. +(defun ess--command-set-status (proc buf info) + (with-current-buffer buf + (unwind-protect + (progn + (let* ((beg (nth 0 info)) + (end (nth 1 info)) + (new (nth 2 info)) + (output (buffer-substring beg end)) + (new-output (when new + (buffer-substring new (point-max))))) + ;; Delete the start delimiter and anything before it. + ;; This takes care of `+` continuation lines that occur + ;; with multi-line commands. Delete anything after the + ;; end delimiter, including the prompt and new output + (delete-region (point-min) (point-max)) + (insert output) + new-output)) + (process-put proc 'busy nil)))) + +(defun ess--delimiter-start-re (delim) + (concat "\\(" delim "-START\r*$\\)")) + +(defun ess--delimiter-end-re (delim) + (concat "\\(" delim "-END\r*\\)")) + +(defun ess--delimiter-error-start-re () + "ESSR::ERROR \\(\"\\)") + +(defun ess--delimiter-error-end-re () + "\\(\"\\)") + (defun inferior-ess-mark-as-busy (proc) + "Put PROC's busy value to t." (process-put proc 'busy t) (process-put proc 'sec-prompt nil)) @@ -435,13 +521,15 @@ Return non-nil if the process is in a ready (not busy) state." (error (message "%s" (error-message-string err)))))))) (defun ess--if-verbose-write-process-state (proc string &optional filter) + "Write information about PROC, STRING, and FILTER to the dribble buffer." (ess-if-verbose-write (format "\n%s: --> busy:%s busy-end:%s sec-prompt:%s interruptable:%s <-- --> running-async:%s callback:%s suppress-next-output:%s <-- --> dbg-active:%s is-recover:%s <-- - --> string:%s\n" - (or filter "NORMAL-FILTER") + --> cmd-buffer:%s cmd-output-delimiter:%s <-- + --> string:%s<--\n" + (upcase (or filter "normal-filter")) (process-get proc 'busy) (process-get proc 'busy-end?) (process-get proc 'sec-prompt) @@ -451,6 +539,8 @@ Return non-nil if the process is in a ready (not busy) state." (process-get proc 'suppress-next-output?) (process-get proc 'dbg-active) (process-get proc 'is-recover) + (process-get proc 'cmd-buffer) + (process-get proc 'cmd-output-delimiter) (if (> (length string) 150) (format "%s .... %s" (substring string 0 50) (substring string -50)) string)))) @@ -480,8 +570,8 @@ flash or you'll hear a beep. Taken from octave-mod.el." string) (defun ess-process-sentinel (proc message) - "Sentinel for use with ESS processes. -This marks the process with a message, at a particular time point." + "Sentinel for use with ESS processes PROC. +This marks the process with a MESSAGE, at a particular time point." (let ((abuf (process-get proc :accum-buffer))) (when (buffer-live-p abuf) (kill-buffer abuf))) @@ -526,11 +616,12 @@ process-less buffer because it was created with proc-name inferior-ess-program nil - (split-string switches))) + (when switches + (split-string switches)))) (let ((proc (get-buffer-process buf))) ;; Set the process hooks - (set-process-sentinel proc 'ess-process-sentinel) - (set-process-filter proc 'inferior-ess-output-filter) + (set-process-sentinel proc #'ess-process-sentinel) + (set-process-filter proc #'inferior-ess-output-filter) (inferior-ess-mark-as-busy proc) ;; Add this process to ess-process-name-list, if needed (let ((conselt (assoc proc-name ess-process-name-list))) @@ -541,28 +632,25 @@ process-less buffer because it was created with ;;*;; Requester functions called at startup - -;; FIXME EMACS 25.1: -;; Deprecate `ess-directory-function' in favor of `project-find-functions'? (defun inferior-ess--get-startup-directory () - (let ((dir (or (and ess--enable-experimental-projects - (fboundp 'project-current) - (cdr (project-current))) - (and ess-directory-function - (funcall ess-directory-function)) - ess-startup-directory + "Return a startup directory." + (let ((dir (or (when (boundp 'ess-startup-directory) + (if (symbolp ess-startup-directory) + (symbol-value ess-startup-directory) + ess-startup-directory)) + (and ess-startup-directory-function + (funcall ess-startup-directory-function)) + (when-let ((proj (project-current))) + (ess--project-root proj)) default-directory))) (directory-file-name dir))) -(defun inferior-ess--maybe-prompt-startup-directory (procname dialect) +(defun inferior-ess--maybe-prompt-startup-directory (procname _dialect) "Possibly prompt for a startup directory. When `ess-ask-for-ess-directory' is non-nil, prompt. PROCNAME is the name of the inferior process (e.g. \"R:1\"), and DIALECT is the language dialect (e.g. \"R\")." - (let ((default-dir (if (fboundp 'inferior-ess-r--adjust-startup-directory) - (inferior-ess-r--adjust-startup-directory - (inferior-ess--get-startup-directory) dialect) - (inferior-ess--get-startup-directory)))) + (let ((default-dir (inferior-ess--get-startup-directory))) (if ess-ask-for-ess-directory (let ((prompt (format "%s starting project directory? " procname))) (ess-prompt-for-directory default-dir prompt)) @@ -580,18 +668,6 @@ the language dialect (e.g. \"R\")." ;;*;; General process handling code -(defmacro with-ess-process-buffer (no-error &rest body) - "Execute BODY in the process buffer of `ess-current-process-name'. -If NO-ERROR is t don't trigger error when there is not current -process. Symbol *proc* is bound to the current process during the -evaluation of BODY." - (declare (indent 1) (debug t)) - `(let ((*proc* (and ess-local-process-name (get-process ess-local-process-name)))) - (if *proc* - (with-current-buffer (process-buffer *proc*) - ,@body) - (unless ,no-error - (error "No current ESS process"))))) (defmacro ess-with-current-buffer (buffer &rest body) "Like `with-current-buffer' but with transfer of some essential @@ -604,7 +680,7 @@ local ESS vars like `ess-local-process-name'." (,dialect ess-dialect) (,alist ess-local-customize-alist)) (with-current-buffer ,buffer - (ess-setq-vars-local (eval ,alist)) + (ess-setq-vars-local (eval ,alist t)) (setq ess-local-process-name ,lpn) (setq ess-dialect ,dialect) ,@body)))) @@ -648,6 +724,7 @@ happens interactively (when possible)." (t (error "Process %s is not running" name)))) (defun inferior-ess-default-directory () + "Return the `default-directory' of the process." (ess-get-process-variable 'default-directory)) ;;--- Unfinished idea (ESS-help / R-help ) -- probably not worth it... @@ -689,65 +766,59 @@ Returns the name of the process, or nil if the current buffer has none." "Check if the local ess process is alive. Return nil if current buffer has no associated process, or process was killed. PROC defaults to `ess-local-process-name'" - (and (or proc ess-local-process-name) - (let ((proc (or proc (get-process ess-local-process-name)))) - (and (processp proc) - (process-live-p proc))))) + (when-let ((proc (or proc (ess-get-current-process)))) + (process-live-p proc))) (defun ess-process-get (propname &optional proc) - "Return the variable PROPNAME (symbol) from the plist of the current ESS process. + "Return the variable PROPNAME (symbol) of the current ESS process. PROC defaults to process with name `ess-local-process-name'." (process-get (or proc (get-process ess-local-process-name)) propname)) (defun ess-process-put (propname value &optional proc) - "Set the variable PROPNAME (symbol) to VALUE in the plist of the current ESS process. + "Set the variable PROPNAME (symbol) to VALUE in the current ESS process. PROC defaults to the process given by `ess-local-process-name'" (process-put (or proc (get-process ess-local-process-name)) propname value)) (defun ess-start-process-specific (language dialect) "Start an ESS process. -Typically from a language-specific buffer, using LANGUAGE (and DIALECT)." +Typically from a language-specific buffer, using DIALECT. +LANGUAGE is ignored." (save-current-buffer (let ((dsymb (intern dialect))) - (ess-write-to-dribble-buffer - (format " ..start-process-specific: lang:dialect= %s:%s, current-buf=%s\n" - language dialect (current-buffer))) - (cond ;; ((string= dialect "R") (R)) - ;; ((string= language "S") ; - ;; (message "ESS process not running, trying to start R, since language = 'S") - ;; (R)) - ;; ((string= dialect STA-dialect-name) (stata)) - ;;general case - ((fboundp dsymb) - (funcall dsymb)) - (t ;; else: ess-dialect is not a function - - ;; Typically triggered from - ;; ess-force-buffer-current("Process to load into: ") - ;; \--> ess-request-a-process("Process to load into: " no-switch) + (if (fboundp dsymb) + (funcall dsymb) (error "No ESS processes running; not yet implemented to start (%s,%s)" - language dialect)))))) + 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 @@ -761,56 +832,61 @@ 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-if-verbose-write + "ess-request-a-process: Can't find a process, starting a new one\n") + (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-if-verbose-write + "ess-request-a-process: User requested a new process\n") + (ess--with-no-pop-to-buffer + (ess-start-process-specific ess-language ess-dialect)) + (caar ess-process-name-list)))))) + ;; Always display buffer if auto-started but do not select it if + ;; NOSWITCH is set + (when (or auto-started? (not noswitch)) + (let ((proc-buf (ess-get-process-buffer proc))) + (if noswitch + (display-buffer proc-buf) + (pop-to-buffer proc-buf)) + ;; If inferior startup has already finished, set screen + ;; options again in case the post-run hook ran before a new + ;; screen config was created by `pop-to-buffer' (#1243). + (with-current-buffer proc-buf + (ess--execute-screen-options-bg)))) + 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. @@ -843,26 +919,50 @@ it was successfully forced, throws an error otherwise." (interactive) (ess-force-buffer-current "Process to use: " 'force nil 'ask-if-1)) -(defun ess-get-next-available-process (&optional dialect ignore-busy) +(defun ess-get-current-process () + (when ess-local-process-name + (get-process ess-local-process-name))) + +(defun ess-get-current-process-buffer () + (when-let ((proc (ess-get-current-process))) + (process-buffer proc))) + +(defun ess-get-next-available-process (&optional dialect ignore-busy background) "Return first available (aka not busy) process of dialect DIALECT. DIALECT defaults to the local value of ess-dialect. Return nil if -no such process has been found." +no such process has been found. If BACKGROUND is non-nil, only +processes that are allowed to evaluate in the background are +matched." (setq dialect (or dialect ess-dialect)) - (when dialect + (when (and dialect (or (not background) + ess-can-eval-in-background)) (let (proc) (catch 'found (dolist (p (cons ess-local-process-name - (mapcar 'car ess-process-name-list))) + (mapcar #'car ess-process-name-list))) (when p (setq proc (get-process p)) (when (and proc (process-live-p proc) (equal dialect (buffer-local-value 'ess-dialect (process-buffer proc))) + ;; Check that we can evaluate in background + ;; before checking for availability to + ;; avoid issues with newline handshakes + (or (not background) + (ess-can-eval-in-background proc)) (or ignore-busy (inferior-ess-available-p proc))) (throw 'found proc)))))))) +(defun ess-get-next-available-bg-process (&optional proc dialect ignore-busy) + "Returns first avaiable process only if background evaluations are allowed. +Same as `ess-get-next-available-process' but checks for +`ess-can-eval-in-background'." + (if proc + (ess-can-eval-in-background proc) + (ess-get-next-available-process dialect ignore-busy 'background))) + ;;*;;; Commands for switching to the process buffer @@ -909,9 +1009,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) @@ -958,14 +1059,16 @@ and `ess-load-command', in that order." (format ess-load-command file))) (defun ess-wait-for-process (&optional proc sec-prompt wait force-redisplay timeout) - "Wait for 'busy property of the process to become nil. + "Wait for \\='busy property of the process to become nil. If SEC-PROMPT is non-nil return if secondary prompt is detected regardless of whether primary prompt was detected or not. If WAIT 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)) @@ -986,14 +1089,45 @@ 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))) +;; This filter is active under `ess-command` (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* ((cmd-buf (process-get proc 'cmd-buffer)) + (cmd-delim (process-get proc 'cmd-output-delimiter))) + (when (buffer-live-p cmd-buf) + (ess--exit-protect + (progn + (with-current-buffer cmd-buf + (goto-char (point-max)) + (insert string)) + (if-let ((info (if cmd-delim + (ess--command-delimited-output-info cmd-buf cmd-delim) + (ess--command-output-info cmd-buf)))) + (let ((new-output (ess--command-set-status proc cmd-buf info))) + (ess-if-verbose-write + "ess-command (filter): Found prompt\n") + (when (not (process-get proc 'busy)) + ;; Store new output until restoration + (when new-output + (process-put proc 'pending-output new-output)) + ;; Restore the user's process filter as soon as process is + ;; available + (funcall (process-get proc 'cmd-restore-function)) + ;; Run callback with command output + (when (process-get proc 'callbacks) + (inferior-ess-run-callback proc (with-current-buffer cmd-buf + (buffer-string)))))) + (ess-if-verbose-write + "ess-command (filter): Accumulating output\n"))) + ;; Be defensive when something goes wrong. Restore process to a + ;; usable state. + (ess-if-verbose-write + "ess-command (filter): Early exit\n") + (process-put proc 'busy nil) + (funcall (process-get proc 'cmd-restore-function)))))) (defvar ess-presend-filter-functions nil "List of functions to call before sending the input string to the process. @@ -1022,7 +1156,7 @@ process buffer is appended to the hook from the current buffer.") ;; also run proc buffer local hooks (functions (unless (eq pbuf (current-buffer)) (buffer-local-value 'ess-presend-filter-functions pbuf)))) - (setq functions (append (delq t (copy-sequence functions)) ;; even in let, delq distructs + (setq functions (append (delq t (copy-sequence functions)) ;; even in let, delq destructs ess-presend-filter-functions)) (while (and functions string) ;; cannot use run-hook-with-args here because string must be passed from one @@ -1067,7 +1201,7 @@ Hide all the junk output in temporary buffer." ;; this is to avoid putting junk in user's buffer on process ;; interruption (set-process-buffer proc buf) - (set-process-filter proc 'inferior-ess-ordinary-filter) + (set-process-filter proc #'inferior-ess-ordinary-filter) (interrupt-process proc) (when cb (ess-if-verbose-write "executing interruption callback ... ") @@ -1086,8 +1220,8 @@ Hide all the junk output in temporary buffer." "ESS wrapper for `process-send-string'. Run `comint-input-filter-functions' and current buffer's and PROCESS' `ess-presend-filter-functions' hooks on the input -STRING. VISIBLY can be nil, t, 'nowait or a string. If string -the behavior is as with 'nowait with the differences that +STRING. VISIBLY can be nil, t, \\='nowait or a string. If string +the behavior is as with \\='nowait with the differences that inserted string is VISIBLY instead of STRING (evaluated command is still STRING). In all other cases the behavior is as described in `ess-eval-visibly'. STRING need not end with @@ -1161,8 +1295,7 @@ type of the region." (if source-buffer (with-current-buffer source-buffer (when (buffer-modified-p) (save-buffer)) - (ess-force-buffer-current "Process to load into: ") - (ess-check-modifications)) + (ess-force-buffer-current "Process to load into: ")) (ess-force-buffer-current "Process to load into: ")))) ;;;###autoload @@ -1200,19 +1333,37 @@ 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 inferior-ess--output-delimiter-count 0) +(defun inferior-ess--output-delimiter () + (setq inferior-ess--output-delimiter-count (1+ inferior-ess--output-delimiter-count)) + (format "ess-output-delimiter%s" inferior-ess--output-delimiter-count)) + +(defvar ess--command-default-timeout most-positive-fixnum) + +;; NOTE: We might want to switch to something 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 30 +seconds. 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 +`ess-local-process-name'. This command doesn't set \\='last-eval process variable. Note: for critical, or error prone code you should consider @@ -1225,50 +1376,134 @@ wrapping the code into: })" (let ((out-buffer (or out-buffer (get-buffer-create " *ess-command-output*"))) (proc (ess-command--get-proc proc no-prompt-check)) - ;; 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)) + (delim (inferior-ess--output-delimiter)) + (timeout (or timeout ess--command-default-timeout))) (with-current-buffer (process-buffer proc) - (let ((primary-prompt inferior-ess-primary-prompt) - (oldpb (process-buffer proc)) - (oldpf (process-filter proc)) - (oldpm (marker-position (process-mark proc)))) - (ess-if-verbose-write (format "(ess-command %s ..)" cmd)) + (let* ((proc-forward-alist (ess--alist (ess-local-process-name + inferior-ess-primary-prompt))) + (format-command-alist (ess-process-get 'format-command-alist)) + (use-delimiter (alist-get 'use-delimiter format-command-alist)) + (rich-cmd (if-let ((cmd-fun (alist-get 'fun format-command-alist))) + (funcall cmd-fun + (ess--strip-final-newlines cmd) + (cons 'output-delimiter delim)) + cmd)) + (early-exit t)) + (ess-if-verbose-write (format "(ess-command '%s' ..)\n" cmd)) ;; Swap the process buffer with the output buffer before ;; sending the command (unwind-protect - (progn - (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) - (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) - ;; 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 - (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") - ;; Restore the process buffer in its previous state - (set-process-buffer proc oldpb) - (set-process-filter proc oldpf) - (set-marker (process-mark proc) oldpm)))) + (condition-case err + (progn + ;; The process is restored from the filter once it's + ;; available again (i.e. a prompt or delimiter is + ;; detected). This handles the synchronous case when the + ;; command runs to completion, as well as the + ;; asynchronous case when an early exit occurs. The most + ;; common cause of early exits are interrupts sent by + ;; Emacs when the user types (see `when-no-input'). In + ;; these cases we forward the interrupt to the process + ;; and return to the caller right away. We can't restore + ;; synchronously after an interrupt because the output + ;; of the background command would spill into the + ;; process buffer of the user when the process doesn't + ;; interrupt in time. + (process-put proc 'cmd-restore-function + (ess--command-make-restore-function proc)) + (when use-delimiter + (process-put proc 'cmd-output-delimiter delim)) + (process-put proc 'cmd-buffer out-buffer) + (set-process-filter proc #'inferior-ess-ordinary-filter) + (with-current-buffer out-buffer + (ess-setq-vars-local proc-forward-alist) + (setq buffer-read-only nil) + (erase-buffer) + (inferior-ess-mark-as-busy proc) + (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! + (unless (ess-wait-for-process proc nil wait force-redisplay timeout) + (error "Timeout during background ESS command `%s'" + (ess--strip-final-newlines cmd)))) + (setq early-exit nil))) + (error (setq early-exit err)) + (quit (setq early-exit err))) + (if early-exit + (ess--command-error-handler proc out-buffer use-delimiter delim early-exit) + (with-current-buffer out-buffer + (goto-char (point-min)) + (when (re-search-forward (ess--delimiter-error-start-re) nil t) + (let ((start (1+ (match-beginning 1)))) + (when (re-search-forward (ess--delimiter-error-end-re) nil t) + (let ((end (match-beginning 1))) + (error "R error during background ESS command `%s'\nError: %s" + (ess--strip-final-newlines cmd) + (buffer-substring start end))))))))))) out-buffer)) +(defun ess--command-error-handler (proc + out-buffer + use-delimiter + delim + early-exit) + (let ((inhibit-quit t)) + ;; In case of early exit send an interrupt to the + ;; process to abort the command + (with-current-buffer out-buffer + (goto-char (point-min)) + (when (and use-delimiter + (not (re-search-forward (ess--delimiter-start-re delim) nil t))) + ;; CMD probably failed to parse if the start delimiter + ;; can't be found in the output. Disable the delimiter + ;; before interrupt to avoid a freeze. + (ess-write-to-dribble-buffer + "Disabling output delimiter because CMD failed to parse\n") + (process-put proc 'cmd-output-delimiter nil)) + (goto-char (point-max)) + (ess--interrupt proc))) + ;; Can be `t` when early exit is caused e.g. by a throw instead of + ;; an error or a quit. This happens in tests and within + ;; `while-no-input'. + (unless (eq early-exit t) + (when (and (eq (car early-exit) 'quit) + (y-or-n-p (concat "Background background command interrupted with a user quit.\n" + "Would you like to disable background evaluations in this process?"))) + (process-put proc 'bg-eval-disabled t)) + (signal (car early-exit) (cdr early-exit)))) + +;; (ess-process-get 'ess-format-command-alist) +;; "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-delimiter' : Whether to wait for an output sentinel. If +;; non-nil, `fun' should get the `cmd-output-delimiter' element of the +;; alist of parameters and ensure the sentinel is written to the +;; process output at the end of the command." + +(defun ess--command-make-restore-function (proc) + (let ((old-pf (process-filter proc))) + (lambda () + (set-process-filter proc old-pf) + (process-put proc 'cmd-output-delimiter nil) + (process-put proc 'cmd-buffer nil) + (when-let ((pending (process-get proc 'pending-output))) + (process-put proc 'pending-output nil) + (funcall old-pf proc pending))))) + +;; 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. @@ -1280,14 +1515,8 @@ Example (ess-boolean-command \"2>1\n\")" (defun ess-string-command (com &optional buf wait) "Returns the output of COM as a string." - (let ((prompt inferior-ess-prompt)) - (with-current-buffer (ess-command com buf nil nil wait) - (goto-char (point-min)) - ;; remove leading prompt - (when (and prompt (re-search-forward (concat "^" prompt) (point-at-eol) t)) - (delete-region (point-min) (match-end 0))) - (ess-kill-last-line) - (buffer-substring (point-min) (point-max))))) + (with-current-buffer (ess-command com buf nil nil wait) + (buffer-substring (point-min) (point-max)))) (defun ess-async-command (com &optional buf proc callback interrupt-callback) "Asynchronous version of `ess-command'. @@ -1345,7 +1574,7 @@ of `ess-async-command' with an explicit interrupt-callback." (defun ess-load-library () "Prompt and load dialect specific library/package/module. -Note that in R these are called 'packages' and the name of this +Note that in R these are called `packages' and the name of this function has nothing to do with R package mechanism, but it rather serves a generic, dialect independent purpose. It is also similar to `load-library' Emacs function." @@ -1366,40 +1595,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 +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 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)) @@ -1410,26 +1637,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 @@ -1446,7 +1677,8 @@ they might throw off the debugger." (ess-blink-region start end)) (goto-char end) (skip-chars-backward "\n\t ") - (setq end (point)))) + (setq end (point)) + (cons start end))) (defun ess-eval-region (start end vis &optional message type) "Send the region from START to END to the inferior ESS process. @@ -1473,15 +1705,17 @@ the lines of the rectangle separately to the inferior process." (defun ess--eval-region (start end vis &optional message type) "Helper function for `ess-eval-region', which see. START, END, VIS, MESSAGE, and TYPE described there." - (ess-eval-region--normalise-region start end) - (let ((visibly (if vis (not ess-eval-visibly) ess-eval-visibly)) - (message (or message "Eval region")) - (proc (ess-get-process))) - (save-excursion - (ess-send-region proc start end visibly message type))) - (when ess-eval-deactivate-mark - (ess-deactivate-mark)) - (list start end)) + (let* ((se (ess-eval-region--normalise-region start end)) + (start (car se)) + (end (cdr se))) + (let ((visibly (if vis (not ess-eval-visibly) ess-eval-visibly)) + (message (or message "Eval region")) + (proc (ess-get-process))) + (save-excursion + (ess-send-region proc start end visibly message type))) + (when ess-eval-deactivate-mark + (ess-deactivate-mark)) + (list start end))) (defun ess-eval-buffer (&optional vis) "Send the current buffer to the inferior ESS process. @@ -1521,7 +1755,7 @@ Prefix arg VIS toggles visibility of ess-code as for (setq msg (format "Eval function: %s" (if (looking-at add-log-current-defun-header-regexp) (match-string 1) - (buffer-substring (point) (point-at-eol))))) + (buffer-substring (point) (line-end-position))))) (setq beg (point)) (end-of-defun) (setq end (point)) @@ -1537,7 +1771,7 @@ Prefix arg VIS toggles visibility of ess-code as for Prefix arg VIS toggles visibility of ess-code as for `ess-eval-region'." (interactive "P") (let ((start-pos (point))) - (if (= (point-at-bol) (point-min)) + (if (= (line-beginning-position) (point-min)) (ess-next-code-line 0) ;; Evaluation is forward oriented (forward-line -1) @@ -1553,8 +1787,8 @@ Prefix arg VIS toggles visibility of ess-code as for `ess-eval-region'." "Send the current function if \\[point] is inside one. Otherwise send the current paragraph to the inferior ESS process. Prefix arg VIS toggles visibility of ess-code as for -`ess-eval-region'. Returns 'function if a function was evaluated -or 'paragraph if a paragraph." +`ess-eval-region'. Returns \\='function if a function was evaluated +or \\='paragraph if a paragraph." (interactive "P") (condition-case nil (progn (ess-eval-function vis) @@ -1628,8 +1862,8 @@ input will fail." "Send the current line to the inferior ESS process. VIS has same meaning as for `ess-eval-region'." (interactive "P") - (let* ((beg (point-at-bol)) - (end (point-at-eol)) + (let* ((beg (line-beginning-position)) + (end (line-end-position)) (msg (format "Loading line: %s" (buffer-substring beg end)))) (ess-eval-region beg end vis msg))) @@ -1673,7 +1907,8 @@ Evaluate all comments and empty lines." (interactive) (let ((ess-eval-visibly nil)) (ess-eval-line-and-step))) -(define-obsolete-function-alias 'ess-eval-line-and-step-invisibly 'ess-eval-line-invisibly-and-step "18.10") +(define-obsolete-function-alias 'ess-eval-line-and-step-invisibly + #'ess-eval-line-invisibly-and-step "18.10") ;;;*;;; Evaluate and switch to S @@ -1854,9 +2089,10 @@ node `(ess)Top'. If you accidentally suspend your process, use "]: %s")) ;;; Completion support ---------------- - (remove-hook 'completion-at-point-functions 'comint-completion-at-point t) ;; reset the hook - (add-hook 'completion-at-point-functions 'comint-c-a-p-replace-by-expanded-history nil 'local) - (add-hook 'completion-at-point-functions 'ess-filename-completion nil 'local) + (remove-hook 'completion-at-point-functions #'comint-completion-at-point t) ;; reset the hook + (add-hook 'completion-at-point-functions + #'comint-c-a-p-replace-by-expanded-history nil 'local) + (add-hook 'completion-at-point-functions #'ess-filename-completion nil 'local) ;; hyperlinks support (goto-address-mode t) @@ -1990,13 +2226,13 @@ If in the output field, goes to the beginning of previous input." (if (looking-at inferior-ess-prompt) ; cust.var, might not include sec-prompt (progn (comint-skip-prompt) - (setq command (buffer-substring-no-properties (point) (point-at-eol))) + (setq command (buffer-substring-no-properties (point) (line-end-position))) (when inferior-ess-secondary-prompt (while (progn (forward-line 1) (looking-at inferior-ess-secondary-prompt)) - (re-search-forward inferior-ess-secondary-prompt (point-at-eol) t) + (re-search-forward inferior-ess-secondary-prompt (line-end-position) t) (setq command (concat command "\n" - (buffer-substring-no-properties (point) (point-at-eol)))))) + (buffer-substring-no-properties (point) (line-end-position)))))) (forward-line -1) command) (message "No command at this point") @@ -2008,6 +2244,17 @@ If in the output field, goes to the beginning of previous input." (inferior-ess--get-old-input:regexp) (inferior-ess--get-old-input:field))) +(defun ess-can-eval-in-background (&optional proc) + "Can the current process be used for background commands. +Inspects the `ess-can-eval-in-background' variable as well as the +`bg-eval-disabled' property of PROC or of the current process, if +any. This makes it possible to disable background evals for a +specific process, for instance in case it was not initialized +properly." + (when ess-can-eval-in-background + (when-let ((proc (or proc (ess-get-current-process)))) + (not (process-get proc 'bg-eval-disabled))))) + ;;;*;;; Hot key commands @@ -2034,8 +2281,8 @@ A negative prefix argument gets the objects for that position (ess-execute the-command invert "S objects" the-message))) (defun ess-execute-search (invert) - "Send the `inferior-ess-search-list-command' command to the `ess-language' process. -[search(..) in S]" + "Send the `inferior-ess-search-list-command' command. +INVERT is as in `ess-execute'. E.g. search(..) in S." (interactive "P") (ess-execute inferior-ess-search-list-command invert "S search list")) @@ -2061,6 +2308,8 @@ Also sets the \"length\" option to 99999. When INVISIBLY is non-nil, don't echo to R subprocess. This is a good thing to put in `ess-r-post-run-hook' or `ess-S+-post-run-hook'." (interactive) + (ess-if-verbose-write + (format "ess-execute-screen-options: invisibly=%s\n" invisibly)) (if (null ess-execute-screen-options-command) (message "Not implemented for '%s'" ess-dialect) (let ((command (ess-calculate-width 'window))) @@ -2068,16 +2317,26 @@ in `ess-r-post-run-hook' or `ess-S+-post-run-hook'." (ess-command command) (ess-eval-linewise command nil nil nil 'wait-prompt))))) +;; Runs in background if inferior is not busy +(defun ess--execute-screen-options-bg () + (when (and ess-execute-screen-options-command + (inferior-ess-available-p)) + (ess-execute-screen-options t))) + (defun ess-calculate-width (opt) "Calculate width command given OPT. -OPT can be 'window, 'frame, or an integer. Return a command -suitable to send to the inferior process (e.g. \"options(width=80, length=999999)\")." +OPT can be \\='window, \\='frame, or an integer. Return a command +suitable to send to the inferior process (e.g. +\"options(width=80, length=999999)\")." (when (null ess-execute-screen-options-command) (error "Not implemented for %s" ess-dialect)) (let (command) - (cond ((integerp opt) + (cond ((and (integerp opt) + (>= opt 0)) (setq command (format ess-execute-screen-options-command opt))) - ((eql 'window opt) + ((or (eql 'window opt) + (and (integerp opt) + (> 0 opt))) ;; We cannot use (window-width) here because it returns sizes ;; in default (frame) characters which leads to incorrect ;; sizes with scaled fonts.To solve this we approximate font @@ -2086,6 +2345,9 @@ suitable to send to the inferior process (e.g. \"options(width=80, length=999999 (let* ((wedges (window-inside-pixel-edges)) (wwidth (- (nth 2 wedges) (nth 0 wedges))) (nchars (floor (/ wwidth (default-font-width))))) + (when (and (integerp opt) + (> 0 opt)) + (setq nchars (- nchars (- opt)))) (setq command (format ess-execute-screen-options-command nchars)))) ((eql 'frame opt) @@ -2115,7 +2377,7 @@ buffers." "Send a command to the ESS process. A newline is automatically added to COMMAND. Prefix arg (or second arg INVERT) means invert the meaning of -`ess-execute-in-process-buffer'. If INVERT is 'buffer, output is +`ess-execute-in-process-buffer'. If INVERT is \\='buffer, output is forced to go to the process buffer. If the output is going to a buffer, name it *BUFF*. This buffer is erased before use. Optional fourth arg MESSAGE is text to print at the top of the buffer (defaults @@ -2151,11 +2413,12 @@ to the command if BUFF is not given.)" ;;;*;;; Quitting (cl-defgeneric ess-quit--override (_arg) - "Stops the inferior process" + "Stop the inferior process." (let ((proc (ess-get-process))) (ess-cleanup) - (goto-char (marker-position (process-mark proc))) - (insert inferior-ess-exit-command) + (when ess-eval-visibly + (goto-char (marker-position (process-mark proc))) + (insert inferior-ess-exit-command)) (process-send-string proc inferior-ess-exit-command))) (defun ess-quit (&optional arg) @@ -2170,23 +2433,27 @@ method, see `ess-quit--override'." (ess-make-buffer-current) (ess-quit--override arg)) +(defvar ess--interrupt-timeout 5) + (defun ess-interrupt () "Interrupt the inferior process. This sends an interrupt and quits a debugging session." (interactive) (inferior-ess-force) (let ((proc (ess-get-process))) - ;; 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)))) + (ess--interrupt proc) + (unless (ess-wait-for-process proc nil nil nil + ess--interrupt-timeout) + (error "Timeout while interrupting process")) + (with-current-buffer (process-buffer proc) + (goto-char (process-mark proc))))) + +(defun ess--interrupt (proc) + (interrupt-process proc comint-ptyp) + ;; Workaround for Windows terminals. NOTE: Is this really needed + ;; for background commands? Or just for interactive interrupts? + (unless (memq system-type '(gnu/linux darwin)) + (process-send-string nil "\n"))) (defun ess-abort () "Kill the ESS process, without executing .Last or terminating devices. @@ -2242,12 +2509,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-function nil) + (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) @@ -2258,13 +2529,13 @@ START-ARGS gets passed to the dialect-specific (user-error "Reloading not implemented for %s" ess-dialect)) (defun inferior-ess--wait-for-exit (proc) - "Wait for process exit. + "Wait for process PROC to exit. This should be used instead of `ess-wait-for-process' for waiting after issuing a quit command as the latter assumes a live process." (let ((start-time (float-time))) (while (eq (process-status proc) 'run) (accept-process-output proc 0.002) - (when (> (- (float-time) start-time) 1) + (when (> (- (float-time) start-time) 30) (error "Timeout while quitting process"))))) @@ -2313,9 +2584,9 @@ Returns nil if that file cannot be found, i.e., for R or any non-S language!" (> (car (cdr mod1)) (car (cdr mod2))))))) (defun ess-get-object-list (name &optional exclude-first) - "Return a list of current S object names associated with process NAME, -using `ess-object-list' if that is non-nil. -If exclude-first is non-nil, don't return objects in first positon (.GlobalEnv)." + "Return a list of current S object names associated with process NAME. +Uses `ess-object-list' if that is non-nil. If EXCLUDE-FIRST is +non-nil, don't return objects in first position (.GlobalEnv)." (or ess-object-list ;; <<- MM: this is now always(?) nil; we cache the *-modtime-alist (with-current-buffer (process-buffer (ess-get-process name)) (ess-make-buffer-current) @@ -2344,12 +2615,14 @@ If exclude-first is 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'. -FILTER may be the keyword 'non-... or nil. To avoid truncation of +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}); print(out, max=1e6) })\n\"." @@ -2367,7 +2640,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) @@ -2379,6 +2652,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." @@ -2469,7 +2746,7 @@ name that contains :,$ or @." (goto-char (point-min)) (when (re-search-forward "(list" nil t) (goto-char (match-beginning 0)) - (setq args (ignore-errors (eval (read (current-buffer))))) + (setq args (ignore-errors (eval (read (current-buffer)) t))) (when args (setcar args (cons (car args) (current-time))))) ;; push even if nil @@ -2520,7 +2797,7 @@ directory in the `load-path'." (setq ess-object-name-db temp-object-name-db))) (defun ess-resynch nil - "Reread all directories/objects in variable `ess-search-list' to form completions." + "Reread all directories and objects in `ess-search-list' for completions." (interactive) (if (ess-make-buffer-current) nil (error "Not an ESS process buffer")) @@ -2547,6 +2824,7 @@ directory in the `load-path'." (defun ess-complete-filename () "Do file completion only within strings." + (declare (obsolete comint-filename-completion "ESS 19.04")) (save-restriction ;; explicitly handle inferior-ess (ignore-errors (when (and (derived-mode-p 'inferior-ess-mode) @@ -2560,6 +2838,7 @@ directory in the `load-path'." ;; Heuristic: after partial pathname if it looks like we're in a ;; string, and that string looks like a pathname. Not the best for ;; use with unix() (or it's alias, !). Oh well. + (declare (obsolete comint-filename-completion "ESS 19.04")) (save-excursion (save-match-data (let ((opoint (point))) @@ -2659,7 +2938,7 @@ don't recompile first object in the search list." (defun ess-search-path-tracker (str) "Check if input STR changed the search path. This function monitors user input to the inferior ESS process so -that Emacs can keep the process variable 'search-list' up to +that Emacs can keep the process variable `search-list' up to date. `ess-completing-read' in \\[ess-read-object-name] uses this list indirectly when it prompts for help or for an object to dump. From ESS 12.09 this is not necessary anymore, as the search @@ -2719,7 +2998,7 @@ P-STRING is the prompt string." (defvar ess--handy-history nil) (defun ess-handy-commands () - "Request and execute a command from `ess-handy-commands' list." + "Request and execute a command from variable `ess-handy-commands'." (interactive) (let* ((commands (or ess--local-handy-commands ess-handy-commands)) @@ -2728,8 +3007,8 @@ P-STRING is the prompt string." (car ess--handy-history)))) (call-interactively (cdr (assoc (ess-completing-read "Execute" - (sort (mapcar 'car commands) - 'string-lessp) + (sort (mapcar #'car commands) + #'string-lessp) nil t nil 'ess--handy-history hist) commands))))) @@ -2767,14 +3046,14 @@ NO-ERROR prevents errors when this has not been implemented for (with-parsed-tramp-file-name path v v-localname) path))) (ess-eval-linewise (format ess-setwd-command lpath)) - ;; use set instead of setq to take effect even when let bound - (set 'default-directory (file-name-as-directory path))) + (ess-set-process-variable 'default-directory + (file-name-as-directory path))) (unless no-error (error "Not implemented for dialect %s" ess-dialect)))) -(defalias 'ess-change-directory 'ess-set-working-directory) +(defalias 'ess-change-directory #'ess-set-working-directory) (define-obsolete-function-alias - 'ess-use-dir 'ess-set-working-directory "ESS 18.10") + 'ess-use-dir #'ess-set-working-directory "ESS 18.10") (defun ess-use-this-dir (&rest _ignore) "Set the current process directory to the directory of this file. @@ -2795,13 +3074,15 @@ NO-ERROR prevents errors when this has not been implemented for (defun ess-synchronize-dirs () "Set Emacs' current directory to be the same as the subprocess directory. To be used in `ess-idle-timer-functions'." - (when (and ess-can-eval-in-background + (when (and (ess-can-eval-in-background) ess-getwd-command (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 + (file-name-as-directory + (ess--derive-connection-path default-directory lpath)))) default-directory))) (defun ess-dirs () @@ -2810,9 +3091,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 () @@ -2823,7 +3114,7 @@ To be used in `ess-idle-timer-functions'." (defun ess-cache-search-list () "To be used in `ess-idle-timer-functions', to set search path related variables." - (when (and ess-can-eval-in-background + (when (and (ess-can-eval-in-background) inferior-ess-search-list-command) (ess-when-new-input last-cache-search-list (let ((path (ess-search-list 'force)) @@ -2873,9 +3164,7 @@ bol) and load each chunk separately." "Check whether loading this file would overwrite some ESS objects which have been modified more recently than this file, and confirm if this is the case." - ;; FIXME: this should really cycle through all top-level assignments in - ;; the buffer - ;;VS[02-04-2012|ESS 12.03]: this is sooo ugly + (declare (obsolete "Do not use" "21.04")) (when (> (length ess-change-sp-regexp) 0) (and (buffer-file-name) ess-filenames-map (let ((sourcemod (nth 5 (file-attributes (buffer-file-name)))) diff --git a/elpa/ess-20191014.1343/ess-jags-d.el b/elpa/ess-20230419.1527/ess-jags-d.el similarity index 95% rename from elpa/ess-20191014.1343/ess-jags-d.el rename to elpa/ess-20230419.1527/ess-jags-d.el index fcf7b872..5700f337 100644 --- a/elpa/ess-20191014.1343/ess-jags-d.el +++ b/elpa/ess-20230419.1527/ess-jags-d.el @@ -1,25 +1,28 @@ ;;; ess-jags-d.el --- ESS[JAGS] dialect -*- lexical-binding: t; -*- -;; Copyright (C) 2008-2011 Rodney Sparapani +;; Copyright (C) 2009-2022 Free Software Foundation, Inc. ;; Author: Rodney Sparapani ;; Created: 13 March 2008 -;; Maintainer: ESS-help +;; Maintainer: ESS Core Team -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Code: @@ -243,7 +246,7 @@ (setq ess-language "S") ; mimic S for ess-smart-underscore (unless (and (fboundp 'w32-shell-dos-semantics) (w32-shell-dos-semantics)) - (add-hook 'comint-output-filter-functions 'ess-bugs-exit-notify-sh)) + (add-hook 'comint-output-filter-functions #'ess-bugs-exit-notify-sh)) ) ;;;###autoload diff --git a/elpa/ess-20191014.1343/ess-julia.el b/elpa/ess-20230419.1527/ess-julia.el similarity index 85% rename from elpa/ess-20191014.1343/ess-julia.el rename to elpa/ess-20230419.1527/ess-julia.el index 5f244236..56548e4a 100644 --- a/elpa/ess-20191014.1343/ess-julia.el +++ b/elpa/ess-20230419.1527/ess-julia.el @@ -1,51 +1,49 @@ ;; ess-julia.el --- ESS julia mode and inferior interaction -*- lexical-binding: t; -*- -;; -;; Copyright (C) 2012-2015 Vitalie Spinu and the ESS Core team. -;; + +;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Author: Vitalie Spinu ;; Maintainer: Vitalie Spinu ;; Created: 02-04-2012 (ESS 12.03) ;; Keywords: ESS, julia + +;; This file is part of GNU Emacs. + +;;; License: ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; -;; This file is *NOT* part of GNU Emacs. -;; This file is part of ESS -;; -;; This program 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 3, or +;; This program 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 3 of the License, or ;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ -;; -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; + ;;; Commentary: -;; + ;; Customize inferior-julia-program to point to your julia binary ;; and start the inferior with M-x julia. -;; + ;; As of Sept 2015, this file depends heavily on julia-mode.el from the Julia ;; sources. If you install ESS using `make', this will work fine, otherwise ;; ensure that julia-mode.el is on your path before loading this file. -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; + ;;; Code: (require 'ess-help) (require 'ess-inf) (require 'ess-r-mode) (require 'ess-utils) -(require 'julia-mode) +;; Don't require `julia-mode' to compile this file. +(when t (require 'julia-mode)) +(declare-function julia-mode "julia-mode" ()) +(declare-function julia-latexsub "julia-mode" ()) +(defvar julia-mode-syntax-table) (defvar ac-prefix) (declare-function company-in-string-or-comment "company") @@ -70,11 +68,11 @@ 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))) -(defun ess-julia--retrive-topics (url) +(defun ess-julia--retrieve-topics (url) (with-current-buffer (url-retrieve-synchronously url) (require 'url) (goto-char (point-min)) @@ -92,7 +90,7 @@ VISIBLY is not currently used." "Look up topics at https://docs.julialang.org/en/latest/manual/." (let* ((pages (or ess-julia--manual-topics (setq ess-julia--manual-topics - (ess-julia--retrive-topics + (ess-julia--retrieve-topics "https://docs.julialang.org/en/latest/")))) (page (ess-completing-read "Lookup:" pages nil t))) (browse-url (get-text-property 1 :manual page)))) @@ -120,14 +118,14 @@ See `comint-input-sender'." ;;; COMPLETION (defun ess-julia-latexsub-completion () - "Complete latex input, and return format required by `completion-at-point-functions'." + "Complete latex input in format required by `completion-at-point-functions'." (if (julia-latexsub) ; julia-latexsub returns nil if it performed a completion, the point otherwise nil (lambda () t) ;; bypass other completion methods )) (defun ess-julia-object-completion () - "Return completions at point in a format required by `completion-at-point-functions'." + "Return completions in format required by `completion-at-point-functions'." (let ((proc (ess-get-next-available-process ess-dialect t)) (beg (ess-symbol-start))) (if proc @@ -139,7 +137,7 @@ See `comint-input-sender'." (+ beg 1 (length obj)) beg))) (list beg (point) - (nreverse (mapcar 'car (ess-julia--get-objects proc obj))) + (nreverse (mapcar #'car (ess-julia--get-objects proc obj))) :exclusive 'no))) (when (string-match "complet" (symbol-name last-command)) (message "No ESS process of dialect %s started" ess-dialect) @@ -157,7 +155,7 @@ See `comint-input-sender'." (defun ess-julia--get-objects (&optional proc obj) "Return all available objects. -Local caching might be used. If MODULE is givven, return only +Local caching might be used. If MODULE is given, return only objects from that MODULE." (setq proc (or proc (ess-get-process))) (when (stringp proc) @@ -172,7 +170,7 @@ objects from that MODULE." (or (cdr (assoc obj objects)) ;; don't cache composite objects and datatypes (ess-julia--get-components proc obj)) - ;; this segment is entered when user completon at top level is + ;; this segment is entered when user completion at top level is ;; requested, either Tab or AC. Hence Main is always updated. (let ((modules (ess-get-words-from-vector "ESS.main_modules()\n" nil nil proc)) @@ -193,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 @@ -233,7 +231,7 @@ objects from that MODULE." (declare-function company-begin-backend "company.el") -(defun company-ess-julia-objects (command &optional arg &rest ignored) +(defun company-ess-julia-objects (command &optional arg &rest _ignored) (interactive (list 'interactive)) (cl-case command (interactive (company-begin-backend 'company-ess-julia-objects)) @@ -260,16 +258,17 @@ 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." - (when (and ess-can-eval-in-background +to look up any doc strings. Honors `eldoc-echo-area-use-multiline-p'." + (when (and (ess-can-eval-in-background) (ess-process-live-p) (not (ess-process-get 'busy))) (let ((funname (or (and ess-eldoc-show-on-symbol ;; aggressive completion (symbol-name (ess-symbol-at-point))) - (car (ess--fn-name-start))))) + (car (ess--fn-name-start)))) + (multiline (eq t eldoc-echo-area-use-multiline-p))) (when funname (let* ((args (copy-sequence (nth 2 (ess-function-arguments funname)))) (W (- (window-width (minibuffer-window)) (+ 4 (length funname)))) @@ -278,9 +277,8 @@ to look up any doc strings." (setq args (sort args (lambda (s1 s2) (< (length s1) (length s2))))) (setq doc (concat doc (pop args))) - (while (and args (< (+ (length doc) (length (car args))) W)) - (setq doc (concat doc " " - (pop args)))) + (while (and args (or multiline (< (+ (length doc) (length (car args))) W))) + (setq doc (concat doc " " (pop args)))) (when (and args (< (length doc) W)) (setq doc (concat doc " {--}"))) doc)))))) @@ -291,7 +289,7 @@ to look up any doc strings." '((inferior-ess-primary-prompt . "\\w*> ") (inferior-ess-secondary-prompt . nil) (inferior-ess-prompt . "\\w*> ") - (ess-local-customize-alist . 'ess-julia-customize-alist) + (ess-local-customize-alist . ess-julia-customize-alist) (inferior-ess-program . inferior-julia-program) (ess-load-command . "include(expanduser(\"%s\"))\n") (ess-funargs-command . "ESS.fun_args(\"%s\")\n") @@ -362,18 +360,16 @@ It makes underscores and dots word constituent chars.") (setq ess-dialect "julia") (ess-setq-vars-local ess-julia-customize-alist) ;; eldoc - (add-function :before-until (local 'eldoc-documentation-function) - #'ess-julia-eldoc-function) - (when ess-use-eldoc (eldoc-mode)) + (ess--setup-eldoc #'ess-julia-eldoc-function) ;; auto-complete (ess--setup-auto-complete '(ac-source-ess-julia-objects)) ;; company (ess--setup-company '(company-ess-julia-objects)) ;; for emacs >= 24 - (remove-hook 'completion-at-point-functions 'ess-filename-completion 'local) ;; should be first - (add-hook 'completion-at-point-functions 'ess-julia-object-completion nil 'local) - (add-hook 'completion-at-point-functions 'ess-filename-completion nil 'local) - (add-hook 'completion-at-point-functions 'ess-julia-latexsub-completion nil 'local) + (remove-hook 'completion-at-point-functions #'ess-filename-completion 'local) ;; should be first + (add-hook 'completion-at-point-functions #'ess-julia-object-completion nil 'local) + (add-hook 'completion-at-point-functions #'ess-filename-completion nil 'local) + (add-hook 'completion-at-point-functions #'ess-julia-latexsub-completion nil 'local) (if (fboundp 'ess-add-toolbar) (ess-add-toolbar))) ;; Inferior mode @@ -389,17 +385,15 @@ It makes underscores and dots word constituent chars.") (setq comint-prompt-regexp (concat "^" inferior-ess-prompt)) (setq ess-dialect "julia") ;; eldoc - (add-function :before-until (local 'eldoc-documentation-function) - #'ess-julia-eldoc-function) - (when ess-use-eldoc (eldoc-mode)) + (ess--setup-eldoc #'ess-julia-eldoc-function) ;; auto-complete (ess--setup-auto-complete '(ac-source-ess-julia-objects) t) ;; company (ess--setup-company '(company-ess-julia-objects) t) - (remove-hook 'completion-at-point-functions 'ess-filename-completion 'local) ;; should be first - (add-hook 'completion-at-point-functions 'ess-julia-object-completion nil 'local) - (add-hook 'completion-at-point-functions 'ess-filename-completion nil 'local) - (add-hook 'completion-at-point-functions 'ess-julia-latexsub-completion nil 'local) + (remove-hook 'completion-at-point-functions #'ess-filename-completion 'local) ;; should be first + (add-hook 'completion-at-point-functions #'ess-julia-object-completion nil 'local) + (add-hook 'completion-at-point-functions #'ess-filename-completion nil 'local) + (add-hook 'completion-at-point-functions #'ess-julia-latexsub-completion nil 'local) (setq comint-input-sender #'ess-julia-input-sender)) (defvar ess-julia-mode-hook nil) diff --git a/elpa/ess-20191014.1343/ess-mode.el b/elpa/ess-20230419.1527/ess-mode.el similarity index 93% rename from elpa/ess-20191014.1343/ess-mode.el rename to elpa/ess-20230419.1527/ess-mode.el index 84a4b3f8..4bc3583f 100644 --- a/elpa/ess-20191014.1343/ess-mode.el +++ b/elpa/ess-20230419.1527/ess-mode.el @@ -1,27 +1,30 @@ ;;; ess-mode.el -- Emacs Speaks Statistics root mode. -*- lexical-binding: t; -*- -;; -;; Copyright (C) 1994-2018 ESS Core Team + +;; Copyright (C) 1994-2022 Free Software Foundation, Inc. ;; Maintainer: ESS-core + +;; This file is part of GNU Emacs. + +;;; License: ;; -;; Keywords: languages -;; -;; This file is part of ESS -;; -;; This file is free software; you can redistribute it and/or modify +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ -;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; + ;;; Commentary: -;; +;; This file defines ess-mode from which other modes (like ess-r-mode) +;; derive. + ;;; Code: (require 'ess) @@ -32,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" ()) @@ -96,9 +99,12 @@ map) "Keymap for `ess-mode'.") -;; Redefine substituted commands -(substitute-key-definition 'indent-new-comment-line - 'ess-indent-new-comment-line +;; Redefine `indent-new-comment-line' commands for Emacs < 26. Emacs +;; 27 binds M-j to `default-indent-new-line' which calls +;; `comment-line-break-function' if point is in a comment. We set this +;; function in the mode init. +(substitute-key-definition #'indent-new-comment-line + #'ess-indent-new-comment-line ess-mode-map global-map) (defvar ess-extra-map @@ -144,7 +150,7 @@ ["R" R :help "Start a new R process" :active t] ["S" S :help "Start a new S process" :active t] ["Sqpe" Sqpe ess-microsoft-p] ;; :help "Start a new Sqpe process" :active t - ["S+6-exisiting" S+6-existing ess-microsoft-p] ;; :help "Access an existing S process" :active t + ["S+6-existing" S+6-existing ess-microsoft-p] ;; :help "Access an existing S process" :active t ["SAS" SAS-menu t] ;; :help "Start a new SAS process" :active t ;; The following menu item "Other" is a place-holder that will ;; be replaced with the other versions of R and Sqpe that can be run. @@ -295,16 +301,15 @@ indentation style. See `ess-style-alist' for predefined styles." (ess-setq-vars-local alist)) (when-let ((alist ess-mode-editing-alist)) (ess-setq-vars-local alist)) - ;; Keep out of the code. (setq-local indent-tabs-mode nil) - + (setq-local comment-line-break-function #'ess-newline-and-indent) (setq mode-line-process '(" [" (:eval (ess--get-mode-line-indicator)) ess--local-mode-line-process-indicator "]")) - (add-hook 'ess-idle-timer-functions 'ess-synchronize-dirs nil 'local)) + (add-hook 'ess-idle-timer-functions #'ess-synchronize-dirs nil 'local)) (defun ess--get-mode-line-indicator () "Get `ess--mode-line-process-indicator' from process buffer. @@ -314,7 +319,8 @@ Internal function to be used for dynamic mode-line display in (let* ((proc (get-process ess-local-process-name)) (buff (when proc (process-buffer proc)))) (if (and proc (buffer-live-p buff)) - (with-current-buffer buff (mapcar 'eval ess--mode-line-process-indicator)) + (with-current-buffer buff + (mapcar (lambda (e) (eval e t)) ess--mode-line-process-indicator)) "none")) "none")) @@ -387,7 +393,8 @@ Otherwise go to the end of paragraph." (ess-goto-end-of-function-or-para) (exchange-point-and-mark)) -(define-obsolete-function-alias 'ess-mark-function 'ess-mark-function-or-para "15.09") +(define-obsolete-function-alias 'ess-mark-function + #'ess-mark-function-or-para "15.09") (defun ess-narrow-to-defun-or-para () "Make text outside current function invisible. @@ -402,7 +409,13 @@ current function." (point)))) (narrow-to-region beg end)))) -(define-obsolete-function-alias 'ess-narrow-to-defun 'ess-narrow-to-defun-or-para "15.09") +(define-obsolete-function-alias 'ess-narrow-to-defun + #'ess-narrow-to-defun-or-para "15.09") + +;; FIXME: Support soft breaks with `insert-and-inherit'. See +;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Hard-and-Soft-Newlines.html +(defun ess-newline-and-indent (&optional _soft) + (ess-indent-new-comment-line)) (defun ess-indent-new-comment-line () "Like `indent-new-comment-line' but accounts for roxygen comments." @@ -503,7 +516,7 @@ instead of indenting." (defun ess-indent-or-complete () "When region is selected indent the region. -Otherwise, if `tab-always-indent' is 'complete, try to indent, if +Otherwise, if `tab-always-indent' is \\='complete, try to indent, if code is already indented, complete instead. Also see `ess-first-tab-never-complete'." (interactive) @@ -655,7 +668,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) diff --git a/elpa/ess-20191014.1343/ess-pkg.el b/elpa/ess-20230419.1527/ess-pkg.el similarity index 77% rename from elpa/ess-20191014.1343/ess-pkg.el rename to elpa/ess-20230419.1527/ess-pkg.el index 5bdb9ac4..094240ac 100644 --- a/elpa/ess-20191014.1343/ess-pkg.el +++ b/elpa/ess-20230419.1527/ess-pkg.el @@ -1,7 +1,6 @@ -(define-package "ess" "20191014.1343" "Emacs Speaks Statistics" - '((emacs "25.1") - (julia-mode "0.3")) - :authors +(define-package "ess" "20230419.1527" "Emacs Speaks Statistics" + '((emacs "25.1")) + :commit "5c4ae91cefa5c56fd13b204a9a996825af836a67" :authors '(("David Smith" . "dsmith@stats.adelaide.edu.au") ("A.J. Rossini" . "blindglobe@gmail.com") ("Richard M. Heiberger" . "rmh@temple.edu") @@ -14,6 +13,8 @@ ("Vitalie Spinu" . "spinuvit@gmail.com") ("Lionel Henry" . "lionel.hry@gmail.com") ("J. Alexander Branham" . "alex.branham@gmail.com")) + :maintainers + '(("ESS Core Team" . "ESS-core@r-project.org")) :maintainer '("ESS Core Team" . "ESS-core@r-project.org") :url "https://ess.r-project.org/") diff --git a/elpa/ess-20191014.1343/ess-r-completion.el b/elpa/ess-20230419.1527/ess-r-completion.el similarity index 81% rename from elpa/ess-20191014.1343/ess-r-completion.el rename to elpa/ess-20230419.1527/ess-r-completion.el index 2eeca6e5..3c388cb4 100644 --- a/elpa/ess-20191014.1343/ess-r-completion.el +++ b/elpa/ess-20230419.1527/ess-r-completion.el @@ -1,34 +1,31 @@ ;;; ess-r-completion.el --- R completion -*- lexical-binding: t; -*- -;; -;; Copyright (C) 2015 A.J. Rossini, Richard M. Heiberger, Martin Maechler, Kurt -;; Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. -;; + +;; Copyright (C) 2015-2022 Free Software Foundation, Inc. ;; Author: Vitalie Spinu ;; Maintainer: ESS-core + +;; This file is part of GNU Emacs. + +;;; License: ;; -;; Keywords: languages, statistics -;; -;; This file is part of ESS. -;; -;; This file is free software; you can redistribute it and/or modify +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ -;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; + ;;; Commentary: -;; -;;; Code: +;; Provide completion support in R buffers. - -;;; ElDoc +;;; Code: (require 'cl-lib) (require 'ess-inf) @@ -49,47 +46,47 @@ :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." - (when (and eldoc-mode ess-can-eval-in-background) - (let* ((proc (ess-get-next-available-process)) - (funname (and proc (or (and ess-eldoc-show-on-symbol ;; Aggressive completion - (thing-at-point 'symbol)) - (car (ess--fn-name-start)))))) - (when funname - (let* ((args (ess-function-arguments funname proc)) - (bargs (cadr args)) - (doc (mapconcat (lambda (el) - (if (equal (car el) "...") - "..." - (concat (car el) "=" (cdr el)))) - bargs ", ")) - (margs (nth 2 args)) - (W (- (window-width (minibuffer-window)) (+ 4 (length funname)))) - doc1) - (when doc - (setq doc (ess-eldoc-docstring-format funname doc)) - (when (and margs (< (length doc1) W)) - (setq doc1 (concat doc (propertize " || " 'face font-lock-function-name-face))) - (while (and margs (< (length doc1) W)) - (let ((head (pop margs))) - (unless (assoc head bargs) - (setq doc doc1 - doc1 (concat doc1 head "=, "))))) - (when (equal (substring doc -2) ", ") - (setq doc (substring doc 0 -2))) - (when (and margs (< (length doc) W)) - (setq doc (concat doc " {--}")))) - doc)))))) - -(defun ess-eldoc-docstring-format (funname doc) + (when eldoc-mode + (when-let ((proc (ess-get-next-available-bg-process)) + (funname (or (and ess-eldoc-show-on-symbol ;; Aggressive completion + (thing-at-point 'symbol)) + (car (ess--fn-name-start))))) + (let* ((args (ess-function-arguments funname proc)) + (bargs (cadr args)) + (doc (mapconcat (lambda (el) + (if (equal (car el) "...") + "..." + (concat (car el) "=" (cdr el)))) + bargs ", ")) + (margs (nth 2 args)) + (W (- (window-width (minibuffer-window)) (+ 4 (length funname)))) + (multiline (eq t eldoc-echo-area-use-multiline-p)) + doc1) + (when doc + (setq doc (ess-eldoc-docstring-format funname doc (not multiline))) + (when (or multiline (and margs (< (length doc1) W))) + (setq doc1 (concat doc (propertize " || " 'face font-lock-function-name-face))) + (while (and margs (< (length doc1) W)) + (let ((head (pop margs))) + (unless (assoc head bargs) + (setq doc doc1 + doc1 (concat doc1 head "=, "))))) + (when (equal (substring doc -2) ", ") + (setq doc (substring doc 0 -2))) + (when (and margs (< (length doc) W)) + (setq doc (concat doc " {--}")))) + doc))))) + +(defun ess-eldoc-docstring-format (funname doc &optional truncate) (save-match-data - (let* (;; (name (symbol-name sym)) - (truncate (or (not (eq t eldoc-echo-area-use-multiline-p)) - (eq ess-eldoc-abbreviation-style 'aggressive))) - ;; Subtract 1 from window width since will cause a wraparound and + (let* (;; Subtract 1 from window width since will cause a wraparound and ;; resize of the echo area. (W (1- (- (window-width (minibuffer-window)) (+ 2 (length funname)))))) @@ -139,16 +136,15 @@ to look up any doc strings." doc ;;AGGRESSIVE filter (truncate what is left) (concat (substring doc 0 (- W 4)) "{--}"))))))))) - (when (and truncate - (> (length doc) W)) + (when (and truncate (> (length doc) W)) (setq doc (concat (substring doc 0 (- W 4)) "{--}"))) (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'." + "Return completions at point as required in `completion-at-point-functions'." (if (ess-make-buffer-current) (let* ((funstart (cdr (ess--fn-name-start))) (completions (ess-r-get-rcompletions funstart)) @@ -258,7 +254,7 @@ token. Needs version of R >= 2.7.0." (ess-get-words-from-vector cmd))) (defun ess-r-complete-object-name () - "Completion in R via R's completion utilities (formerly 'rcompgen'). + "Completion in R via R's completion utilities (formerly `rcompgen'). To be used instead of ESS' completion engine for R versions >= 2.7.0." (let ((possible-completions (ess-r-get-rcompletions)) token-string) @@ -295,12 +291,12 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0." (setq ess--cached-sp-objects (cdr ess-sl-modtime-alist))) ;; reread new package, but not rda, much faster and not needed anyways (process-put *proc* 'sp-for-ac-changed? nil))) - (apply 'append + (apply #'append (cl-cddar ess-sl-modtime-alist) ; .GlobalEnv - (mapcar 'cddr ess--cached-sp-objects))))) + (mapcar #'cddr ess--cached-sp-objects))))) -;;; ARGUMENTS +;;;*;;; ARGUMENTS (defvar ess-r--funargs-pre-cache '(("plot" @@ -324,11 +320,11 @@ 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." - (let ((proc (ess-get-next-available-process))) + (let ((proc (ess-get-next-available-bg-process))) (if (null proc) "No free ESS process found" (let ((buf (get-buffer-create " *ess-command-output*"))) @@ -345,7 +341,7 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0." (defun ess-r-get-arg-help-string (sym &optional proc) "Help string for ac." (setq sym (replace-regexp-in-string " *= *\\'" "" sym)) - (let ((proc (or proc (ess-get-next-available-process)))) + (let ((proc (ess-get-next-available-bg-process proc))) (if (null proc) "No free ESS process found" (let ((fun (car ess--fn-name-start-cache))) @@ -356,10 +352,10 @@ 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) +(defun company-R-objects (command &optional arg &rest _ignored) (interactive (list 'interactive)) (cl-case command (interactive (company-begin-backend 'company-R-objects)) @@ -367,13 +363,12 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0." (let ((start (ess-symbol-start))) (when start (buffer-substring-no-properties start (point)))))) - (candidates (let ((proc (ess-get-next-available-process))) - (when proc - (with-current-buffer (process-buffer proc) - (all-completions arg (ess--get-cached-completions arg)))))) + (candidates (when-let ((proc (ess-get-next-available-bg-process))) + (with-current-buffer (process-buffer proc) + (all-completions arg (ess--get-cached-completions arg))))) (doc-buffer (company-doc-buffer (ess-r-get-object-help-string arg))))) -(defun company-R-args (command &optional arg &rest ignored) +(defun company-R-args (command &optional arg &rest _ignored) (interactive (list 'interactive)) (cl-case command (interactive (company-begin-backend 'company-R-args)) @@ -385,25 +380,27 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0." (cons prefix (>= (length prefix) ess-company-arg-prefix-length)) prefix)))))) - (candidates (let* ((proc (ess-get-next-available-process)) - (args (delete "..." (nth 2 (ess-function-arguments - (car ess--fn-name-start-cache) proc)))) - (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)))))) + (candidates (when-let ((proc (ess-get-next-available-bg-process))) + (let* ((args (delete "..." (nth 2 (ess-function-arguments + (car ess--fn-name-start-cache) proc)))) + (args (mapcar (lambda (a) (concat a ess-R-argument-suffix)) + args))) + (all-completions arg args)))) + ;; 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) + (when-let ((proc (ess-get-next-available-bg-process))) + (when (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))))) -(defun company-R-library (command &optional arg &rest ignored) +(defun company-R-library (command &optional arg &rest _ignored) (interactive (list 'interactive)) (cl-case command (interactive (company-begin-backend 'company-R-library)) @@ -411,7 +408,8 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0." '("library" "require")) (let ((start (ess-symbol-start))) (and start (buffer-substring start (point)))))) - (candidates (all-completions arg (ess-installed-packages))) + (candidates (when (ess-can-eval-in-background) + (all-completions arg (ess-installed-packages)))) (annotation "") (duplicates nil) (sorted t))) @@ -421,8 +419,9 @@ To be used instead of ESS' completion engine for R versions >= 2.7.0." (defun ess-r-package-completion () "Return installed packages if in a call to library or require. Return format suitable for `completion-at-point-functions'." - (when (member (car (ess--fn-name-start)) - '("library" "require")) + (when (and (ess-can-eval-in-background) + (member (car (ess--fn-name-start)) + '("library" "require"))) (list (ess-symbol-start) (point) (ess-installed-packages) @@ -430,8 +429,8 @@ Return format suitable for `completion-at-point-functions'." (lambda (_) " ")))) -;;; 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 diff --git a/elpa/ess-20191014.1343/ess-r-flymake.el b/elpa/ess-20230419.1527/ess-r-flymake.el similarity index 80% rename from elpa/ess-20191014.1343/ess-r-flymake.el rename to elpa/ess-20230419.1527/ess-r-flymake.el index dc00a3a1..dae24679 100644 --- a/elpa/ess-20191014.1343/ess-r-flymake.el +++ b/elpa/ess-20230419.1527/ess-r-flymake.el @@ -1,35 +1,34 @@ ;;; ess-r-flymake.el --- A ess-r Flymake backend -*- lexical-binding: t; -*- -;; -;; Copyright (C) 2018 J. Alexander Branham (alex DOT branham AT gmail DOT com) -;; Copyright (C) 2018 ESS-core team + +;; Copyright (C) 2018-2022 Free Software Foundation, Inc. ;; Maintainer: ESS-core + + +;; This file is part of GNU Emacs. + +;;; License: ;; -;; This file is NOT part of GNU Emacs. -;; -;; This 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 3, or (at your option) any later -;; version. +;; This program 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 3 of the License, or +;; (at your option) any later version. ;; -;; This 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 -;; for more details. +;; This program 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 for more details. ;; ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -;; MA 02110-1301 USA. -;; +;; along with this program. If not, see +;; + ;;; Commentary: -;; + ;; Flymake is the built-in Emacs package that supports on-the-fly ;; syntax checking. This file adds support for this in ess-r-mode by ;; relying on the lintr package, available on CRAN and currently ;; hosted at https://github.com/jimhester/lintr. -;; -;; It is enabled by default. -;; + ;;; Code: (eval-when-compile (require 'cl-lib)) @@ -41,6 +40,8 @@ (declare-function flymake-diag-region "flymake") (declare-function flymake-make-diagnostic "flymake") (declare-function flymake--overlays "flymake") +(declare-function ess-r-project "ess-r-mode") +(declare-function ess-r-package-project "ess-r-package") (defcustom ess-r-flymake-linters '("closed_curly_linter = NULL" @@ -60,8 +61,8 @@ "trailing_whitespace_linter = NULL") "Default linters to use. Can be either a string with R expression to be used as -is (e.g. 'lintr::default_linters'). Or a list of strings where -each element is passed as argument to 'lintr::with_defaults'." +is (e.g. `lintr::default_linters'). Or a list of strings where +each element is passed as argument to `lintr::with_defaults'." :group 'ess-R :type '(choice string (repeat string)) :package-version '(ess . "18.10")) @@ -98,26 +99,22 @@ each element is passed as argument to 'lintr::with_defaults'." (defun ess-r--find-lintr-file () "Return the absolute path to the .lintr file. Check first the current directory, then the project root, then -the user's home directory. Return nil if we couldn't find a .lintr file." - (let ((cur-dir-file (expand-file-name ".lintr" default-directory)) - (ess-proj-file (and (fboundp 'ess-r-package-project) - (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)))))) - (home-file (expand-file-name ".lintr" (getenv "HOME")))) - (cond (;; current directory - (file-readable-p cur-dir-file) - cur-dir-file) - ;; Project root according to `ess-r-package-project' - ((and ess-proj-file - (file-readable-p ess-proj-file)) - ess-proj-file) - ;; Project root according to `project-roots' - ((and proj-file - (file-readable-p proj-file))) - ;; Home directory +the package root, then the user's home directory. Return nil if +we couldn't find a .lintr file." + ;; VS[2022-01-26]: Can't this entire thing be replaced by + ;; `(locate-dominating-file ".lintr")`? + (let* ((cur-file (expand-file-name ".lintr" default-directory)) + (pkg (cdr (ess-r-package-project))) + (pkg-file (and pkg (expand-file-name ".lintr" pkg))) + (proj (ess-r-project)) + (proj-file (and proj (expand-file-name ".lintr" proj))) + (home-file (expand-file-name ".lintr" (getenv "HOME")))) + (cond ((file-readable-p cur-file) + cur-file) + ((and proj-file (file-readable-p proj-file)) + proj-file) + ((and pkg-file (file-readable-p pkg-file)) + pkg-file) ((file-readable-p home-file) home-file)))) @@ -158,7 +155,7 @@ into a list and call REPORT-FN on it." (if (ess-r--flymake-check-errors) (with-current-buffer src-buffer ;; we are in the sentinel here; don't throw but remove our hook instead - (remove-hook 'flymake-diagnostic-functions 'ess-r-flymake t)) + (remove-hook 'flymake-diagnostic-functions #'ess-r-flymake t)) (goto-char (point-min)) (cl-loop while (search-forward-regexp diff --git a/elpa/ess-20191014.1343/ess-r-mode.el b/elpa/ess-20230419.1527/ess-r-mode.el similarity index 78% rename from elpa/ess-20191014.1343/ess-r-mode.el rename to elpa/ess-20230419.1527/ess-r-mode.el index 64aed8e2..bd902710 100644 --- a/elpa/ess-20191014.1343/ess-r-mode.el +++ b/elpa/ess-20230419.1527/ess-r-mode.el @@ -1,30 +1,27 @@ -;;; ess-r-mode.el --- R customization - -;; Copyright (C) 1997--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2017 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. +;;; ess-r-mode.el --- R customization -*- lexical-binding: t; -*- +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: A.J. Rossini ;; Created: 12 Jun 1997 ;; Maintainer: ESS-core -;; Keywords: languages, statistics - -;; This file is part of ESS. +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -50,26 +47,33 @@ (declare-function ess-rdired "ess-rdired" ()) -(define-obsolete-variable-alias 'R-mode-hook 'ess-r-mode-hook "19.04") (defcustom ess-r-mode-hook nil "Hook run when entering `ess-r-mode'." :options '(electric-layout-local-mode) :type 'hook :group 'ess-R) +;; Define and run old hook for backward compatibility. We don't +;; obsolete it with warnings because this is a historically important +;; user-facing variable and it would not be worth the trouble. +(defvar R-mode-hook nil + "This variable is obsolete since ESS 19.04; +use `ess-r-mode-hook' instead.") +(add-hook 'ess-r-mode-hook (lambda () (run-hooks 'R-mode-hook))) (defcustom ess-r-fetch-ESSR-on-remotes nil - "If non-nil, fetch ESSR from the GitHub repository. -Otherwise source from local ESS installation. When 'ess-remote, -fetch only with `ess-remote'. When t, always fetch from remotes. -Change this variable when loading ESSR code on remotes fails -systematically. + "If non-nil, when loading ESSR, fetch it from the GitHub repository. +Otherwise source from local ESS installation. When the value is +\\='ess-remote, fetch only with ess-remote's and not with TRAMP +connections. When t, always fetch from remotes. Change this +variable when loading ESSR code on remotes fails for you. Fetching happens once per new ESSR version. The archive is stored -in ~/.config/ESSR/ folder. You can download and place it there -manually if the remote has restricted network access." +in ~/.config/ESSR/ESSRv[VERSION].rds file. You can download and +place it there manually if the remote has restricted network +access." :type '(choice (const nil :tag "Never") - (const 'ess-remote :tag "With ess-remote only") + (const ess-remote :tag "With ess-remote only") (const t :tag "Always")) :group 'ess-R) @@ -79,22 +83,13 @@ manually if the remote has restricted network access." ;; TODO: Refactor so as to not rely on dynamic scoping. After that ;; refactor, also remove the file-local-variable byte-compile-warnings ;; (not lexical) at the bottom. -(defvar block) (defvar containing-sexp) (defvar indent-point) -(defvar infinite) -(defvar last-newline) -(defvar last-pos) -(defvar offset) -(defvar prefix-break) (defvar prev-containing-sexp) -(defvar start-pos) -(defvar style) -(defvar type) (define-obsolete-variable-alias 'ess-r-versions 'ess-r-runner-prefixes "ESS 19.04") (defcustom ess-r-runner-prefixes - (let ((r-ver '("R-1" "R-2" "R-3" "R-devel" "R-patched"))) + (let ((r-ver '("R-1" "R-2" "R-3" "R-4" "R-5" "R-6" "R-7" "R-devel" "R-patched"))) (if (eq system-type 'darwin) (append r-ver '("R32" "R64")) r-ver)) "List of partial strings for versions of R to access within ESS. Each string specifies the start of a filename. If a filename @@ -110,6 +105,7 @@ searching for other versions of R. Setting this variable directly does not take effect; use either \\[customize-option] or set the value by using `ess-r-runners-reset'." :group 'ess-R + :package-version '(ess . "19.04") :type '(repeat string) :set #'ess-r-runners-reset ;; Use `custom-initialize-default' since we call @@ -283,10 +279,10 @@ value by using `ess-r-runners-reset'." (modify-syntax-entry ?: "." table) (modify-syntax-entry ?@ "." table) (modify-syntax-entry ?$ "." table) + (modify-syntax-entry ?\\ "." table) table) "Syntax table for `ess-r-mode'.") - (defvar ess-r-completion-syntax-table (let ((table (copy-syntax-table ess-r-mode-syntax-table))) (modify-syntax-entry ?. "_" table) @@ -303,6 +299,59 @@ When t, loading a file into a namespaced will output information about which objects are exported and which stay hidden in the namespace.") +;; The syntax class for '\' is punctuation character to handle R 4.1 +;; lambdas. Inside strings it should be treated as an escape +;; character which we ensure here. +(defun ess-r--syntax-propertize-backslash () + (when (nth 3 (save-excursion (syntax-ppss (1- (point))))) + (string-to-syntax "\\"))) + +;; Adapted from `python-syntax-stringify' +(defun ess-r--syntax-propertize-raw-string-opening () + (let* ((raw-beg (match-beginning 0)) + (quote-beg (1+ raw-beg)) + (ppss (save-excursion (goto-char raw-beg) (syntax-ppss))) + (string-start (and (eq t (nth 3 ppss)) (nth 8 ppss)))) + (cond + ;; Inside a comment + ((nth 4 ppss) + nil) + ;; This set of quotes delimits the start of a string + ((null string-start) + (put-text-property quote-beg (1+ quote-beg) + 'syntax-table (string-to-syntax "|")))))) + +(defun ess-r--syntax-propertize-raw-string-closing () + (let* ((quote-end (match-end 0)) + (quote-chr (aref (match-string 3) 0)) + (dashes (match-string 2)) + (matching-delim (pcase (match-string 1) + (`")" ?\() (`"}" ?{) (`"]" ?\[))) + (ppss (save-excursion (goto-char quote-end) (syntax-ppss))) + (string-start (and (eq t (nth 3 ppss)) (nth 8 ppss)))) + (when string-start + (save-match-data + (save-excursion + (goto-char string-start) + (when (equal (char-after) quote-chr) + (forward-char) + (re-search-forward "-*" nil t) + (let ((matching-dashes (match-string 0))) + (when (or (not matching-dashes) + (string= matching-dashes dashes)) + (when (equal (char-after) matching-delim) + (put-text-property (1- quote-end) quote-end + 'syntax-table (string-to-syntax "|"))))))))))) + +(defconst ess-r--syntax-propertize-function + (syntax-propertize-rules + ("[rR]\\([\"']\\)\\(-*\\)\\([([{]\\)" + (0 (ignore (ess-r--syntax-propertize-raw-string-opening)))) + ("\\([])}]\\)\\(-*\\)\\([\"']\\)" + (0 (ignore (ess-r--syntax-propertize-raw-string-closing)))) + ("\\\\" + (0 (ess-r--syntax-propertize-backslash))))) + (defun ess-r-font-lock-syntactic-face-function (state) (if (nth 3 state) ;; string case @@ -317,7 +366,7 @@ namespace.") 'ess-operator-face) (if (cdr (assq 'ess-R-fl-keyword:%op% ess-R-font-lock-keywords)) 'ess-%op%-face - 'default))) + nil))) ((save-excursion (and (cdr (assq 'ess-R-fl-keyword:fun-defs ess-R-font-lock-keywords)) (ess-goto-char string-end) @@ -331,11 +380,19 @@ namespace.") (ess-looking-at "("))) ess-function-call-face) ((eq (nth 3 state) ?`) - 'default) + nil) (t font-lock-string-face))) font-lock-comment-face)) +;; Don't fontify backquoted symbols as strings +(defun inferior-ess-r-font-lock-syntactic-face-function (state) + (if (nth 3 state) + (if (eq (nth 3 state) ?`) + nil + font-lock-string-face) + font-lock-comment-face)) + (defvar ess-r--non-fn-kwds '("in" "else" "break" "next" "repeat")) @@ -420,6 +477,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-delimiter args))) + (ess-r--format-call ".ess.command(local(%s), '%s')\n" cmd sentinel))) + +(defvar ess-r-format-command-alist + '((fun . ess-r-format-command) + (use-delimiter . t))) + (defvar ess-r-dump-filename-template (replace-regexp-in-string "S$" "R" ess-dump-filename-template-proto)) @@ -447,18 +512,20 @@ fill=TRUE); try(traceback(), silent=TRUE)})\n") ) "Alist of (key . string) pairs for use in help section searching.") -(defvar ess-r-error-regexp-alist '(R R1 R2 R3 R4 R-recover) +(defvar ess-r-error-regexp-alist '(R R1 R2 R3 R4 R-rlang R-recover) "List of symbols which are looked up in `compilation-error-regexp-alist-alist'.") (dolist (l '(;; Takes precedence over R1 below in English locales, and allows spaces in file path - (R "\\(\\(?: at \\|(@\\)\\([^#()\n]+\\)[#:]\\([0-9]+\\)\\)" 2 3 nil 2 1) - ;; valgrind style (stl_numeric.h:183) - (R1 "(\\([^ ):\n]+\\):\\([0-9]+\\)?)" 1 2 nil 2) + (R "\\(\\(?: at \\|(@\\)\\([^#()\n:]+\\)[#:]\\([0-9]+\\)\\)" 2 3 nil 2 1) + ;; valgrind, testthat, rlang/shiny style + ;; e.g. (stl_numeric.h:183), (test-parsers.R:238:3) [.../R/file.R#158] + (R1 "\\s(\\([^0-9][^ ():\n]+\\)[#:]\\([0-9]+\\)[#:]?\\([0-9]+\\)?\\s)" 1 2 nil 2) (R2 "(\\(\\w+ \\([^())\n]+\\)#\\([0-9]+\\)\\))" 2 3 nil 2 1) ;; Precedes R4 and allows spaces in file path, Starts at bol or with ": " (patterns 3,4,5,6,9) (R3 "\\(?:^ *\\|: ?\\)\\([^-+[:digit:] \t\n]:?[^: \t\n]*\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\)?" 1 2 3 2 1) ;; Don't start with digit; no spaces (R4 "\\([^-+ [:digit:]][^: \t\n]+\\):\\([0-9]+\\):\\([0-9]+\\):" 1 2 3 2 1) + (R-rlang "^ *[0-9]+\\..* \\(\\([^ :]+\\):\\([0-9]+\\):\\([0-9]+\\)\\)$" 2 3 4 nil 1) (R-recover " *[0-9]+: +\\([^:\n\t]+?\\)#\\([0-9]+:\\)" 1 2 nil 2 1))) (cl-pushnew l compilation-error-regexp-alist-alist)) @@ -470,8 +537,18 @@ fill=TRUE); try(traceback(), silent=TRUE)})\n") ;;;*;;; Mode init (define-obsolete-variable-alias 'ess-R-post-run-hook 'ess-r-post-run-hook "ESS 18.10.2") + +;; We moved the set-wd instruction from `inferior-ess' to here to +;; avoid sending R code to gdb or lldb before we had a chance to +;; send "run". So this is no longer generic and inferior modes need +;; to call this manually. One way to fix this would be to make +;; `inferior-ess' a `cl-defgeneric'. (defvar ess-r-post-run-hook nil - "Functions run in process buffer after the initialization of R process.") + "Functions run in process buffer after the initialization of R process. +Make sure to call blocking commands (e.g. based on `ess-command') +first. Streaming commands (e.g. based on `ess-send-string') +should come last, otherwise they will make R busy and the +blocking commands will throw an error.") ;;;###autoload (defun run-ess-r (&optional start-args) @@ -490,8 +567,10 @@ will be prompted to enter arguments interactively." "\n(R): ess-dialect=%s, buf=%s, start-arg=%s\n current-prefix-arg=%s\n" ess-dialect (current-buffer) start-args current-prefix-arg)) (unless (or (file-remote-p default-directory) - (and ess-startup-directory - (file-remote-p ess-startup-directory)) + (when ess-startup-directory + (file-remote-p (if (symbolp ess-startup-directory) + (symbol-value ess-startup-directory) + ess-startup-directory))) ;; TODO: Once we drop Emacs 26 support, can probably ;; just use the REMOTE argument of `executable-find'. (executable-find inferior-ess-r-program)) @@ -507,8 +586,8 @@ will be prompted to enter arguments interactively." start-args) ((and start-args (listp start-args) - (cl-every 'stringp start-args)) - (mapconcat 'identity start-args " ")) + (cl-every #'stringp start-args)) + (mapconcat #'identity start-args " ")) (start-args (read-string (concat "Starting Args" @@ -536,51 +615,84 @@ will be prompted to enter arguments interactively." (ess-process-put 'callbacks '(inferior-ess-r--init-callback)) ;; Trigger the callback (process-send-string (get-buffer-process inf-buf) "r\n")) - (ess-wait-for-process) - (R-initialize-on-start) - (comint-goto-process-mark)) - (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)))) + (ess-r-initialize) + (comint-goto-process-mark))) + inf-buf))) ;;;###autoload -(defalias 'R #'run-ess-r) - -(defun inferior-ess-r--adjust-startup-directory (dir dialect) - "Adjust startup directory DIR if DIALECT is R. -If in a package project, prefer the tests directory but only if -the package directory was selected in the first place." - (if (string= dialect "R") - (let* ((project-dir (cdr (ess-r-package-project))) - (tests-dir (expand-file-name (file-name-as-directory "tests") - project-dir))) - (if (and project-dir - (string= project-dir dir) - (string= default-directory tests-dir)) - tests-dir - dir)) - dir)) +(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--init-callback (_proc _name) - (R-initialize-on-start)) + (ess-r-initialize)) -(defun R-initialize-on-start () +(defvar ess-r--init-timeout 5 + "Maximum time for R to become available on startup. +If the timeout is reached, an error is thrown advising the user +to run `ess-r-initialize' again.") + +(define-obsolete-function-alias 'R-initialize-on-start + #'ess-r-initialize "ESS 19.04") + +(defun ess-r-initialize () "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-load-ESSR) - (when inferior-ess-language-start - (ess-command (concat inferior-ess-language-start "\n"))) - ;; tracebug - (when ess-use-tracebug (ess-tracebug 1)) - (add-hook 'ess-presend-filter-functions 'ess-R-scan-for-library-call nil 'local) - (run-hooks 'ess-r-post-run-hook)) + (interactive) + (condition-case err + (progn + (unless (ess-wait-for-process nil nil nil nil ess-r--init-timeout) + (error "Process is busy")) + (ess-command (ess-r--init-options-command)) + (ess-r-load-ESSR)) + (error (ess-r--init-error-handler err)) + (quit (ess-r--init-error-handler))) + (ess-process-put 'format-command-alist ess-r-format-command-alist) + (ess-process-put 'bg-eval-disabled nil) + (ess-execute-screen-options t) + (ess-set-working-directory default-directory) + (when ess-use-tracebug + (ess-tracebug 1)) + (add-hook 'ess-presend-filter-functions #'ess-R-scan-for-library-call nil 'local) + ;; Wait before running user hook so they can call blocking commands + (ess-wait-for-process) + (run-hooks 'ess-r-post-run-hook) + (ess-wait-for-process)) + +(defun ess-r--init-error-handler (&optional err) + (ess-write-to-dribble-buffer "Failed to start ESSR\n") + (when-let ((proc (and ess-local-process-name + (get-process ess-local-process-name)))) + (process-put proc 'bg-eval-disabled t)) + (let ((msgs `("ESSR failed to start, please call `ess-r-initialize' to recover" + ,@(when err + (concat "Caused by error: " (error-message-string err)))))) + (error (mapconcat 'identity msgs "\n")))) + +;; FIXME: Should we stop setting `str.dendogram.last`? See: +;; https://emacs.stackexchange.com/questions/27673/ess-dendrograms-appearance-of-last-branch/27729#27729 +;; +;; FIXME: We don't use `ess-r-pager`? It's nil by default and +;; documented that this should not normally be set +(defun ess-r--init-options-command () + (let ((args (list (format "STERM = '%s'" ess-STERM) + "str.dendrogram.last = '\\''" + (format "editor = '%s'" ess-r-editor) + (ess-r--update-opt-if-eq "pager" + "file.path(R.home(), 'bin', 'pager')" + (format "'%s'" inferior-ess-pager)) + "show.error.locations = TRUE"))) + (format "options(%s)\n" (mapconcat 'identity args ", ")))) + +(defun ess-r--update-opt-if-eq (opt old new) + (let ((actual (format "getOption('%s')" opt))) + (format "%s = if (identical(%s, %s)) %s else %s" + opt + actual + old + new + actual))) (defun ess-r--skip-function () ;; Assumes the point is at function start @@ -688,6 +800,7 @@ top level functions only." (define-derived-mode ess-r-mode ess-mode "ESS[R]" "Major mode for editing R source. See `ess-mode' for more help." :group 'ess-R + (set-syntax-table ess-r-mode-syntax-table) (ess-setq-vars-local ess-r-customize-alist) (setq-local ess-font-lock-keywords 'ess-R-font-lock-keywords) (setq-local paragraph-start (concat "\\s-*$\\|" page-delimiter)) @@ -697,24 +810,24 @@ top level functions only." (setq-local comment-indent-function #'ess-calculate-indent) (setq-local add-log-current-defun-header-regexp "^\\(.+\\)\\s-+<-[ \t\n]*function") (setq-local font-lock-syntactic-face-function #'ess-r-font-lock-syntactic-face-function) + (setq-local syntax-propertize-function ess-r--syntax-propertize-function) (setq-local electric-layout-rules '((?{ . after))) ;; indentation (add-hook 'hack-local-variables-hook #'ess-set-style nil t) ;; eldoc - (add-function :before-until (local 'eldoc-documentation-function) - #'ess-r-eldoc-function) - (when ess-use-eldoc (eldoc-mode)) + (ess--setup-eldoc #'ess-r-eldoc-function) ;; auto-complete (ess--setup-auto-complete ess-r-ac-sources) ;; company (ess--setup-company ess-r-company-backends) (setq-local prettify-symbols-alist ess-r-prettify-symbols) (setq font-lock-defaults '(ess-build-font-lock-keywords nil nil ((?\. . "w") (?\_ . "w")))) - (remove-hook 'completion-at-point-functions 'ess-filename-completion 'local) ;; should be first - (add-hook 'completion-at-point-functions 'ess-r-object-completion nil 'local) + (remove-hook 'completion-at-point-functions #'ess-filename-completion 'local) ;; should be first + (add-hook 'completion-at-point-functions #'ess-r-object-completion nil 'local) (add-hook 'completion-at-point-functions #'ess-r-package-completion nil 'local) - (add-hook 'completion-at-point-functions 'ess-filename-completion nil 'local) + (add-hook 'completion-at-point-functions #'ess-filename-completion nil 'local) (add-hook 'xref-backend-functions #'ess-r-xref-backend nil 'local) + (add-hook 'project-find-functions #'ess-r-project nil 'local) (if (fboundp 'ess-add-toolbar) (ess-add-toolbar)) ;; imenu is needed for `which-function' @@ -725,9 +838,9 @@ top level functions only." (setq-local end-of-defun-function #'ess-r-end-of-defun) (ess-roxy-mode)) ;;;###autoload -(defalias 'R-mode 'ess-r-mode) +(defalias 'R-mode #'ess-r-mode) ;;;###autoload -(defalias 'r-mode 'ess-r-mode) +(defalias 'r-mode #'ess-r-mode) ;;;###autoload @@ -741,11 +854,69 @@ top level functions only." ;;;###autoload (add-to-list 'auto-mode-alist '("CITATION\\'" . ess-r-mode)) + +;;;*;;; Project detection + +(defvar-local ess-r-project--info-cache nil + "Current package info cache. +See `ess-r-project-info' for its structure.") + +(defun ess-r-project (&optional dir) + "Return the current project as an Emacs project instance. +R project is a directory XYZ containing either .Rprofile, +DESCRIPTION or XYZ.Rproj file. Return a list of the form (:name +\"XYZ\" :root \"/path/to/project\"). If DIR is provided, the +project is searched from that directory instead of +`default-directory'." + (let ((info (ess-r-project-info dir))) + (when (car info) + (cons 'ess-r-project (plist-get info :root))))) + +;; FIXME: remove when emacs 27 is dropped +(unless (eval-when-compile + (get 'project-roots 'byte-obsolete-info)) + (cl-defmethod project-roots ((project (head ess-r-project))) + "Return the project root for ESS R projects." + (list (cdr project)))) + +(cl-defmethod project-root ((project (head ess-r-project))) + "Return the project root for ESS R projects." + (cdr project)) + +(defun ess-r-project-info (&optional dir) + "Get the description of the R project in directory DIR. +Return an plist with the keys :name and :root. When not in a +project return \\='(nil). This value is cached buffer-locally for +efficiency reasons." + (let ((do-cache (null dir))) + (if (and do-cache ess-r-project--info-cache) + ess-r-project--info-cache + (setq dir (or dir (buffer-file-name) default-directory)) + (let ((out (or + (unless (file-remote-p dir) + (let ((dir (locate-dominating-file + dir + (lambda (dir) + (or (file-exists-p (expand-file-name ".Rprofile" dir)) + (file-exists-p (expand-file-name "DESCRIPTION" dir)) + (let ((nm (file-name-nondirectory (directory-file-name dir)))) + (file-exists-p (expand-file-name (concat nm ".Rproj") dir)))))))) + (when dir + (let ((dir (directory-file-name dir))) + (unless (member dir (list "~" (getenv "HOME"))) + (list :name (file-name-nondirectory dir) + :root (expand-file-name dir))))))) + '()))) + (when do-cache + (setq ess-r-project--info-cache out)) + out)))) + + ;;*;; Miscellaneous (defun ess-R-arch-2-bit (arch) - "Translate R's architecture shortcuts/directory names to 'bits'. + "Translate R's architecture shortcuts/directory names to `bits'. ARCH \"32\" or \"64\" (for now)." (if (string= arch "i386") "32" ;; else: @@ -758,8 +929,8 @@ Returns either Name, a string, or a (Name . Path) cons, such as (\"R-2.12.1-64bit\" . \"C:/Program Files/R/R-2.12.1/bin/x64/Rterm.exe\") \"R-x.y.z/bin/Rterm.exe\" will return \"R-x.y.z\", for R-2.11.x and older. -\"R-x.y.z/bin/i386/Rterm.exe\" will return \"R-x.y.z-32bit\", for R-2.12.x and newer. -\"R-x.y.z/bin/x64/Rterm.exe\" will return \"R-x.y.z-64bit\", for R-2.12.x and newer." +\"R-x.y.z/bin/i386/Rterm.exe\" return \"R-x.y.z-32bit\", for R-2.12.x and newer. +\"R-x.y.z/bin/x64/Rterm.exe\" return \"R-x.y.z-64bit\", for R-2.12.x and newer." (let* ((dir (directory-file-name (file-name-directory long-path))) (dir2 (directory-file-name (file-name-directory dir))) (v-1up (file-name-nondirectory dir));; one level up @@ -815,7 +986,8 @@ as `ess-r-created-runners' upon ESS initialization." (defun ess-r-redefine-runners (&optional verbose) "Regenerate runners, i.e. `M-x R-*` possibilities. - Call `fmakunbound' on all elements of `ess-r-created-runners', then define new runners." + Call `fmakunbound' on all elements of `ess-r-created-runners', + then define new runners." (interactive "P") (dolist (f ess-r-created-runners) (fmakunbound (intern f))) @@ -829,7 +1001,7 @@ Set SYM to VAL and call `ess-r-redefine-runners'." (ess-r-redefine-runners)) (define-obsolete-function-alias - 'ess-r-versions-create 'ess-r-define-runners "ESS 18.10") + 'ess-r-versions-create #'ess-r-define-runners "ESS 18.10") (defvar ess-newest-R nil "Stores the newest version of R that has been found. @@ -879,7 +1051,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") @@ -903,7 +1078,7 @@ returned." rver) " --version")))) (when (string-match - "R \\(version \\)?[1-9][^\n]+ (\\(2[0-9-]+\\)\\( r[0-9]+\\)?)" + "R \\(version \\)?[1-9][^\n]+ (\\(2[0-9-]+\\)\\( r[0-9]+\\)?" ver-string) (setq date (match-string 2 ver-string))) (cons date rver))) @@ -911,7 +1086,8 @@ returned." (defun ess-current-R-version () "Get the version of R currently running in the ESS buffer as a string." (ess-make-buffer-current) - (car (ess-get-words-from-vector "as.character(.ess.Rversion)\n"))) + (car (ess-get-words-from-vector (format "base::as.character(%s)\n" + (ess-r--format-call ".ess.Rversion"))))) (defun ess-current-R-at-least (version) "Is the version of R (in the ESS buffer) at least (\">=\") VERSION ? @@ -920,7 +1096,9 @@ Examples: (ess-current-R-at-least '2.7.0) (ess-make-buffer-current) (string= "TRUE" (car (ess-get-words-from-vector - (format "as.character(.ess.Rversion >= \"%s\")\n" version))))) + (format "base::as.character(%s >= \"%s\")\n" + (ess-r--format-call ".ess.Rversion") + version))))) (defun ess-find-newest-date (rvers) "Find the newest version of R given in the a-list RVERS. Each element of RVERS is a dotted pair (date . R-version), where @@ -977,9 +1155,6 @@ use \"bin/Rterm.exe\"." (if (file-exists-p R-path) R-path))) R-ver)))) -(cl-defmethod ess-font-lock-keywords (&context (major-mode ess-r-transcript-mode)) - 'ess-R-font-lock-keywords) - ;;;###autoload (define-derived-mode ess-r-transcript-mode ess-transcript-mode "ESS R Transcript" "A Major mode for R transcript files." @@ -998,10 +1173,10 @@ use \"bin/Rterm.exe\"." (setq font-lock-defaults '(ess-build-font-lock-keywords nil nil ((?\. . "w") (?\_ . "w") (?' . "."))))) -(fset 'r-transcript-mode 'ess-r-transcript-mode) +(defalias 'r-transcript-mode #'ess-r-transcript-mode) ;;;###autoload -(add-to-list 'auto-mode-alist '("\\.[Rr]out" . ess-r-transcript-mode)) +(add-to-list 'auto-mode-alist '("\\.[Rr]out\\'" . ess-r-transcript-mode)) ;;;###autoload (add-to-list 'interpreter-mode-alist '("Rscript" . ess-r-mode)) ;;;###autoload @@ -1020,7 +1195,7 @@ not issue messages." (goto-char from) (ess-rep-regexp "\\(\\([][=,()]\\|<-\\) *\\)F\\>" "\\1FALSE" 'fixcase nil (not quietly)))) -(define-obsolete-function-alias 'R-fix-T-F 'ess-r-fix-T-F +(define-obsolete-function-alias 'R-fix-T-F #'ess-r-fix-T-F "ESS 18.10") (defvar ess--packages-cache nil @@ -1042,7 +1217,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)))) @@ -1070,7 +1245,7 @@ With argument UPDATE, update cached packages list." (match-string 2 url))) (ess-command (format mirror-cmd ess--CRAN-mirror))))) (message "CRAN mirror: %s" (car (ess-get-words-from-vector "getOption('repos')[['CRAN']]\n")))) -(define-obsolete-function-alias 'ess-setCRANMiror 'ess-set-CRAN-mirror "ESS 18.10") +(define-obsolete-function-alias 'ess-setCRANMiror #'ess-set-CRAN-mirror "ESS 18.10") (defun ess-r-check-install-package (pkg) "Check if package PKG is installed and offer to install if not." @@ -1095,13 +1270,13 @@ 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(TRUE), max=1e6)\n")) (cl-defmethod ess-load-library--override (pack &context (ess-dialect "R")) "Load an R package." (ess-eval-linewise (format "library('%s')\n" pack))) -(define-obsolete-function-alias 'ess-library 'ess-load-library "ESS[12.09-1]") +(define-obsolete-function-alias 'ess-library #'ess-load-library "ESS[12.09-1]") ;;; smart-comma was a bad idea (eval-after-load "eldoc" @@ -1127,13 +1302,19 @@ Placed into `ess-presend-filter-functions' for R dialects." (ess-r-arg "verbose" "TRUE")))) (concat visibly output pkg verbose))) +(defun ess-r--format-call (cmd &rest objects) + "Prefix an ESSR command with a namespace qualifier. +CMD is formatted with OBJECTS using `format'." + (concat "base::as.environment('ESSR')$" + (apply #'format cmd objects))) + (cl-defmethod ess-build-eval-command--override (string &context (ess-dialect "R") &optional visibly output file &rest args) "R method to build eval command." (let* ((namespace (caar args)) (namespace (unless ess-debug-minor-mode (or namespace (ess-r-get-evaluation-env)))) - (cmd (if namespace ".ess.ns_eval" ".ess.eval")) + (cmd (ess-r--format-call (if namespace ".ess.ns_eval" ".ess.eval"))) (file (when file (ess-r-arg "file" file t))) (rargs (ess-r-build-args visibly output namespace))) (concat cmd "(\"" string "\"" rargs file ")\n"))) @@ -1141,7 +1322,7 @@ Placed into `ess-presend-filter-functions' for R dialects." (cl-defmethod ess-build-load-command (string &context (ess-dialect "R") &optional visibly output file &rest _args) (let* ((namespace (or file (ess-r-get-evaluation-env))) - (cmd (if namespace ".ess.ns_source" ".ess.source")) + (cmd (ess-r--format-call (if namespace ".ess.ns_source" ".ess.source"))) (rargs (ess-r-build-args visibly output namespace))) (concat cmd "('" string "'" rargs ")\n"))) @@ -1162,9 +1343,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. @@ -1182,7 +1361,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)))) @@ -1245,37 +1423,67 @@ selected (see `ess-r-set-evaluation-env')." ;;;*;;; Help -(defun ess-r-namespaced-object-p (object) - (string-match "^[[:alnum:].]+::" object)) - -(defun ess-r-build-help-command--qualified (object) - (when (ess-r-namespaced-object-p object) - (let* ((pkg-name (substring object (match-beginning 0) (- (match-end 0) 2))) - (object (concat "'" (substring object (match-end 0)) "'")) - (pkg (ess-r-arg "package" pkg-name t))) - (concat ".ess.help(" object pkg ")\n")))) - -(defun ess-r-build-help-command--get-package-dir (object) - ;; Ugly hack to avoid tcl/tk dialogues - (let ((pkgs (ess-get-words-from-vector - (format "as.character(utils::help('%s'))\n" object)))) - (when (> (length pkgs) 1) - (ess-completing-read "Choose location" pkgs nil t)))) - -(defun ess-r-build-help-command--unqualified (object) +(cl-defmethod ess-build-help-command (object &context (ess-dialect "R")) + (let ((info (ess-r--split-namespace object))) + (if info + (ess-r-help--build-help-command--qualified (car info) (cdr info)) + (ess-r-help--build-help-command--unqualified object)))) + +(defun ess-r--split-namespace (sym) + (when (string-match "^[[:alnum:].]+::" sym) + (let ((pkg (substring-no-properties sym (match-beginning 0) (- (match-end 0) 2))) + (obj (substring-no-properties sym (match-end 0)))) + (cons pkg obj)))) + +(defvar-local ess-r-help--local-object nil) +(defvar-local ess-r-help--local-package nil) +(put 'ess-r-help--local-object 'permanent-local t) +(put 'ess-r-help--local-package 'permanent-local t) + +(defun ess-r-help--build-help-command--qualified (pkg obj) + (setq ess-r-help--local-package pkg) + (setq ess-r-help--local-object obj) + (let ((obj-arg (concat "'" obj "'")) + (pkg-arg (ess-r-arg "package" pkg t))) + (ess-r--format-call ".ess.help(%s%s)\n" obj-arg pkg-arg))) + +(defun ess-r-help--build-help-command--unqualified (obj) (if (eq ess-help-type 'index) - ;; we are in index page, qualify with namespace - (ess-r-build-help-command--qualified (format "%s::%s" ess-help-object object)) - (let ((pkg-dir (ess-r-build-help-command--get-package-dir object)) - (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) - command)))) + ;; We are in index page, qualify with namespace + (ess-r-help--build-help-command--qualified ess-help-object obj) + (let ((pkg (ess-r-help--find-package obj))) + (unless pkg + (error "Can't find documentation for `%s'" obj)) + (ess-r-help--build-help-command--qualified pkg obj)))) + +(defun ess-r-help--find-package (object) + "Find package where to find OBJECT. +If there are multiple packages attached to the search path, the +user is prompted for a package location. If OBJECT is not +documented, returns nil." + (let* ((paths (ess-get-words-from-vector + (format "as.character(utils::help('%s'))\n" object))) + (paths (if (> (length paths) 1) + (cl-delete-if + (lambda (x) (string-match-p "reexports$" x)) + paths) + paths))) + (cond ((not paths) + nil) + ((and (> (length paths) 1) + (not noninteractive)) + (let ((path (ess-completing-read "Choose location" paths nil t))) + (ess-r-help--get-pkg-from-help-path path))) + (t + (ess-r-help--get-pkg-from-help-path (car paths)))))) -(cl-defmethod ess-build-help-command (object &context (ess-dialect "R")) - (or (ess-r-build-help-command--qualified object) - (ess-r-build-help-command--unqualified object))) +(defun ess-r-help--get-pkg-from-help-path (path) + (file-name-nondirectory + (directory-file-name + (file-name-directory + (directory-file-name + (file-name-directory + path)))))) (defconst inferior-ess-r--input-help (format "^ *help *(%s)" ess-help-arg-regexp)) (defconst inferior-ess-r--input-?-help-regexp "^ *\\(?:\\(?1:[a-zA-Z ]*?\\?\\{1,2\\}\\) *\\(?2:.+\\)\\)") @@ -1309,7 +1517,7 @@ selected (see `ess-r-set-evaluation-env')." "^\\([^ \t\n]+::[^ \t\n]+\\)[ \t\n]+" (format "*ess-apropos[%s](%s)*" ess-current-process-name (match-string 1 help-?-match)) - 'appropos)) + 'apropos)) ((string-match "^ *\\? *\\([^ \t]+\\)$" help-?-match) (ess-display-help-on-object (match-string 1 help-?-match))) ;; Anything else we send to process almost unchanged @@ -1334,45 +1542,89 @@ selected (see `ess-r-set-evaluation-env')." (inferior-ess-input-sender proc string)))) (defun ess-r-load-ESSR () - "Load ESSR functionality." + "Load ESSR functionality into ESSR environment. +On remotes, when `ess-r-fetch-ESSR-on-remotes' is non-nil we +fetch ESSR environment from github to the remote machine. +Otherwise (the default) we source ESSR files into the remote +process." + (interactive) + ;; `.ess.command()` is not defined until ESSR is loaded so disable + ;; it temporarily. Would be helpful to implement an `inferior-ess-let' + ;; macro . (cond ((file-remote-p (ess-get-process-variable 'default-directory)) (if (eq ess-r-fetch-ESSR-on-remotes t) - (ess-r--fetch-ESSR-remote) + (or (ess-r--fetch-ESSR-remote) + (ess-r--load-ESSR-remote)) (ess-r--load-ESSR-remote))) ((and (bound-and-true-p ess-remote)) + ;; NB: With ess-remote we send by chunks because sending large sources is + ;; fragile (if ess-r-fetch-ESSR-on-remotes - (ess-r--fetch-ESSR-remote) + (or (ess-r--fetch-ESSR-remote) + (ess-r--load-ESSR-remote t)) (ess-r--load-ESSR-remote t))) (t (ess-r--load-ESSR-local)))) (defun ess-r--load-ESSR-local () + "Load ESSR into a local process. +Source the etc/ESSR/.load.R file into the R process. The +.ess.ESSR.load function sources all of the contents of the +etc/ESSR/R directory into the ESSR environment and attaches the +environment to the search path." (let* ((src-dir (expand-file-name "ESSR/R" ess-etc-directory)) - (cmd (format "local({ - source('%s/.load.R', local=TRUE) #define load.ESSR - .ess.load.ESSR('%s') - })\n" - src-dir src-dir))) - (with-current-buffer (ess-command cmd) + (buf (ess-command (ess-r--load-ESSR-command src-dir)))) + (with-current-buffer buf (let ((msg (buffer-string))) (when (> (length msg) 1) (message (format "Messages while loading ESSR: %s" msg))))))) +(defun ess-r--load-ESSR-command (src-dir) + (format "base::tryCatch( + base::local({ + base::source('%s/.load.R', local=TRUE) #define load.ESSR + .ess.ESSR.load('%s') + }), + error = function(cnd) { + msg <- paste0('ESSR::ERROR \"', conditionMessage(cnd), '\"') + writeLines(msg) + } + )\n" + src-dir + src-dir)) + (defun ess-r--load-ESSR-remote (&optional chunked) - (ess-command (format ".ess.ESSRversion <- '%s'\n" essr-version)) + "Load ESSR into a remote process through the process connection. +Send the contents of the etc/ESSR/R directory to the remote +process through the process connection file by file. Then, +collect all the objects into an ESSR environment and attach to +the search path. If CHUNKED is non-nil, split each file by +separators and send chunk by chunk." + (ess-command (format ".ess.ESSRversion <<- '%s'\n" essr-version)) (with-temp-message "Loading ESSR into remote ..." (let ((src-dir (expand-file-name "ESSR/R" ess-etc-directory))) - (dolist (file (directory-files src-dir t "\\.R$")) - (ess--inject-code-from-file file chunked))))) + (dolist (file (directory-files src-dir t "\\.R\\'")) + (ess--inject-code-from-file file chunked)) + (ess-command ".ess.collect.ESSR.objects()\n")))) (defun ess-r--fetch-ESSR-remote () - (let ((loader (ess-file-content (expand-file-name "ESSR/LOADREMOTE" ess-etc-directory)))) - (unless (ess-boolean-command (format loader essr-version) nil 0.1) - (let* ((errmsg (with-current-buffer " *ess-command-output*" (buffer-string))) - (src-dir (expand-file-name "ESSR/R" ess-etc-directory)) - (files (directory-files src-dir t "\\.R$"))) - (message (format "Couldn't load ESSR.rds. Injecting from local.\n Error: %s\n" errmsg)) - (ess-r--load-ESSR-remote))))) + "Load ESSR into a remote process through a GitHub download. +Downloads a file with a serialized version of the R ESSR +environment from GitHub and attaches it to the search path. If +the file already exists on disk from a previous download then the +download step is omitted. This function returns t if the ESSR +load is successful, and nil otherwise." + (let ((loader (ess-file-content (expand-file-name "ESSR/LOADREMOTE" ess-etc-directory))) + (essr (or essr-version + ;; FIXME: Hack: on MELPA essr-version is not set + (lm-with-file (expand-file-name "ess.el" ess-lisp-directory) + (lm-header "ESSR-Version")) + (error "`essr-version' could not be automatically inferred from ess.el file")))) + (or (with-temp-message "Fetching and loading ESSR into the remote ..." + (ess-boolean-command (format loader essr))) + (let ((errmsg (with-current-buffer " *ess-command-output*" (buffer-string)))) + (message (format "Couldn't load or download ESSR.rds on the remote.\n Error: %s\n Injecting local copy of ESSR." errmsg)) + nil)))) (cl-defmethod ess-quit--override (arg &context (ess-dialect "R")) "With ARG, do not offer to save the workspace." @@ -1380,7 +1632,7 @@ selected (see `ess-r-set-evaluation-env')." (sprocess (ess-get-process ess-current-process-name))) (when (not sprocess) (error "No ESS process running")) (ess-cleanup) - (ess-send-string sprocess cmd t))) + (ess-send-string sprocess cmd))) (defcustom inferior-ess-r-reload-hook nil "Hook run when reloading the R inferior buffer." @@ -1450,7 +1702,8 @@ Return the amount the indentation changed by." (indent-region start (point))))) (defun ess-offset (offset) - (setq offset (eval (intern (concat "ess-offset-" (symbol-name offset))))) + (setq offset + (symbol-value (intern (concat "ess-offset-" (symbol-name offset))))) (when (and (not (eq offset nil)) (listp offset) (or (numberp (cadr offset)) @@ -1465,7 +1718,8 @@ Return the amount the indentation changed by." ess-indent-offset))) (defun ess-offset-type (offset) - (setq offset (eval (intern (concat "ess-offset-" (symbol-name offset))))) + (setq offset + (symbol-value (intern (concat "ess-offset-" (symbol-name offset))))) (if (listp offset) (car offset) offset)) @@ -1596,7 +1850,7 @@ Returns nil if line starts inside a string, t if in a comment." (when (ess-at-containing-sexp (looking-at "{")) (ess-escape-prefixed-block)))) - (cl-some 'looking-at + (cl-some #'looking-at (ess-overridden-blocks))) (+ (current-column) offset)))))) @@ -1728,7 +1982,7 @@ Returns nil if line starts inside a string, t if in a comment." (override (and ess-align-arguments-in-calls (save-excursion (ess-climb-object) - (cl-some 'looking-at + (cl-some #'looking-at ess-align-arguments-in-calls)))) (type-sym (cond (block 'block) ((looking-at "[[:blank:]]*[([][[:blank:]]*\\($\\|#\\)") @@ -1747,10 +2001,12 @@ Returns nil if line starts inside a string, t if in a comment." (ess-calculate-indent--args-open-delim)) ;; Indent from attached name ((eq type 'prev-call) - (ess-calculate-indent--args-prev-call)) + (ess-calculate-indent--args-prev-call block)) ;; Indent from previous line indentation ((eq type 'prev-line) - (ess-calculate-indent--args-prev-line)) + (let ((out (ess-calculate-indent--args-prev-line type block offset))) + (setq offset (pop out)) + (pop out))) (t (error "Malformed offset"))))) (if max-col @@ -1761,7 +2017,7 @@ Returns nil if line starts inside a string, t if in a comment." (forward-char) (current-column)) -(defun ess-calculate-indent--args-prev-call () +(defun ess-calculate-indent--args-prev-call (block) ;; Handle brackets chains such as ][ (cf data.table) (ess-climb-chained-delims) ;; Handle call chains @@ -1779,7 +2035,7 @@ Returns nil if line starts inside a string, t if in a comment." (+ (ess-offset 'block) (current-column)) (current-column))) -(defun ess-calculate-indent--args-prev-line () +(defun ess-calculate-indent--args-prev-line (type block offset) (ess-at-indent-point (cond ;; Closing delimiters are actually not indented at @@ -1788,13 +2044,13 @@ Returns nil if line starts inside a string, t if in a comment." (ess-up-list -1) (when (looking-at "{") (ess-climb-block-prefix)) - (current-indentation)) + (list offset (current-indentation))) ;; Function blocks need special treatment ((and (eq type 'prev-line) (eq block 'fun-decl)) (goto-char containing-sexp) (ess-climb-block-prefix) - (current-indentation)) + (list offset (current-indentation))) ;; Regular case (t ;; Find next non-empty line to indent from @@ -1810,15 +2066,16 @@ Returns nil if line starts inside a string, t if in a comment." ;; The following ensures that only the first line ;; counts. Otherwise consecutive statements would get ;; increasingly more indented. - (when (and block - containing-sexp - (not (eq block 'unbraced)) - (save-excursion - (/= (line-number-at-pos) - (progn (goto-char containing-sexp) - (line-number-at-pos))))) - (setq offset 0)) - (current-indentation))))) + (let ((offset (if (and block + containing-sexp + (not (eq block 'unbraced)) + (save-excursion + (/= (line-number-at-pos) + (progn (goto-char containing-sexp) + (line-number-at-pos))))) + 0 + offset))) + (list offset (current-indentation))))))) ;; Indentation of arguments needs to keep track of how previous ;; arguments are indented. If one of those has a smaller indentation, @@ -1954,7 +2211,7 @@ Returns nil if line starts inside a string, t if in a comment." (defun ess-calculate-indent--nested-calls () (when ess-align-nested-calls - (let ((calls (mapconcat 'identity ess-align-nested-calls "\\|")) + (let ((calls (mapconcat #'identity ess-align-nested-calls "\\|")) match) (save-excursion (and containing-sexp @@ -1972,14 +2229,12 @@ Returns nil if line starts inside a string, t if in a comment." ;; Unroll arguments to a single line until closing marker is found. (defun ess-fill--unroll-lines (bounds &optional jump-cont) (let* ((last-pos (point-min)) - (containing-sexp (ess-containing-sexp-position)) - prefix-break) + (containing-sexp (ess-containing-sexp-position))) (goto-char (car bounds)) (goto-char (ess-code-end-position)) (while (and (/= (point) last-pos) (< (line-end-position) - (cadr bounds)) - (not prefix-break)) + (cadr bounds))) (setq last-pos (point)) ;; Check whether we ended up in a sub call. In this case, jump ;; over it, otherwise, join lines. @@ -2065,118 +2320,128 @@ state.") (setq ess-fill--style-level (1+ ess-fill--style-level)))))) ess-fill--style-level) -(defun ess-fill-args (&optional style) - (let ((start-pos (point-min)) - (bounds (ess-args-bounds 'marker)) - ;; Set undo boundaries manually - (undo-inhibit-record-point t) - last-pos last-newline prefix-break - infinite) - (when (not bounds) - (error "Could not find function bounds")) - (setq style (or style (ess-fill-style 'calls bounds))) - (if (= style 0) - (progn - (delete-region (car bounds) (marker-position (cadr bounds))) - (insert ess-fill--orig-state) - ;; Restore the point manually. (save-excursion) wouldn't - ;; work here because we delete the text rather than just - ;; modifying it. - (goto-char ess-fill--orig-pos) - (message "Back to original formatting")) - (when ess-blink-refilling - (ess-blink-region (nth 2 bounds) - (1+ (marker-position (cadr bounds))))) - (undo-boundary) - (save-excursion - (ess-fill--unroll-lines bounds t) - (cond - ;; Some styles start with first argument on a newline - ((and (memq style '(2 4)) - ess-fill-calls-newlines - (not (looking-at "[ \t]*#"))) - (newline-and-indent)) - ;; Third level, start a newline after N arguments - ((and (= style 3) - (not (looking-at "[ \t]*#"))) - (let ((i (if (numberp current-prefix-arg) - current-prefix-arg - 1))) - (while (and (> i 0) - (ess-jump-arg) - (ess-jump-char ",")) - (setq i (1- i)))) - (newline-and-indent))) - (ess-fill-args--roll-lines) - ;; Reindent surrounding context - (ess-indent-call (car bounds))) - ;; Signal marker for garbage collection - (set-marker (cadr bounds) nil) - (undo-boundary)))) - -(defun ess-fill-args--roll-lines () - (while (and (not (looking-at "[])]")) - (/= (point) (or last-pos 1)) - (not infinite)) - (setq prefix-break nil) - ;; Record start-pos as future breaking point to avoid breaking - ;; at `=' sign - (while (looking-at "[ \t]*[\n#]") - (forward-line) - (back-to-indentation)) - (setq start-pos (point)) - (while (and (< (current-column) fill-column) - (not (looking-at "[])]")) - (/= (point) (or last-pos 1)) - ;; Break after one pass if prefix is active - (not prefix-break)) - (when (memq style '(2 3)) - (setq prefix-break t)) - (ess-jump-token ",") - (setq last-pos (point)) - ;; Jump expression and any continuations. Reindent all lines - ;; that were jumped over - (let ((cur-line (line-number-at-pos)) - end-line) - (cond ((ess-jump-arg) - (setq last-newline nil)) - ((ess-token-after= ",") - (setq last-newline nil) - (setq last-pos (1- (point))))) +(let (_) + ;; FIXME: Transform these dynamic bindings to a state object + (defvar ess--infinite) + (defvar ess--prefix-break) + (defvar ess--start-pos) + (defvar ess--last-pos) + (defvar ess--last-newline) + + (declare-function ess-fill-args--roll-lines "ess-r-mode") + + (defun ess-fill-args (&optional style) + (let ((ess--start-pos (point-min)) + (bounds (ess-args-bounds 'marker)) + ;; Set undo boundaries manually + (undo-inhibit-record-point t) + ess--last-pos ess--last-newline ess--prefix-break + ess--infinite) + (when (not bounds) + (error "Could not find function bounds")) + (setq style (or style (ess-fill-style 'calls bounds))) + (if (= style 0) + (progn + (delete-region (car bounds) (marker-position (cadr bounds))) + (insert ess-fill--orig-state) + ;; Restore the point manually. (save-excursion) wouldn't + ;; work here because we delete the text rather than just + ;; modifying it. + (goto-char ess-fill--orig-pos) + (message "Back to original formatting")) + (when ess-blink-refilling + (ess-blink-region (nth 2 bounds) + (1+ (marker-position (cadr bounds))))) + (undo-boundary) (save-excursion - (when (< cur-line (line-number-at-pos)) - (setq end-line (line-number-at-pos)) - (ess-goto-line (1+ cur-line)) - (while (and (<= (line-number-at-pos) end-line) - (/= (point) (point-max))) - (funcall indent-line-function) - (forward-line)))))) - (when (or (>= (current-column) fill-column) - prefix-break - ;; Ensures closing delim on a newline - (and (= style 4) - (looking-at "[ \t]*[])]") - (setq last-pos (point)))) - (if (and last-pos (/= last-pos start-pos)) - (goto-char last-pos) - (ess-jump-char ",")) - (cond ((looking-at "[ \t]*[#\n]") - (forward-line) - (funcall indent-line-function) - (setq last-newline nil)) - ;; With levels 2 and 3, closing delim goes on a newline - ((looking-at "[ \t]*[])]") - (when (and (memq style '(2 3 4)) - ess-fill-calls-newlines - (not last-newline)) + (ess-fill--unroll-lines bounds t) + (cond + ;; Some styles start with first argument on a newline + ((and (memq style '(2 4)) + ess-fill-calls-newlines + (not (looking-at "[ \t]*#"))) + (newline-and-indent)) + ;; Third level, start a newline after N arguments + ((and (= style 3) + (not (looking-at "[ \t]*#"))) + (let ((i (if (numberp current-prefix-arg) + current-prefix-arg + 1))) + (while (and (> i 0) + (ess-jump-arg) + (ess-jump-char ",")) + (setq i (1- i)))) + (newline-and-indent))) + (ess-fill-args--roll-lines style) + ;; Reindent surrounding context + (ess-indent-call (car bounds))) + ;; Signal marker for garbage collection + (set-marker (cadr bounds) nil) + (undo-boundary)))) + + (defun ess-fill-args--roll-lines (style) + (while (and (not (looking-at "[])]")) + (/= (point) (or ess--last-pos 1)) + (not ess--infinite)) + (setq ess--prefix-break nil) + ;; Record ess--start-pos as future breaking point to avoid breaking + ;; at `=' sign + (while (looking-at "[ \t]*[\n#]") + (forward-line) + (back-to-indentation)) + (setq ess--start-pos (point)) + (while (and (< (current-column) fill-column) + (not (looking-at "[])]")) + (/= (point) (or ess--last-pos 1)) + ;; Break after one pass if prefix is active + (not ess--prefix-break)) + (when (memq style '(2 3)) + (setq ess--prefix-break t)) + (ess-jump-token ",") + (setq ess--last-pos (point)) + ;; Jump expression and any continuations. Reindent all lines + ;; that were jumped over + (let ((cur-line (line-number-at-pos)) + end-line) + (cond ((ess-jump-arg) + (setq ess--last-newline nil)) + ((ess-token-after= ",") + (setq ess--last-newline nil) + (setq ess--last-pos (1- (point))))) + (save-excursion + (when (< cur-line (line-number-at-pos)) + (setq end-line (line-number-at-pos)) + (ess-goto-line (1+ cur-line)) + (while (and (<= (line-number-at-pos) end-line) + (/= (point) (point-max))) + (funcall indent-line-function) + (forward-line)))))) + (when (or (>= (current-column) fill-column) + ess--prefix-break + ;; Ensures closing delim on a newline + (and (= style 4) + (looking-at "[ \t]*[])]") + (setq ess--last-pos (point)))) + (if (and ess--last-pos (/= ess--last-pos ess--start-pos)) + (goto-char ess--last-pos) + (ess-jump-char ",")) + (cond ((looking-at "[ \t]*[#\n]") + (forward-line) + (funcall indent-line-function) + (setq ess--last-newline nil)) + ;; With levels 2 and 3, closing delim goes on a newline + ((looking-at "[ \t]*[])]") + (when (and (memq style '(2 3 4)) + ess-fill-calls-newlines + (not ess--last-newline)) + (newline-and-indent) + ;; Prevent indenting infinitely + (setq ess--last-newline t))) + ((not ess--last-newline) (newline-and-indent) - ;; Prevent indenting infinitely - (setq last-newline t))) - ((not last-newline) - (newline-and-indent) - (setq last-newline t)) - (t - (setq infinite t)))))) + (setq ess--last-newline t)) + (t + (setq ess--infinite t))))))) (defun ess-fill-continuations (&optional style) (let ((bounds (ess-continuations-bounds 'marker)) @@ -2247,26 +2512,27 @@ state.") :group 'ess-proc (ess-setq-vars-local ess-r-customize-alist) (setq-local ess-font-lock-keywords 'inferior-ess-r-font-lock-keywords) + (setq-local font-lock-syntactic-face-function #'ess-r-font-lock-syntactic-face-function) (setq-local comint-process-echoes (eql ess-eval-visibly t)) (setq-local comint-prompt-regexp inferior-S-prompt) + (setq-local syntax-propertize-function ess-r--syntax-propertize-function) (setq comint-input-sender 'inferior-ess-r-input-sender) - (remove-hook 'completion-at-point-functions 'ess-filename-completion 'local) ;; should be first - (add-hook 'completion-at-point-functions 'ess-r-object-completion nil 'local) - (add-hook 'completion-at-point-functions 'ess-filename-completion nil 'local) + (remove-hook 'completion-at-point-functions #'ess-filename-completion 'local) ;; should be first + (add-hook 'completion-at-point-functions #'ess-r-object-completion nil 'local) + (add-hook 'completion-at-point-functions #'ess-filename-completion nil 'local) (add-hook 'xref-backend-functions #'ess-r-xref-backend nil 'local) + (add-hook 'project-find-functions #'ess-r-project nil 'local) ;; eldoc - (add-function :before-until (local 'eldoc-documentation-function) - #'ess-r-eldoc-function) - (when ess-use-eldoc (eldoc-mode)) + (ess--setup-eldoc #'ess-r-eldoc-function) ;; auto-complete (ess--setup-auto-complete ess-r-ac-sources t) ;; company (ess--setup-company ess-r-company-backends t) (setq comint-get-old-input #'inferior-ess-get-old-input) - (add-hook 'comint-input-filter-functions 'ess-search-path-tracker nil 'local)) + (add-hook 'comint-input-filter-functions #'ess-search-path-tracker nil 'local)) - + ;;;*;;; R Help mode (defvar ess-r-help-mode-map @@ -2298,60 +2564,26 @@ state.") ess-help-sec-regex ess-help-r-sec-regex ess-help-sec-keys-alist ess-help-r-sec-keys-alist ; TODO: Still necessary? inferior-ess-help-command inferior-ess-r-help-command) - (ess-r-help-add-links)) - -(defun ess-r-help-usage-objects () - "Return a list of objects in the usage section for the current help buffer. -In other words, if in the help buffer for \"qt\", return + (ess-r-help--add-links)) -'((\"dt\" \"x\" \"df\" \"ncp\" \"log\") - (\"pt\" \"q\" \"df\" \"ncp\" \"lower.tail\" \"log.p\") - (\"qt\" \"p\" \"df\" \"ncp\" \"lower.tail\" \"log.p\") - (\"rt\" \"n\" \"df\" \"ncp\")). - -If the current buffer does not have a usage section, return nil." - (unless (derived-mode-p 'ess-r-help-mode) - (error "Not an R help buffer")) - (save-excursion - (save-restriction - (let (usage-objects) - (widen) - (goto-char (point-min)) - ;; Narrow the buffer to just the "Usage" section - (when-let ((usage-beg (re-search-forward "^Usage:" nil t)) - (usage-end (re-search-forward "^[^[:space:]]" nil t))) - (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))) - (when usage-objects - ;; Get arguments: - (setq usage-objects - (mapcar (lambda (u) (cons u (ess-get-words-from-vector (concat "names(formals(" u "))\n")))) - usage-objects))) - (nreverse usage-objects))))) - -(define-button-type 'ess-r-help-link +(define-button-type 'ess-r-help--link 'follow-link t - 'action (lambda (_) (ess-r-help-button-action))) + 'action (lambda (_) (ess-r-help--button-action))) -(defun ess-r-help-button-action () +(defun ess-r-help--button-action () "Display help for button at point." - (let ((text (get-text-property (point) 'ess-r-help-link-text))) + (let ((text (get-text-property (point) 'ess-r-help--link-text))) (ess-display-help-on-object text))) -(defun ess-r-help-add-links () +(defun ess-r-help--add-links () "Add links to the help buffer." - (let ((help-topics (when (ess-process-live-p) - (ess-help-get-topics ess-local-process-name))) - (inhibit-read-only t) - (usage-objects (ess-flatten-list (ess-r-help-usage-objects)))) + (let ((links (when (ess-process-live-p) + (ess-get-words-from-vector + (ess-r--format-call + ".ess.helpLinks('%s' %s)\n" + ess-r-help--local-object + (ess-r-arg "package" ess-r-help--local-package t))))) + (inhibit-read-only t)) (save-excursion ;; Search for fancy quotes only. If users have ;; options(useFancyQuotes) set to something other than TRUE this @@ -2359,16 +2591,14 @@ If the current buffer does not have a usage section, return nil." ;; searching through the whole buffer takes too long. (while (re-search-forward "‘\\([^[:space:]]+?\\)’" nil t) (let* ((text (match-string 1)) - (text (if (string-match-p ".*()\\'" text) - (substring text nil (- (length text) 2)) - text))) - (when (and (member text help-topics) - (not (member text usage-objects)) - (not (member text usage-objects))) + (text-stripped (if (string-match-p ".*()\\'" text) + (substring text nil (- (length text) 2)) + text))) + (when (member text-stripped links) (delete-region (match-beginning 0) (match-end 0)) (insert-text-button text - 'ess-r-help-link-text text - 'type 'ess-r-help-link + 'ess-r-help--link-text text-stripped + 'type 'ess-r-help--link 'help-echo (format "mouse-2, RET: Help on %s" text)))))))) (cl-defmethod ess--display-vignettes-override (all &context (ess-dialect "R")) @@ -2382,7 +2612,7 @@ from all installed packages, which can be very slow." (goto-char (point-min)) (when (re-search-forward "(list" nil t) (goto-char (match-beginning 0)) - (ignore-errors (eval (read (current-buffer))))))) + (ignore-errors (eval (read (current-buffer)) t))))) (proc-name ess-current-process-name) (alist ess-local-customize-alist) (remote (file-remote-p default-directory)) @@ -2392,7 +2622,7 @@ from all installed packages, which can be very slow." (with-current-buffer buff (setq buffer-read-only nil) (delete-region (point-min) (point-max)) - (ess-setq-vars-local (eval alist)) + (ess-setq-vars-local (eval alist t)) (setq ess-local-process-name proc-name) (ess--help-major-mode) (setq ess-help-sec-regex "^\\w+:$" @@ -2415,7 +2645,7 @@ from all installed packages, which can be very slow." (with-parsed-tramp-file-name default-directory nil (tramp-make-tramp-file-name method user host (nth 1 el2))))) (nth 1 el2)))) - (insert-text-button "Pdf" + (insert-text-button "doc" 'mouse-face 'highlight 'action (if remote #'ess--action-open-in-emacs @@ -2425,7 +2655,7 @@ from all installed packages, which can be very slow." 'package pack 'help-echo (concat path "/doc/" (nth 2 el2))) (insert " ") - (insert-text-button "Rnw" + (insert-text-button "source" 'mouse-face 'highlight 'action #'ess--action-open-in-emacs 'follow-link t @@ -2456,7 +2686,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)) @@ -2511,13 +2745,13 @@ from all installed packages, which can be very slow." des-col-beginning des-col-end entries) (with-current-buffer (ess-command cmd (get-buffer-create " *ess-rutils-pkgs*")) (goto-char (point-min)) - (delete-region (point) (1+ (point-at-eol))) + (delete-region (point) (1+ (line-end-position))) ;; Now we have a buffer with package name, description, and ;; version. description and version are surrounded by quotes, ;; description is separated by whitespace. (re-search-forward "\\>[[:space:]]+") (setq des-col-beginning (current-column)) - (goto-char (point-at-eol)) + (goto-char (line-end-position)) ;; Unless someone has a quote character in their package version, ;; two quotes back will be the end of the package description. (dotimes (_ 2) (search-backward "\"")) @@ -2581,10 +2815,12 @@ from all installed packages, which can be very slow." Use the repositories as listed by getOptions(\"repos\") in the current R session." (interactive) - (ess-r-package--list-packages (concat ".ess.rutils.ops <- options(width = 10000);" - "print(available.packages(fields=c(\"Title\"))[, c(\"Title\", \"Version\")]);" - "options(.ess.rutils.ops); rm(.ess.rutils.ops);" - "\n"))) + (ess-r-package--list-packages + "{ + .ess.rutils.ops <- options(width = 10000) + print(available.packages(fields=c(\"Title\"))[, c(\"Title\", \"Version\")]) + options(.ess.rutils.ops); rm(.ess.rutils.ops) + }\n")) (define-obsolete-function-alias 'ess-rutils-mark-install #'ess-r-package-mark-install "ESS 19.04") (defun ess-r-package-mark-install () @@ -2640,15 +2876,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." @@ -2686,7 +2924,8 @@ given field. Options should be separated by value of (interactive "sSearch string: ") (let ((site "https://search.r-project.org/cgi-bin/namazu.cgi?query=") (okstring (replace-regexp-in-string " +" "+" string))) - (if current-prefix-arg + (browse-url + (if current-prefix-arg (let ((mpp (concat "&max=" (completing-read @@ -2703,23 +2942,24 @@ given field. Options should be separated by value of "Sort by: " '(("score" 1) ("date:late" 2) ("date:early" 3) ("field:subject:ascending" 4) - ("field:subject:decending" 5) - ("field:from:ascending" 6) ("field:from:decending" 7) - ("field:size:ascending" 8) ("field:size:decending" 9)) + ("field:subject:descending" 5) + ("field:from:ascending" 6) ("field:from:descending" 7) + ("field:size:ascending" 8) ("field:size:descending" 9)) nil t "score" nil "score"))) (restrict (concat "&idxname=" (mapconcat - 'identity + #'identity (completing-read-multiple "Limit search to: " '(("Rhelp02a" 1) ("functions" 2) ("docs" 3) ("Rhelp01" 4)) nil t "Rhelp02a,functions,docs" nil - "Rhelp02a,functions,docs") "&idxname=")))) - (browse-url (concat site okstring mpp format sortby restrict))) - (browse-url (concat site okstring "&max=20&result=normal&sort=score" - "&idxname=Rhelp02a&idxname=functions&idxname=docs"))))) + "Rhelp02a,functions,docs") + "&idxname=")))) + (concat site okstring mpp format sortby restrict)) + (concat site okstring "&max=20&result=normal&sort=score" + "&idxname=Rhelp02a&idxname=functions&idxname=docs"))))) (defun ess-rutils-help-search (string) "Search for STRING using help.search()." @@ -2770,15 +3010,10 @@ given field. Options should be separated by value of ;;*;; Provide and auto-loads ;;;###autoload -(add-to-list 'auto-mode-alist '("/Makevars\\(\\.win\\)?$" . makefile-mode)) +(add-to-list 'auto-mode-alist '("/Makevars\\(\\.win\\)?\\'" . makefile-mode)) ;;;###autoload -(add-to-list 'auto-mode-alist '("DESCRIPTION$" . conf-colon-mode)) +(add-to-list 'auto-mode-alist '("DESCRIPTION\\'" . conf-colon-mode)) (provide 'ess-r-mode) -;;; Local variables: -;;; mode: emacs-lisp -;;; byte-compile-warnings: (not lexical) -;;; End: - ;;; ess-r-mode.el ends here diff --git a/elpa/ess-20191014.1343/ess-r-package.el b/elpa/ess-20230419.1527/ess-r-package.el similarity index 84% rename from elpa/ess-20191014.1343/ess-r-package.el rename to elpa/ess-20230419.1527/ess-r-package.el index 88d1b33e..3513cc46 100644 --- a/elpa/ess-20191014.1343/ess-r-package.el +++ b/elpa/ess-20230419.1527/ess-r-package.el @@ -1,28 +1,26 @@ ;;; ess-r-package.el --- Package development mode for R. -*- lexical-binding: t; -*- -;; Copyright (C) 2011-2015 Lionel Henry, Vitalie Spinu, A.J. Rossini, Richard -;; M. Heiberger, Martin Maechler, Kurt Hornik, Rodney Sparapani, and -;; Stephen Eglen. - +;; Copyright (C) 2011-2022 Free Software Foundation, Inc. ;; Author: Lionel Henry, Vitalie Spinu ;; Maintainer: ESS-core -;; Keywords: languages, tools - -;; This file is part of ESS. +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -38,6 +36,7 @@ ;; Silence the byte compiler, OK because this file is only loaded by ;; ess-r-mode and has no autoloads. (defvar ess-r-customize-alist) +(declare-function ess-r-project "ess-r-mode") (declare-function inferior-ess-r-force "ess-r-mode") (declare-function ess-r-get-evaluation-env "ess-r-mode") (declare-function ess-r-set-evaluation-env "ess-r-mode") @@ -61,10 +60,11 @@ See also `ess-r-set-evaluation-env' and `ess-r-evaluation-env'." "Current package info cache. See `ess-r-package-info' for its structure.") -(define-obsolete-variable-alias 'ess-r-package-library-path 'ess-r-package-library-paths "v18.04") (defcustom ess-r-package-library-paths nil "Default path to find user packages. -Can be either a string specifying a directory or a list of directories." +Can be either a string specifying a directory or a list of +directories. This variable is also consulted by +`xref-find-definitions' in R buffers. See `ess-r-xref-backend'." :group 'ess-r-package-library-paths :type `(choice string (repeat string))) @@ -105,9 +105,17 @@ is searched from that directory instead of `default-directory'." (when (car pkg-info) (cons 'ess-r-package (plist-get pkg-info :root))))) -(cl-defmethod project-roots ((project (head ess-r-package))) + +;; FIXME: remove when emacs 27 is dropped +(unless (eval-when-compile + (get 'project-roots 'byte-obsolete-info)) + (cl-defmethod project-roots ((project (head ess-r-package))) + "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" - (list (cdr project))) + (cdr project)) (defun ess-r-package-name (&optional dir) "Return the name of the current package as a string." @@ -116,16 +124,19 @@ is searched from that directory instead of `default-directory'." (defun ess-r-package-info (&optional dir) "Get the description of the R project in directory DIR. Return an plist with the keys :name and :root. When not in a -package return '(nil). This value is cached buffer-locally for +package return \\='(nil). This value is cached buffer-locally for efficiency reasons." (if (and (null dir) (car ess-r-package--info-cache)) ess-r-package--info-cache (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 @@ -134,7 +145,7 @@ efficiency reasons." (defun ess-r-package--all-source-dirs (dir) (when (file-directory-p dir) - (cl-loop for f in (directory-files-and-attributes dir t "^[^.]") + (cl-loop for f in (directory-files-and-attributes dir t "\\`[^.]") if (cadr f) append (cons (car f) (ess-r-package--all-source-dirs (car f)))))) @@ -145,7 +156,7 @@ Return nil if not in a package. Search sub-directories listed in return all physically present directories." (let ((pkg-root (plist-get (ess-r-package-info) :root))) (when pkg-root - (let ((files (directory-files-and-attributes pkg-root t "^[^.]"))) + (let ((files (directory-files-and-attributes pkg-root t "\\`[^.]"))) (cl-loop for f in files if (and (cadr f) (cl-some (lambda (el) (string-match-p (concat "/" el "$") (car f))) @@ -170,8 +181,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) @@ -195,9 +205,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)) @@ -239,7 +247,7 @@ Namespaced evaluation is enabled if (string= (directory-file-name subpath) "R"))) (ess-r-set-evaluation-env (ess-r-package-name)))))) -(add-hook 'ess-r-mode-hook 'ess-r-package-enable-namespaced-evaluation) +(add-hook 'ess-r-mode-hook #'ess-r-package-enable-namespaced-evaluation) (defun ess-r-package-eval-linewise (command &optional msg p actions) "Send COMMAND to R process. @@ -271,7 +279,7 @@ arguments, or expressions which return R arguments." (args (cond ((null action) "") ((stringp action) action) ((functionp action) (funcall action)) - ((listp action) (eval action)) + ((listp action) (eval action t)) (t (error "Invalid action"))))) (if (string= "" args) args @@ -303,31 +311,41 @@ With prefix ARG ask for extra args." '("" (read-string "Arguments: " "vignettes = FALSE")))) (defun ess-r-devtools-check-with-winbuilder (&optional arg) - "Interface for `devtools::buildwin()'. -With prefix ARG build with R-devel instead of R-patched." + "Interface for `devtools::check_win_XYZ()'. +With prefix argument, as for arguments to `devtools::check_win_XYZ()' function." (interactive "P") - (ess-r-package-eval-linewise - "devtools::build_win(%s)\n" "Checking %s on CRAN's Windows server" arg - '("" "version = 'R-devel'"))) + (let ((type (completing-read "Release: " '("devel" "release" "oldrelease") nil t))) + (ess-r-package-eval-linewise + (format "devtools:::check_win_%s(%%s)\n" type) + "Checking %s on CRAN's Windows server" arg + '("" (read-string "Arguments: "))))) (defvar ess-r-rhub--history nil) (declare-function ess-r-check-install-package "ess-r-mode.el") (defun ess-r-rhub-check-package (&optional arg) "Interface for `rhub::check()'. -With prefix ARG run with `valgrind = TRUE'." +With prefix ARG allow for editing of the `rhub::check_for_cran()' arguments." (interactive "P") (inferior-ess-r-force) (ess-r-check-install-package "rhub") - (let* ((platforms (ess-get-words-from-vector "rhub::platforms()$name\n")) + (let* ((platforms (cons "RECOMMENDED" (ess-get-words-from-vector "rhub::platforms()$name\n"))) (platform (completing-read "Platform: " platforms nil t nil ess-r-rhub--history (car ess-r-rhub--history))) - (cmd (format "rhub::check_for_cran(%%s, platform = '%s')\n" platform)) - (msg (format "Checking %%s on RHUB (%s)" platform))) - (ess-r-package-eval-linewise cmd msg arg '("" "valgrind = TRUE")))) + (cmd (if (string= "RECOMMENDED" platform) + "rhub::check_for_cran(%s)\n" + (format "rhub::check_for_cran(%%s, platforms = '%s')\n" platform))) + (msg (format "Checking %%s on RHUB (%s)" platform)) + ;; Solaris check is flaky and it seems that solaris check is not run on + ;; CRAN itself with --as-cran options https://github.com/r-hub/rhub/issues/339 + (args (cond ((string-match-p "solaris" platform) + "check_args = c('--no-stop-on-test-error', '--no-vignettes')") + (t "check_args = c('--as-cran', '--no-stop-on-test-error')")))) + (ess-r-package-eval-linewise cmd msg arg + `(,args (read-string "Arguments: " ,(concat args ", valgrind = FALSE")))))) (defun ess-r-devtools-build (&optional arg) "Interface for `devtools::build()'. -With prefix ARG, build with 'vignettes = FALSE'." +With prefix ARG, build with `vignettes = FALSE'." (interactive "P") (ess-r-package-eval-linewise "devtools::build(%s)\n" "Building %s" arg @@ -450,7 +468,7 @@ When called with prefix ARG asks for additional arguments." (defcustom ess-r-package-auto-activate t "If non-nil, `ess-r-package-mode' is turned on within R packages. -If 't' the minor mode auto-activates in R packages. See +If `t' the minor mode auto-activates in R packages. See `ess-r-package-exclude-modes' if you wish to inhibit `ess-r-package-mode' in specific buffers." :group 'ess-r-package @@ -507,14 +525,14 @@ Set this variable to nil to disable the mode line entirely." inferior-ess-reload-function))) (mapc (lambda (var) (set (make-local-variable var) - (eval (cdr (assq var ess-r-customize-alist))))) + (eval (cdr (assq var ess-r-customize-alist)) t))) vars)) - (add-hook 'project-find-functions #'ess-r-package-project) + (add-hook 'project-find-functions #'ess-r-project nil 'local) (run-hooks 'ess-r-package-enter-hook)) - (remove-hook 'project-find-functions #'ess-r-package-project) + (remove-hook 'project-find-functions #'ess-r-project) (run-hooks 'ess-r-package-exit-hook))) -(add-hook 'after-change-major-mode-hook 'ess-r-package-auto-activate) +(add-hook 'after-change-major-mode-hook #'ess-r-package-auto-activate) ;;;*;;; Activation @@ -550,22 +568,21 @@ package mode. Use this function if state of the buffer such as (ess-r-package-re-activate))) (defun ess-r-package-activate-directory-tracker () - (add-hook 'after-change-functions 'ess-r-package-default-directory-tracker t t)) + (add-hook 'after-change-functions #'ess-r-package-default-directory-tracker t t)) -(add-hook 'shell-mode-hook 'ess-r-package-activate-directory-tracker t) -(add-hook 'eshell-mode-hook 'ess-r-package-activate-directory-tracker t) -(when (fboundp 'advice-add) - (require 'shell) - (advice-add 'shell-resync-dirs :after 'ess-r-package-re-activate)) +(add-hook 'shell-mode-hook #'ess-r-package-activate-directory-tracker t) +(add-hook 'eshell-mode-hook #'ess-r-package-activate-directory-tracker t) +;; (require 'shell) +(advice-add 'shell-resync-dirs :after #'ess-r-package-re-activate) ;;;*;;; Deprecated variables and functions (defun ess-developer (&optional _val) (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-ask 'ess-r-devtools-execute-command "18.04") +(defalias 'ess-toggle-developer #'ess-developer) +(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") (make-obsolete-variable 'ess-developer-root-file "Please use `ess-r-package-root-file' instead." "16.04") diff --git a/elpa/ess-20191014.1343/ess-r-syntax.el b/elpa/ess-20230419.1527/ess-r-syntax.el similarity index 78% rename from elpa/ess-20191014.1343/ess-r-syntax.el rename to elpa/ess-20230419.1527/ess-r-syntax.el index 58169aaf..8b11f022 100644 --- a/elpa/ess-20191014.1343/ess-r-syntax.el +++ b/elpa/ess-20230419.1527/ess-r-syntax.el @@ -1,25 +1,27 @@ -;;; ess-r-syntax.el --- Utils to work with R code - -;; Copyright (C) 2015 Lionel Henry +;;; ess-r-syntax.el --- Utils to work with R code -*- lexical-binding: t; -*- +;; Copyright (C) 2015-2022 Free Software Foundation, Inc. ;; Author: Lionel Henry ;; Created: 12 Oct 2015 ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -121,7 +123,7 @@ This is useful to trigger side-effects. FORMS follows the same syntax as arguments to `cond'." (declare (indent 0) (debug nil)) `(let ((forms (list ,@(mapcar (lambda (form) `(progn ,@form)) forms)))) - (cl-some 'identity (mapcar 'eval forms)))) + (cl-some #'identity (mapcar (lambda (e) (eval e t)) forms)))) (defun ess-char-syntax (string) (char-to-string (char-syntax (string-to-char string)))) @@ -206,7 +208,9 @@ Cons cell containing the token type and string representation." (ess-backward-char)) (`?> (prog1 (ess-backward-char) - (or (ess-climb-token--char ?-) + (or (ess-climb-token--char ?|) + (ess-climb-token--char ?=) + (ess-climb-token--char ?-) (and (looking-back "->" (- (point) 2)) (goto-char (- (point) 2)))))) (`?- @@ -309,7 +313,8 @@ content. Return nil when the end of the buffer is reached." "&" "&&" "|" "||" "!" "?" "~" "==" "!=" "<" "<=" ">=" ">" "=" "<-" "<<-" "->" "->>" - "$" "@" ":" "::" ":::" ":=")) + "$" "@" ":" "::" ":::" ":=" + "|>" "=>")) (defvar ess-r-keywords-re (concat (regexp-opt ess-r-keywords-list) "\\_>")) @@ -335,25 +340,6 @@ content. Return nil when the end of the buffer is reached." (ess-forward-sexp) "%infix%"))) -(defun ess-escape-token () - (ess-escape-comment) - (ess-skip-blanks-forward) - (or (ess-escape-string) - (when (ess-token-delimiter-p (ess-token-after)) - (prog1 t - (mapc (lambda (delims) - (while (and (ess-token-after= nil delims) - (eq (char-before) (string-to-char - (car delims)))) - (ess-backward-char))) - '(("[" "[[") ("]" "]]"))))) - (ess-token-after= '("," ";")) - (and (ess-token-after= "identifier") - (not (memq (char-syntax (char-before)) '(?w ?_)))) - (progn (skip-syntax-backward ".") - (ess-token-operator-p (ess-token-after))) - (/= (skip-syntax-backward "w_") 0))) - (defun ess-refine-token (token) (let ((refined-type (pcase (ess-token-type token) @@ -402,15 +388,6 @@ content. Return nil when the end of the buffer is reached." (nth 1 token)) token))) -(defun ess-token-balancing-delim (token) - (pcase (ess-token-type token) - (`"(" ")") - (`")" "(") - (`"[" "]") - (`"]" "[") - (`"[[" "]]") - (`"]]" "[["))) - ;;;*;;; Token predicates @@ -452,294 +429,6 @@ content. Return nil when the end of the buffer is reached." (member (ess-token-type token) ess-r-keywords-list)) -;;;*;;; Tokens properties and accessors - -(defun ess-token-make-hash (&rest specs) - (let ((table (make-hash-table :test #'equal))) - (mapc (lambda (spec) - ;; alist - (if (listp (cdr spec)) - (mapc (lambda (cell) - (puthash (car cell) (cdr cell) table)) - spec) - ;; Cons cell - (mapc (lambda (token) - (puthash token (cdr spec) table)) - (car spec)))) - specs) - table)) - -(defvar ess-token-r-powers-delimiters - '(("(" . 100) - ("[" . 100) - ("[[" . 100))) - -(defvar ess-token-r-powers-operator - '(("?" . 5) - ("else" . 8) - ("<-" . 10) - ("<<-" . 10) - ("=" . 15) - ("->" . 20) - ("->>" . 20) - ("~" . 25) - ("|" . 30) - ("||" . 30) - ("&" . 35) - ("&&" . 35) - ("!" . 40) - ("<" . 45) - (">" . 45) - ("<=" . 45) - (">=" . 45) - ("==" . 45) - ("+" . 50) - ("-" . 50) - ("*" . 55) - ("/" . 55) - ("%infix%" . 60) - (":" . 65) - ("^" . 70) - ("$" . 75) - ("@" . 75) - ("::" . 80) - (":::" . 80))) - -(defvar ess-token-r-power-table - (ess-token-make-hash ess-token-r-powers-operator - ess-token-r-powers-delimiters)) - -(defvar ess-token-r-right-powers-operator - '((")" . 1))) - -(defvar ess-token-r-right-power-table - (ess-token-make-hash ess-token-r-powers-operator - ess-token-r-right-powers-operator)) - -(defvar ess-token-r-nud-table - (ess-token-make-hash - '(("identifier" . identity) - ("literal" . identity) - ("number" . identity) - ("function" . identity) - ("if" . identity) - ("while" . identity) - ("for" . identity)) - '(("(" . ess-parser-nud-block) - ("{" . ess-parser-nud-block)))) - -(defvar ess-token-r-rnud-table - (ess-token-make-hash - '(("identifier" . identity) - ("literal" . identity) - ("number" . identity)) - '((")" . ess-parser-rnud-paren) - ("}" . ess-parser-nud-block)))) - -(defvar ess-token-r-leds-operator - (let ((operators-list (append '("%infix%" "else") ess-r-operators-list))) - (cons operators-list #'ess-parser-led-lassoc))) - -(defvar ess-token-r-leds-delimiter - '(("(" . ess-parser-led-funcall) - ("[" . ess-parser-led-funcall) - ("[[" . ess-parser-led-funcall))) - -(defvar ess-token-r-led-table - (ess-token-make-hash ess-token-r-leds-operator - ess-token-r-leds-delimiter)) - -(defvar ess-token-r-rid-table - (ess-token-make-hash - '((")" . ess-parser-rid-expr-prefix)))) - - -;;;*;;; Nud, led and rid functions - -(defun ess-parser-nud-block (prefix-token) - (let ((right (list (cons "TODO" nil)))) - (ess-parser-advance-pair nil prefix-token) - (ess-node (cons "block" nil) - (cons (ess-token-start prefix-token) (point)) - (list prefix-token right)))) - -(defun ess-parser-led-lassoc (start infix-token) - (let* ((power (ess-parser-power infix-token)) - (end (ess-parse-expression power))) - (ess-node (cons "binary-op" nil) - (cons (ess-parser-token-start start) (point)) - (list start infix-token end)))) - -(defun ess-parser-led-funcall (left infix-token) - (when (ess-token= left (append '("identifier" "string" "node") - ess-r-prefix-keywords-list)) - (let* ((power (ess-parser-power infix-token)) - (right (ess-parse-arglist power infix-token)) - (type (if (ess-token= left ess-r-prefix-keywords-list) - "prefixed-expr" - "funcall"))) - (when (string= type "prefixed-expr") - (setq right (list right (ess-parse-expression 0)))) - (ess-node (cons type nil) - (cons (ess-parser-token-start left) (point)) - (list left right))))) - -(defun ess-parser-rid-expr-prefix (right suffix-token) - (when (ess-refined-token= suffix-token "prefixed-expr-delimiter") - (ess-parser-rnud-paren suffix-token right))) - -(defun ess-parser-rnud-paren (suffix-token &optional prefixed-expr) - (let* ((infix-token (save-excursion - (ess-parser-advance-pair nil suffix-token))) - (power (ess-parser-power infix-token)) - (args (ess-parse-arglist power suffix-token)) - (left (if prefixed-expr - (ess-parser-advance) - (ess-parse-expression power))) - (type (cond (prefixed-expr "prefixed-expr") - (left "funcall") - (t "enclosed-expr")))) - (when prefixed-expr - (setcdr (car prefixed-expr) (list infix-token suffix-token))) - (ess-node (cons type nil) - (cons (ess-parser-token-start suffix-token) (point)) - (if prefixed-expr - (list prefixed-expr args left) - (list args left))))) - - -;;;*;;; Parsing - -(defun ess-parser-advance (&optional type value) - (if (bound-and-true-p ess-parser--backward) - (ess-climb-token type value) - (ess-jump-token type value))) - -(defun ess-parser-advance-pair (&optional type token) - (if (bound-and-true-p ess-parser--backward) - (ess-climb-paired-delims type token) - (ess-jump-paired-delims type token))) - -(defun ess-parser-next-token () - (if (bound-and-true-p ess-parser--backward) - (ess-token-before) - (ess-token-after))) - -(defun ess-parser-token-start (token) - (if (bound-and-true-p ess-parser--backward) - (ess-token-end token) - (ess-token-start token))) - -(defun ess-parser-power (token) - (or (if (bound-and-true-p ess-parser--backward) - (gethash (ess-token-type token) ess-token-r-right-power-table) - (gethash (ess-token-type token) ess-token-r-power-table)) - 0)) - -(defun ess-node (type pos contents) - (let ((pos (if (bound-and-true-p ess-parser--backward) - (cons (cdr pos) (car pos)) - pos)) - (contents (if (bound-and-true-p ess-parser--backward) - (nreverse contents) - contents))) - (list type pos contents))) - -(defalias 'ess-node-start #'ess-token-start) -(defalias 'ess-node-end #'ess-token-end) - -(defun ess-parse-start-token (token) - (let* ((table (if (bound-and-true-p ess-parser--backward) - ess-token-r-rnud-table - ess-token-r-nud-table)) - (nud (gethash (ess-token-type token) table))) - (when (fboundp nud) - (funcall nud token)))) - -(defun ess-parse-infix-token (infix-token left) - (let ((infix-power (ess-parser-power infix-token)) - (led (or (when (bound-and-true-p ess-parser--backward) - (gethash (ess-token-type infix-token) ess-token-r-rid-table)) - (gethash (ess-token-type infix-token) ess-token-r-led-table)))) - (funcall led left infix-token))) - -(defun ess-parse-expression (&optional power) - (let ((current (ess-parse-start-token (ess-parser-advance))) - (power (or power 0)) - (next (ess-parser-next-token)) - (last-sucessful-pos (point)) - last-success) - (setq last-success current) - (while (and current (< power (ess-parser-power next))) - (ess-parser-advance) - (when (setq current (ess-parse-infix-token next current)) - (setq last-sucessful-pos (point)) - (setq last-success current)) - (setq next (ess-parser-next-token))) - (goto-char last-sucessful-pos) - last-success)) - -(defun ess-parse-arglist (power start-token) - (let ((start-pos (point)) - (arg-start-pos (point)) - (arglist (list start-token)) - (closing-delim (ess-token-balancing-delim start-token)) - expr) - (while (and (setq expr (ess-parse-expression)) - (push (ess-node (cons "arg" nil) - (cons arg-start-pos (point)) - (list expr)) - arglist) - (ess-parser-advance ",")) - (setq arg-start-pos (point))) - (push (ess-parser-advance closing-delim) arglist) - (ess-node (cons "arglist" nil) - (cons start-pos (1- (point))) - (nreverse arglist)))) - -(defun forward-ess-r-expr () - (interactive) - (ess-save-excursion-when-nil - (ess-escape-token) - (ess-parse-expression))) - -(defun forward-ess-r-sexp () - (interactive) - (ess-save-excursion-when-nil - (ess-escape-token) - (let* ((orig-token (ess-token-after)) - (tree (ess-parse-expression)) - (sexp-node (ess-parser-tree-assoc orig-token tree))) - (when sexp-node - (goto-char (ess-token-end sexp-node)) - sexp-node)))) - -(defun backward-ess-r-expr () - (interactive) - (let ((ess-parser--backward t)) - (ess-parse-expression))) - -(defun backward-ess-r-sexp () - (interactive) - (error "Todo")) - -(defun ess-parser-tree-assoc (key tree) - (let ((next tree) - stack last-node result) - (while (and next (null result)) - (cond ((eq next 'node-end) - (pop last-node)) - ((nth 2 next) - (push 'node-end stack) - (dolist (node (nth 2 next)) - (push node stack)) - (push next last-node)) - ((equal next key) - (setq result (car last-node)))) - (setq next (pop stack))) - result)) - - ;;*;; Point predicates (defun ess-inside-call-p (&optional call) @@ -909,7 +598,7 @@ nil, return the prefix." (defun ess-behind-prefixed-block-p (&optional call) (if call (looking-at (concat call "[ \t]*(")) - (cl-some 'looking-at ess-prefixed-block-patterns))) + (cl-some #'looking-at ess-prefixed-block-patterns))) (defun ess-unbraced-block-p (&optional ignore-ifelse) "This indicates whether point is in front of an unbraced @@ -921,7 +610,7 @@ position of the control flow function (if, for, while, etc)." (not ignore-ifelse)) (and (looking-at "(") (ess-backward-sexp) - (cl-some 'looking-at ess-prefixed-block-patterns) + (cl-some #'looking-at ess-prefixed-block-patterns) (if ignore-ifelse (not (looking-at "if\\b")) t))) diff --git a/elpa/ess-20230419.1527/ess-r-xref.el b/elpa/ess-20230419.1527/ess-r-xref.el new file mode 100644 index 00000000..474cf903 --- /dev/null +++ b/elpa/ess-20230419.1527/ess-r-xref.el @@ -0,0 +1,155 @@ +;;; ess-r-xref.el --- An xref backend for R. -*- lexical-binding: t -*- + +;; Copyright (C) 2018-2020 Free Software Foundation, Inc. +;; Author: Aaron Jacobs +;; Created: 21 January 2018 +;; Maintainer: ESS-core + +;; This file is part of GNU Emacs. + +;;; License: +;; +;; This program 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 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; + +;;; Commentary: + +;; This file contains an xref backend for `ess-r-mode'. + +;;; Code: + +(require 'xref) +(require 'ess-inf) +(require 'ess-r-package) +(require 'ess-tracebug) +(eval-when-compile + (require 'subr-x)) + +;; Silence the byte compiler. OK because this file is only loaded by ess-r-mode. +(declare-function inferior-ess-r-force "ess-r-mode") + + +(defvar ess-r-xref-pkg-sources nil + "Alist of R package->directory associations. +Each element is a cons cell (PACKAGE . DIRECTORY). This variable +is used as a cache of package->directory associations, but could +be used by the users for a more refined control of package +locations than `ess-r-package-library-paths'.") + +(defun ess-r-xref-backend () + "An `xref-backend-functions' implementation for `ess-r-mode'. +R's xref backend searches for `ess-r-package-library-paths' when +srcrefs point to temporary locations." + 'ess-r) + +(cl-defmethod xref-backend-identifier-at-point ((_backend (eql ess-r))) + (when-let ((sym (ess-symbol-at-point))) + (symbol-name sym))) + +(cl-defmethod xref-backend-definitions ((_backend (eql ess-r)) symbol) + (when-let ((xref (ess-r-xref--xref symbol))) + (list xref))) + +(cl-defmethod xref-backend-apropos ((_backend (eql ess-r))) + ;; Not yet supported. + nil) + +(cl-defmethod xref-backend-identifier-completion-table ((_backend (eql ess-r))) + (inferior-ess-r-force) + (ess-get-words-from-vector--foreground ".ess_all_functions()\n")) + +(defun ess-r-xref--srcref (symbol) + (inferior-ess-r-force) + ;; Look for `symbol' inside the package namespace + (let* ((pkg (ess-r-package-name)) + (pkg (if pkg + (concat "\"" pkg "\"") + "NULL"))) + (with-current-buffer (ess-command (format ".ess_srcref(\"%s\", %s)\n" symbol pkg)) + (goto-char (point-min)) + (if (re-search-forward "Error" nil t) + (progn (message "R srcref lookup failed:\n%s" (buffer-string)) + (sit-for 1) + nil) + (when (re-search-forward "(" nil 'noerror) + (goto-char (match-beginning 0)) + (read (current-buffer))))))) + +(defun ess-r-xref--pkg-srcfile (symbol src-file &optional default-pkg) + "Search the R package containing symbol SYMBOL for file SRC-FILE. +DEFAULT-PKG is the name of the package where presumably SYMBOL is located." + (let* ((pkgs (delq nil + (delete-dups + (or (cons default-pkg + (ess-get-words-from-vector (format ".ess_fn_pkg(\"%s\")\n" symbol))) + (user-error "Can't find package for symbol %s" symbol))))) + (lib-dirs (cond ((stringp ess-r-package-library-paths) + (list ess-r-package-library-paths)) + ((listp ess-r-package-library-paths) + ess-r-package-library-paths) + (t (user-error "Invalid value of `ess-r-package-library-paths'")))) + (loc (or (cl-loop for pkg in pkgs + for dir = (assoc-default pkg ess-r-xref-pkg-sources) + when (and dir (file-exists-p dir)) return (cons pkg dir)) + (cl-some (lambda (dir) + (cl-loop for pkg in pkgs + for path = (expand-file-name pkg dir) + when (file-exists-p path) return (cons pkg path))) + lib-dirs))) + (file (when loc (expand-file-name src-file (cdr loc))))) + (when file + (unless (file-readable-p file) + (error "Can't read %s" file)) + ;; Cache package's source directory. + (unless (assoc (car loc) ess-r-xref-pkg-sources) + (push loc ess-r-xref-pkg-sources)) + file))) + +(defun ess-r-xref--xref (symbol) + "Create an xref for the source file reference of R symbol SYMBOL." + (when-let ((ref (ess-r-xref--srcref symbol))) + (let ((file (nth 0 ref)) + (line (nth 1 ref)) + (col (nth 2 ref))) + (or + ;; 1) Result of ESS evaluation + (let* ((ess-ref (gethash file ess--srcrefs)) + (ess-buff (when ess-ref (ess--dbg-find-buffer (car ess-ref))))) + (when ess-buff + ;; FIXME: this breaks when eval is on larger spans than function + (xref-make symbol (xref-make-buffer-location ess-buff (nth 2 ess-ref))))) + ;; 2) Real file from R proc working directory + (unless (file-name-absolute-p file) + (let ((file (expand-file-name file (ess-get-process-variable 'default-directory)))) + (when (file-readable-p file) + (xref-make symbol (xref-make-file-location file line col))))) + ;; 3) Real file from the R's working directory + (unless (file-name-absolute-p file) + (when-let ((wdir (car (ess-get-words-from-vector ess-getwd-command)))) + (let ((file (expand-file-name file wdir))) + (when (file-readable-p file) + (xref-make symbol (xref-make-file-location file line col)))))) + ;; 4) Real file location from the current directory + (when (file-readable-p file) + (xref-make symbol (xref-make-file-location file line col))) + ;; 5) Temporary sources - truncate and locate in ess-r-package-library-paths + (when (string-match "/\\([^/]+\\)/\\(R/.*\\)$" file) + (when-let ((pkg-file (ess-r-xref--pkg-srcfile + symbol (match-string 2 file) (match-string 1 file)))) + (xref-make symbol (xref-make-file-location + (expand-file-name pkg-file) line col)))))))) + +(provide 'ess-r-xref) + +;;; ess-r-xref.el ends here diff --git a/elpa/ess-20191014.1343/ess-rd.el b/elpa/ess-20230419.1527/ess-rd.el similarity index 87% rename from elpa/ess-20191014.1343/ess-rd.el rename to elpa/ess-20230419.1527/ess-rd.el index e8f03b8a..05252b23 100644 --- a/elpa/ess-20191014.1343/ess-rd.el +++ b/elpa/ess-20230419.1527/ess-rd.el @@ -1,29 +1,27 @@ ;; ess-rd.el --- Support for editing R documentation (Rd) source -*- lexical-binding: t; -*- -;; Copyright (C) 1997--2005 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: KH ;; Created: 25 July 1997 ;; Maintainer: ESS-core -;; This file is part of ESS (Emacs Speaks Statistics). +;; This file is part of GNU Emacs. -;; This file is free software; you may 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. +;;; License: ;; -;; This 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 -;; for more details. +;; This program 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 3 of the License, or +;; (at your option) any later version. ;; -;; A copy of the GNU General Public License is available on the World -;; Wide Web at https://www.gnu.org/copyleft/gpl.html. You can also -;; obtain it by writing to the Free Software Foundation, Inc., 675 Mass -;; Ave, Cambridge, MA 02139, USA. - +;; This program 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 for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: ;; @@ -131,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 /share/Rd/macros/system.Rd ): "CRANpkg" "PR" "sspace" "doi" + "LaTeX" + "proglang" "packageTitle" "packageDescription" "packageAuthor" "packageMaintainer" "packageDESCRIPTION" "packageIndices" )) @@ -149,12 +150,12 @@ All Rd mode abbrevs start with a grave accent (`)." (list (cons (concat "\\\\\\(" - (mapconcat 'identity Rd-section-names "\\|") + (mapconcat #'identity Rd-section-names "\\|") "\\>\\)") 'font-lock-reference-face) ; Rd-bold-face (cons (concat "\\\\\\(" - (mapconcat 'identity Rd-keywords "\\|") + (mapconcat #'identity Rd-keywords "\\|") "\\>\\)") 'font-lock-keyword-face) '("^#\\(ifn?def\\)\\s-+\\(\\sw+\\)" @@ -174,6 +175,7 @@ All Rd mode abbrevs start with a grave accent (`)." (define-key map "\C-c\C-p" #'Rd-preview-help) (define-key map "\C-c\C-j" #'Rd-mode-insert-item) (define-key map "\C-c\C-e" #'Rd-mode-insert-skeleton) + (define-key map "\C-c\C-d" #'Rd-mode-insert-data-skeleton) (define-key map "\C-c\C-f" #'Rd-font) (define-key map "\C-c\C-s" #'Rd-mode-insert-section) (define-key map "\C-c\C-n" #'ess-eval-line-visibly-and-step) @@ -193,6 +195,7 @@ All Rd mode abbrevs start with a grave accent (`)." ["Insert Item" Rd-mode-insert-item t] ["Insert Section" Rd-mode-insert-section t] ["Insert Skeleton" Rd-mode-insert-skeleton t] + ["Insert Data Skeleton" Rd-mode-insert-data-skeleton t] "-" ["Preview" Rd-preview-help t] "-" @@ -238,12 +241,12 @@ Type \\[list-abbrevs] to display the built-in abbrevs for Rd keywords.To automatically turn on the abbrev(iate) features, add the following to your Emacs configuration file: - (add-hook 'Rd-mode-hook #'abbrev-mode)" + (add-hook \\='Rd-mode-hook #\\='abbrev-mode)" (setq ess-language "S" ess-dialect "R") (require 'ess-r-mode) (ess-setq-vars-local ess-r-customize-alist) - (setq-local indent-line-function 'Rd-mode-indent-line) + (setq-local indent-line-function #'Rd-mode-indent-line) (setq fill-column 72) (setq-local comment-start-skip "\\s<+\\s-*") (setq-local comment-start "% ") @@ -303,7 +306,7 @@ the following to your Emacs configuration file: 0) (t (let ((p (progn - (re-search-forward "[ \t]*\\s)*" (point-at-eol) t) + (re-search-forward "[ \t]*\\s)*" (line-end-position) t) (point)))) (if (or (< (forward-line -1) 0) (Rd-mode-in-verbatim-p)) @@ -313,7 +316,7 @@ the following to your Emacs configuration file: (Rd-mode-in-preprocessor-line-p)) (not (bobp))) (forward-line -1)) - (re-search-forward "[ \t]*\\s)*" (point-at-eol) t) + (re-search-forward "[ \t]*\\s)*" (line-end-position) t) (prog1 (+ (current-indentation) (* (car (parse-partial-sexp (point) p)) @@ -367,6 +370,25 @@ the following to your Emacs configuration file: (insert "\\author{}\n") (insert "\\keyword{}\n")) +(defun Rd-mode-insert-data-skeleton () + "Insert several empty Rd fields." + (interactive) + ;; Hmm: in theory this should be kept in sync with prompt() + ;; --- maybe using prompt() [or promptClass()...] would be better anyway?! + (insert "\\name{}\n") + (insert "\\docType{}\n") + (insert "\\alias{}\n") + (insert "\\title{}\n") + (insert "\\description{\n}\n") + (insert "\\usage{\n}\n") + (insert "\\format{\n}\n") + (insert "\\details{\n}\n") + (insert "\\source{}\n") + (insert "\\references{\n}\n") + (insert "\\examples{\n}\n") + (insert "\\keyword{datasets}\n")) + + ;; This is an `easy' version of (defun TeX-font ..) in AUCtex's tex.el ; ;; see TeX-font-list and also LaTeX-font-list in latex.el @@ -435,7 +457,7 @@ temporary one in variable `temporary-file-directory'." (shell-command shcmd t)) ;; else directly: (ess-force-buffer-current "R process to use: ") - (ess-command (format ".ess_Rd2txt(\"%s\")\n" file) pbuf) + (ess--foreground-command (format ".ess_Rd2txt(\"%s\")\n" file) pbuf) (set-buffer pbuf)) ;; FIXME(2): once got rid of via-shell, consider @@ -456,7 +478,7 @@ temporary one in variable `temporary-file-directory'." (unless (get-buffer-window pbuf 'visible) (display-buffer pbuf t)))) -(define-obsolete-function-alias 'Rd-submit-bug-report 'ess-submit-bug-report "2018-08-16") +(define-obsolete-function-alias 'Rd-submit-bug-report #'ess-submit-bug-report "2018-08-16") (provide 'ess-rd) diff --git a/elpa/ess-20191014.1343/ess-rdired.el b/elpa/ess-20230419.1527/ess-rdired.el similarity index 85% rename from elpa/ess-20191014.1343/ess-rdired.el rename to elpa/ess-20230419.1527/ess-rdired.el index 312a0f9a..35449f33 100644 --- a/elpa/ess-20191014.1343/ess-rdired.el +++ b/elpa/ess-20230419.1527/ess-rdired.el @@ -1,36 +1,34 @@ ;;; ess-rdired.el --- prototype object browser for R, looks like dired mode. -*- lexical-binding: t; -*- -;; Copyright (C) 2002--2019 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, Stephen Eglen, and J. Alexander Branham. - +;; Copyright (C) 2002-2022 Free Software Foundation, Inc. ;; Author: Stephen Eglen ;; Created: Thu 24 Oct 2002 ;; Maintainer: ESS-core -;; This file is part of ESS - -;; This file is not part of GNU Emacs. +;; This file is part of GNU Emacs. -;; ess-rdired.el is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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-rdired.el is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;;; Commentary: ;; This provides a dired-like buffer for R objects. Instead of ;; operating on files, we operate on R objects in the current ;; environment. Objects can be viewed, edited, deleted, plotted and ;; so on. - -;;; Commentary: - ;; Do "M-x R" to start an R session, then create a few variables: ;; ;; s <- sin(seq(from=0, to=8*pi, length=100)) @@ -78,33 +76,8 @@ (eval-when-compile (require 'subr-x)) -(defvar ess-rdired-objects "local({.rdired.objects <- function(objs) { - if (length(objs)==0) { - \"No objects to view!\" - } else { - mode <- sapply(objs, function(my.x) { - eval( parse( text=sprintf('data.class(get(\"%s\"))', my.x))) }) - length <- sapply(objs, function(my.x) { - eval( parse( text=sprintf('length(get(\"%s\"))', my.x))) }) - size <- sapply(objs, function(my.x) { - eval( parse( text=sprintf('format(object.size(get(\"%s\")), units=\"b\")', my.x))) }) - d <- data.frame(mode, length, size) - - var.names <- row.names(d) - - ## If any names contain spaces, we need to quote around them. - quotes = rep('', length(var.names)) - spaces = grep(' ', var.names) - if (any(spaces)) - quotes[spaces] <- '\"' - var.names = paste(quotes, var.names, quotes, sep='') - row.names(d) <- paste(' ', var.names, sep='') - d - } -}; cat('\n'); print(.rdired.objects(ls(envir = .GlobalEnv)))})\n" - "Function to call within R to print information on objects. -The last line of this string should be the instruction to call -the function which prints the output for rdired.") +(defvar ess-rdired-objects ".ess.rdired()\n" + "Function to call within R to print information on objects.") (defvar ess-rdired-buffer "*R dired*" "Name of buffer for displaying R objects.") @@ -175,12 +148,12 @@ details." text) (when (and proc-name proc (not (process-get proc 'busy))) - (ess-command ess-rdired-objects out-buff nil nil nil proc) + (ess--foreground-command ess-rdired-objects out-buff nil nil nil proc) (with-current-buffer out-buff (goto-char (point-min)) ;; Delete two lines. One filled with +'s from R's prompt ;; printing, the other with the header info from the data.frame - (delete-region (point-min) (1+ (point-at-eol 2))) + (delete-region (point-min) (1+ (line-end-position 2))) (setq text (split-string (buffer-string) "\n" t "\n")) (erase-buffer)) (with-current-buffer buff diff --git a/elpa/ess-20191014.1343/ess-roxy.el b/elpa/ess-20230419.1527/ess-roxy.el similarity index 93% rename from elpa/ess-20191014.1343/ess-roxy.el rename to elpa/ess-20230419.1527/ess-roxy.el index 290deefa..00b172c2 100644 --- a/elpa/ess-20191014.1343/ess-roxy.el +++ b/elpa/ess-20230419.1527/ess-roxy.el @@ -1,28 +1,25 @@ -;;; ess-roxy.el --- convenient editing of in-code roxygen documentation -;; -;; Copyright (C) 2009--2018 Henning Redestig, A.J. Rossini, Richard -;; M. Heiberger, Martin Maechler, Kurt Hornik, Rodney Sparapani, Stephen -;; Eglen, Vitalie Spinu, and J. Alexander Branham. -;; +;;; ess-roxy.el --- convenient editing of in-code roxygen documentation -*- lexical-binding: t; -*- + +;; Copyright (C) 2009-2022 Free Software Foundation, Inc. ;; Author: Henning Redestig -;; Keywords: convenience, tools -;; -;; This file is part of ESS + +;; This file is part of GNU Emacs. + +;;; License: ;; -;; This program 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 3 of the -;; License, or (at your option) any later version. +;; This program 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 3 of the License, or +;; (at your option) any later version. ;; -;; This program 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 for more details. +;; This program 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 for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see -;; . - +;; ;;; Commentary: @@ -91,8 +88,8 @@ (define-key map (kbd "C-c C-o C-t") #'ess-roxy-preview-text) (define-key map (kbd "C-c C-o C-c") #'ess-roxy-toggle-roxy-region) (define-key map [remap back-to-indentation] #'ess-roxy-goto-end-of-roxy-comment) - (define-key map [remap newline] #'ess-roxy-newline-and-indent) - (define-key map [remap newline-and-indent] #'ess-roxy-newline-and-indent) + (define-key map [remap newline] #'ess-roxy-newline) + (define-key map [remap newline-and-indent] #'ess-roxy-newline) (define-key map [remap ess-indent-command] #'ess-roxy-ess-indent-command) (define-key map [remap move-beginning-of-line] #'ess-roxy-move-beginning-of-line) (define-key map [remap beginning-of-visual-line] #'ess-roxy-move-beginning-of-line) @@ -146,16 +143,16 @@ Use you regular key for `outline-show-entry' to reveal it.") ;; Autofill (setq-local paragraph-start (concat "\\(" ess-roxy-re "\\)*" paragraph-start)) (setq-local paragraph-separate (concat "\\(" ess-roxy-re "\\)*" paragraph-separate)) - (setq-local adaptive-fill-function 'ess-roxy-adaptive-fill-function) + (setq-local adaptive-fill-function #'ess-roxy-adaptive-fill-function) ;; Hooks - (add-hook 'ess-presend-filter-functions 'ess-roxy-remove-roxy-re nil t)) + (add-hook 'ess-presend-filter-functions #'ess-roxy-remove-roxy-re nil t)) ;; Turn off `ess-roxy-mode': ;; Hideshow (when (and ess-roxy-hide-show-p hs-minor-mode) (hs-show-all) (hs-minor-mode)) ;; Hooks - (remove-hook 'ess-presend-filter-functions 'ess-roxy-remove-roxy-re t) + (remove-hook 'ess-presend-filter-functions #'ess-roxy-remove-roxy-re t) (font-lock-remove-keywords nil ess-roxy-font-lock-keywords) ;; (setq-local syntax-propertize-function nil) ;; (setq-local font-lock-fontify-region-function nil) @@ -183,7 +180,7 @@ Use you regular key for `outline-show-entry' to reveal it.") (unless (featurep 'outline-magic) (error "Please install and load outline-magic")) ;; Don't show children when cycling @examples - (let ((this-command 'outline-cycle-overwiew)) + (let ((this-command 'outline-cycle-overview)) (ess-roxy-substitute-outline-regexp #'outline-cycle))) (defun ess-roxy-show-example () @@ -203,17 +200,12 @@ Use you regular key for `outline-show-entry' to reveal it.") (when (ess-roxy-entry-p "examples") (ess-roxy-hide-example))))) -(when (featurep 'outline-magic) - (substitute-key-definition 'outline-cyle - 'ess-roxy-cyle-example - ess-roxy-mode-map outline-mode-menu-bar-map)) - -(substitute-key-definition 'outline-hide-entry - 'ess-roxy-hide-example +(substitute-key-definition #'outline-hide-entry + #'ess-roxy-hide-example ess-roxy-mode-map outline-minor-mode-map) -(substitute-key-definition 'outline-show-entry - 'ess-roxy-show-example +(substitute-key-definition #'outline-show-entry + #'ess-roxy-show-example ess-roxy-mode-map outline-minor-mode-map) @@ -222,7 +214,7 @@ Use you regular key for `outline-show-entry' to reveal it.") (defun ess-back-to-roxy () "Go to roxy prefix." (end-of-line) - (re-search-backward (concat ess-roxy-re " ?") (point-at-bol)) + (re-search-backward (concat ess-roxy-re " ?") (line-beginning-position)) (goto-char (match-end 0))) (defun ess-roxy-beg-of-entry () @@ -603,11 +595,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") @@ -705,7 +697,7 @@ block before the point." (save-excursion (if (ess-roxy-entry-p) (progn - (goto-char (point-at-bol)) + (goto-char (line-beginning-position)) (search-forward-regexp ess-roxy-re)) (if not-here (search-backward-regexp ess-roxy-re))) @@ -728,7 +720,7 @@ block before the point." See `hs-show-block' and `ess-roxy-hide-block'." (interactive) (hs-life-goes-on - (if (hs-overlay-at (point-at-eol)) + (if (hs-overlay-at (line-end-position)) (hs-show-block) (ess-roxy-hide-block)))) @@ -808,7 +800,7 @@ Assumes point is at the beginning of the function." (defun ess-roxy-tag-completion () "Completion data for Emacs >= 24." - (when (save-excursion (re-search-backward "@\\<\\(\\w*\\)" (point-at-bol) t)) + (when (save-excursion (re-search-backward "@\\<\\(\\w*\\)" (line-beginning-position) t)) (let ((beg (match-beginning 1)) (end (match-end 1))) (when (and end (= end (point))) @@ -818,23 +810,20 @@ Assumes point is at the beginning of the function." "Remove `ess-roxy-str' from STRING before sending to R process. Useful for sending code from example section. This function is placed in `ess-presend-filter-functions'." - ;; Only strip the prefix in the @examples field, and only when - ;; STRING is entirely contained inside it. This allows better - ;; behavior for evaluation of regions. - (let ((roxy-re ess-roxy-re)) - (if (and (ess-roxy-entry-p "examples") - ;; don't send just @examples if we're looking at a line - ;; like: ##' @examples - (not (string-match-p (concat roxy-re "[[:space:]]*@") string)) - ;; (with-temp-buffer - ;; ;; Need to carry the buffer-local value of - ;; ;; `ess-roxy-re' into the temp buffer: - ;; (setq ess-roxy-re roxy-re) - ;; (insert string) - ;; (ess-roxy-entry-p)) - ) - (replace-regexp-in-string (concat ess-roxy-re "\\s-*") "" string) - string))) + ;; In the future we might want to detect chunks between markdown + ;; fences and strip everything that comes before `@examples` + (if (ess-roxy--all-prefixed string) + (replace-regexp-in-string (concat ess-roxy-re "\\s-*") "" string) + string)) + +(defun ess-roxy--all-prefixed (string) + (let ((ess-roxy-re-lexical ess-roxy-re)) + (with-temp-buffer + (insert string) + (goto-char 0) + (while (and (looking-at-p ess-roxy-re-lexical) + (re-search-forward "\n" nil t))) + (looking-at-p ess-roxy-re-lexical)))) (defun ess-roxy-find-par-end (stop-point &rest stoppers) (mapc #'(lambda (stopper) @@ -971,7 +960,8 @@ If not in a roxygen entry, call `back-to-indentation'." (if (ess-roxy-entry-p) (progn (end-of-line) - (re-search-backward (concat ess-roxy-re " *") (point-at-bol) t) + (re-search-backward (concat ess-roxy-re " *") + (line-beginning-position) t) (goto-char (match-end 0))) (back-to-indentation))) @@ -980,7 +970,9 @@ If not in a roxygen entry, call `back-to-indentation'." (indent-new-comment-line) (ess-roxy-indent-on-newline))) -(defun ess-roxy-newline-and-indent () +(define-obsolete-function-alias 'ess-roxy-newline-and-indent + #'ess-roxy-newline "ESS 19.04") +(defun ess-roxy-newline () "Start a newline and insert the roxygen prefix. Only do this if in a roxygen block and `ess-roxy-insert-prefix-on-newline' is non-nil." @@ -988,7 +980,7 @@ Only do this if in a roxygen block and (if (and (ess-roxy-entry-p) ess-roxy-insert-prefix-on-newline) (ess-roxy-indent-on-newline) - (newline-and-indent))) + (newline nil t))) (defun ess-roxy-indent-on-newline () "Insert a newline in a roxygen field." @@ -1019,7 +1011,7 @@ Only do this if in a roxygen block and ;; Return t to signal to go on to `c-fill-paragraph'. (t t))) -(advice-add 'c-fill-paragraph :before-while 'ess-roxy-cpp-fill-paragraph) +(advice-add 'c-fill-paragraph :before-while #'ess-roxy-cpp-fill-paragraph) (defun ess-roxy-enable-in-cpp () "Enable `ess-roxy-mode' in C++ buffers in R packages." @@ -1030,6 +1022,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 diff --git a/elpa/ess-20191014.1343/ess-s-lang.el b/elpa/ess-20230419.1527/ess-s-lang.el similarity index 92% rename from elpa/ess-20191014.1343/ess-s-lang.el rename to elpa/ess-20230419.1527/ess-s-lang.el index 738ef5b4..c02f9607 100644 --- a/elpa/ess-20191014.1343/ess-s-lang.el +++ b/elpa/ess-20230419.1527/ess-s-lang.el @@ -1,28 +1,27 @@ ;;; ess-s-lang.el --- Support for editing S source code -*- lexical-binding: t; -*- -;; Copyright (C) 1989-1997 D. Bates, Kademan, Ritter, D.M. Smith, K. Hornik, -;; R.M. Heiberger, M. Maechler, and A.J. Rossini. -;; Copyright (C) 1998-2015 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - +;; Copyright (C) 1989-2022 Free Software Foundation, Inc. ;; Author: A.J. Rossini ;; Created: 26 Aug 1997 ;; Maintainer: ESS-core -;; This file is part of ESS (Emacs Speaks Statistics). +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -30,8 +29,6 @@ ;;; Code: - ; Requires and autoloads - (require 'ess-mode) (require 'ess-help) (require 'ess-inf) @@ -265,7 +262,8 @@ Optional argument VERBOSE gives more verbose output." (defun ess-fix-dot (before-chars &optional dont-query verbose) "Remove trailing decimal '.' (\"dot\"), before BEFORE-CHARS. -Optional argument DONT-QUERY and VERBOSE get passed to `ess-replace-regexp-dump-to-src'." +Optional argument DONT-QUERY and VERBOSE get passed to +`ess-replace-regexp-dump-to-src'." ;; typically, before-chars = "]:" or more (ess-replace-regexp-dump-to-src (concat "\\([0-9]\\)\\.\\( *[" before-chars "]\\)") @@ -286,7 +284,7 @@ than `ess-fix-dot-1'." (ess-fix-dot ",)" dont-query verbose)) (defun ess-fix-EQ-assign (&optional dont-query verbose not-all) - "Replace \"=\" by \"<-\" in places where it 'might make sense', e.g., + "Replace \"=\" by \"<-\" in places where it `might make sense', e.g., for function assignments and lines not ending in \",\". Be *careful* for list()s of functions and when argument not-all is nil (as by default) !" @@ -403,6 +401,7 @@ keypress to repeat it, so if it is bound to \"C-c C-=\" pressing (not (and (re-search-backward str (- (point) (length str)) t) (not (replace-match (car slist)))))))) + (delete-horizontal-space) (insert (car ess-assign-list))) (set-transient-map (let ((map (make-sparse-keymap)) @@ -427,11 +426,12 @@ If `ess-language' is not \"S\", call `self-insert-command' with ARG." (if (and char (numberp event)) (replace-match char t t) (replace-match ""))) - (t (insert assign)))) + (t (delete-horizontal-space) + (insert assign)))) (funcall #'self-insert-command arg))) ;; In case people had this in their config don't cause errors: -(define-obsolete-function-alias 'ess-smart-S-assign 'ess-insert-assign "ESS 18.10") +(define-obsolete-function-alias 'ess-smart-S-assign #'ess-insert-assign "ESS 18.10") (define-obsolete-function-alias 'ess-disable-smart-S-assign #'ignore "ESS 18.10") (defun ess-add-MM-keys () @@ -449,8 +449,8 @@ Currently, this needs to: 2. format the statement, 3. c/function/Sfunc/ and I need to relearn Emacs lisp (but I had to, anyway." - (interactive "sFunction ? ") (declare (obsolete 'ess-execute "ESS 19.04")) + (interactive "sFunction ? ") (let* ((buffname "ess-complete.R")) (ess-execute (format "args(%s)" Sfunc) t buffname) (pop-to-buffer (concat "*" buffname "*")) @@ -479,8 +479,6 @@ ARG is ignored." (declare (obsolete "It is set automatically in major modes" "ESS 19.04")) (imenu-add-to-menubar "Imenu-S")) -(define-obsolete-function-alias 'ess-imenu-R 'ess-imenu-S "ESS 19.04") - ;;; Speedbar stuff. @@ -493,7 +491,7 @@ ARG is ignored." (cl-defmethod ess-help-get-topics (proc &context (ess-dialect "R")) "Return a list of current S help topics associated with process PROC. -If 'sp-for-help-changed?' process variable is non-nil or +If `sp-for-help-changed?' process variable is non-nil or `ess-help-topics-list' is nil, (re)-populate the latter and return it. Otherwise, return `ess-help-topics-list'." (with-ess-process-buffer nil @@ -510,24 +508,18 @@ return it. Otherwise, return `ess-help-topics-list'." (t ess-help-topics-list)))) -(defalias 'S 'S+) -(defalias 's-mode 'S+-mode) -(defalias 's-transcript-mode 'S+-transcript-mode) -(defalias 'S-transcript-mode 's-transcript-mode) -(defalias 'S-mode 's-mode) - +(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)) (define-obsolete-function-alias 'ess-toggle-S-assign-key #'ignore "ESS 18.10") -(define-obsolete-function-alias 'ess-smart-underscore 'ess-insert-assign "ESS 18.10") -(define-obsolete-function-alias 'ess-insert-S-assign 'ess-insert-assign "ESS 18.10") - -(define-obsolete-function-alias 'ess-toggle-underscore 'ess-disable-smart-S-assign "ESS 18.10") -(define-obsolete-function-alias 'ess-toggle-S-assign 'ess-disable-smart-S-assign "ESS 18.10") +(define-obsolete-function-alias 'ess-smart-underscore #'ess-insert-assign "ESS 18.10") +(define-obsolete-function-alias 'ess-insert-S-assign #'ess-insert-assign "ESS 18.10") ;;;###autoload (add-to-list 'auto-mode-alist '("\\.[Ss]t\\'" . S-transcript-mode)) ;;;###autoload -(add-to-list 'auto-mode-alist '("\\.Sout" . S-transcript-mode)) +(add-to-list 'auto-mode-alist '("\\.Sout\\'" . S-transcript-mode)) (provide 'ess-s-lang) diff --git a/elpa/ess-20191014.1343/ess-sas-a.el b/elpa/ess-20230419.1527/ess-sas-a.el similarity index 83% rename from elpa/ess-20191014.1343/ess-sas-a.el rename to elpa/ess-20230419.1527/ess-sas-a.el index 7cb6f6cb..3dfd1554 100644 --- a/elpa/ess-20191014.1343/ess-sas-a.el +++ b/elpa/ess-20230419.1527/ess-sas-a.el @@ -1,31 +1,33 @@ -;;; ess-sas-a.el --- clean-room implementation of many SAS-mode features - -;; Copyright (C) 1997--2009 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; ess-sas-a.el --- clean-room implementation of many SAS-mode features -*- lexical-binding: t; -*- +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: Rodney A. Sparapani ;; Maintainer: ESS-core@r-project.org ;; Created: 17 November 1999 ;; Keywords: languages -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Code: (require 'ess-mode) +(require 'ess-utils) ;; Silence the byte compiler ;; FIXME: This is a lot, perhaps they can be moved? (defvar sas-indent-width) @@ -85,7 +87,7 @@ or `ess-sas-data-view-insight'." (make-variable-buffer-local 'ess-sas-data-view-insight-statement) (defcustom ess-sas-graph-view-suffix-regexp - "[.]\\([eE]?[pP][sS]\\|[pP][dD][fF]\\|[gG][iI][fF]\\|[jJ][pP][eE]?[gG]\\|[tT][iI][fF][fF]?\\)" + "[.]\\([eE]?[pP][sS]\\|[pP][dD][fF]\\|[gG][iI][fF]\\|[jJ][pP][eE]?[gG]\\|[tT][iI][fF][fF]?\\|[pP][nN][gG]\\)" "GSASFILE suffix regexp." :group 'ess-sas :type 'string) @@ -93,28 +95,13 @@ or `ess-sas-data-view-insight'." (defcustom ess-sas-graph-view-viewer-alist ;;creates something like ;;'(("[pP][dD][fF]" . "/usr/local/bin/acroread") ("[eE]?[pP][sS]" . "/usr/local/bin/gv"))) - (let ((ess-tmp-alist nil) - (ess-tmp-ps nil) (ess-tmp-pdf nil)) - + (let ((ess-tmp-ps nil) (ess-tmp-pdf nil)) (setq ess-tmp-ps (executable-find (if ess-microsoft-p "gsview32" "gsview"))) - (if (not ess-tmp-ps) (setq ess-tmp-ps (executable-find "gv"))) - (if (not ess-tmp-ps) (setq ess-tmp-ps (executable-find "ghostview"))) - (setq ess-tmp-pdf (executable-find "evince")) - (if (not ess-tmp-pdf) (setq ess-tmp-pdf (executable-find "xpdf"))) - - (if (not ess-tmp-pdf) (setq ess-tmp-pdf (if ess-microsoft-p "acrord32" "acroread"))) - - (if (and ess-tmp-ps ess-tmp-pdf) - (setq ess-tmp-alist (list (cons "[eE]?[pP][sS]" ess-tmp-ps) - (cons "[pP][dD][fF]" ess-tmp-pdf))) - - (if ess-tmp-ps - (setq ess-tmp-alist (list (cons "[eE]?[pP][sS]" ess-tmp-ps) - (cons "[pP][dD][fF]" ess-tmp-ps)))))) + (if (not ess-tmp-pdf) (setq ess-tmp-pdf (if ess-microsoft-p "acrord32" "acroread")))) "Associate file name extensions with graphics image file viewers." :group 'ess-sas @@ -186,18 +173,18 @@ Virtual PC emulator on your Mac; buffer-local." "Method used by `ess-sas-submit'. The default is based on the value of the emacs variable `system-type' and, on Windows, the function `w32-shell-dos-semantics'. -'sh if *shell* runs sh, ksh, csh, tcsh or bash -'ms-dos if *shell* follows MS-DOS semantics +\\='sh if *shell* runs sh, ksh, csh, tcsh or bash +\\='ms-dos if *shell* follows MS-DOS semantics -Unix users will get 'sh by default. +Unix users will get \\='sh by default. -Windows users running bash in *shell* will get 'sh by default. +Windows users running bash in *shell* will get \\='sh by default. -Windows users running MS-DOS in *shell* will get 'ms-dos by default. +Windows users running MS-DOS in *shell* will get \\='ms-dos by default. Users accessing a remote machine with `telnet', `rlogin', `ssh', etc., -should set this variable to 'sh regardless of their local shell -(since their remote shell is 'sh).") +should set this variable to \\='sh regardless of their local shell +(since their remote shell is \\='sh).") (defcustom ess-sas-graph-view-viewer-default (if ess-microsoft-p "explorer" @@ -469,7 +456,7 @@ Use the current buffer if nil." (ess-sas--change-alist 'ess-kermit-remote-directory ess-kermit-remote-directory nil)) (define-obsolete-function-alias - 'ess-change-alist 'ess-sas--change-alist "ESS 18.10") + 'ess-change-alist #'ess-sas--change-alist "ESS 18.10") (defun ess-sas-data-view-fsview (&optional ess-sas-data) "Open a dataset for viewing with PROC FSVIEW." @@ -574,15 +561,22 @@ Use the current buffer if nil." (setq ess-tmp-graph (read-string "GSASFILE: " (or ess-tmp-graph ess-sas-file-path))) - ;;GNU Emacs graphics file image viewing mode loaded? - (if (and (bound-and-true-p auto-image-file-mode) +;; whether the image libraries are configured is what is important here + (if (and (string-match "JPEG" system-configuration-features) (string-match "[.][jJ][pP][eE]?[gG]" ess-tmp-graph)) (find-file ess-tmp-graph) - ;;else XEmacs graphics file image viewing mode loaded? - (if (and (fboundp 'image-mode) - (string-match "[.]\\([jJ][pP][eE]?[gG]\\|[gG][iI][fF]\\)" - ess-tmp-graph)) - (find-file ess-tmp-graph) + (if (and (string-match "PNG" system-configuration-features) + (string-match "[.][pP][nN][gG]" ess-tmp-graph)) + (find-file ess-tmp-graph) + ;; ;;GNU Emacs graphics file image viewing mode loaded? + ;; (if (and (bound-and-true-p auto-image-file-mode) + ;; (string-match "[.][jJ][pP][eE]?[gG]" ess-tmp-graph)) + ;; (find-file ess-tmp-graph) + ;; ;;else XEmacs graphics file image viewing mode loaded? + ;; (if (and (fboundp 'image-mode) + ;; (string-match "[.]\\([jJ][pP][eE]?[gG]\\|[gG][iI][fF]\\)" + ;; ess-tmp-graph)) + ;; (find-file ess-tmp-graph) ;;else use the appropriate graphics file image viewer (while (< ess-tmp-counter ess-tmp-length) (setq ess-tmp-graph-alist @@ -797,7 +791,7 @@ optional argument is non-nil, then set-buffer rather than switch." ) (if (eq ess-sas-submit-method 'sh) - (add-hook 'comint-output-filter-functions 'ess-exit-notify-sh)) ;; 19.28 + (add-hook 'comint-output-filter-functions #'ess-exit-notify-sh)) ;; 19.28 ;; nil t) works for newer emacsen ) ) @@ -879,30 +873,25 @@ optional argument is non-nil, then set-buffer rather than switch." ) ; else -(defun ess-sas-rtf-portrait (&optional ess-tmp-font-size) +(defun ess-sas-rtf-portrait (&optional _ess-tmp-font-size) "Creates an MS RTF portrait file from the current buffer." (interactive) -; (ess-sas-file-path t) (ess-revert-wisely) - (set-visited-file-name (concat (buffer-name) ".rtf")) -; (ess-sas-goto "rtf" t) - (if 'buffer-read-only (setq buffer-read-only nil)) - (ess-rtf-replace-chars) - - (goto-char (point-min)) - (insert (concat - "{\\rtf1\\ansi{\\fonttbl\\f1\\fmodern " ess-sas-rtf-font-name ";}\n" - "\\margl720\\margr720\\margt720\\margb720\n" - "{\\colortbl;\\red0\\green0\\blue0;\\red0\\green0\\blue255;\\red0\\green255\\blue255;\\red0\\green255\\blue0;\\red255\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green255\\blue0;\\red255\\green255\\blue255;\\red0\\green0\\blue128;\\red0\\green128\\blue128;\\red0\\green128\\blue0;\\red128\\green0\\blue128;\\red128\\green0\\blue0;\\red128\\green128\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}\n" - "{\\stylesheet{\\s15\\plain\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Text;}{\\*\\cs16 \\additive\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Base Style;}}\n" - "{\\plain\\s15{\\cs16\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024{\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024\n")) - - (goto-char (point-max)) - (insert "}}}}\n") - - (save-buffer) - (kill-buffer (current-buffer))) + (when buffer-read-only + (setq buffer-read-only nil)) + (ess-rtf-replace-chars) + (goto-char (point-min)) + (insert (concat + "{\\rtf1\\ansi{\\fonttbl\\f1\\fmodern " ess-sas-rtf-font-name ";}\n" + "\\margl720\\margr720\\margt720\\margb720\n" + "{\\colortbl;\\red0\\green0\\blue0;\\red0\\green0\\blue255;\\red0\\green255\\blue255;\\red0\\green255\\blue0;\\red255\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green255\\blue0;\\red255\\green255\\blue255;\\red0\\green0\\blue128;\\red0\\green128\\blue128;\\red0\\green128\\blue0;\\red128\\green0\\blue128;\\red128\\green0\\blue0;\\red128\\green128\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}\n" + "{\\stylesheet{\\s15\\plain\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Text;}{\\*\\cs16 \\additive\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Base Style;}}\n" + "{\\plain\\s15{\\cs16\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024{\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024\n")) + (goto-char (point-max)) + (insert "}}}}\n") + (save-buffer) + (kill-buffer (current-buffer))) (defun ess-rtf-replace-chars () "Convert a text file to an MS RTF file." @@ -914,32 +903,28 @@ optional argument is non-nil, then set-buffer rather than switch." (goto-char (point-min)) (while (re-search-forward "\t" nil t) (replace-match "\\tab" nil t))) -(defun ess-sas-rtf-landscape (&optional ess-tmp-font-size) +(defun ess-sas-rtf-landscape (&optional _ess-tmp-font-size) "Creates an MS RTF landscape file from the current buffer." (interactive) (ess-revert-wisely) - (set-visited-file-name (concat (buffer-name) ".rtf")) - - (if 'buffer-read-only (setq buffer-read-only nil)) - (ess-rtf-replace-chars) - - (goto-char (point-min)) - (insert (concat - "{\\rtf1\\ansi{\\fonttbl\\f1\\fmodern " ess-sas-rtf-font-name ";}\n" - "\\margl720\\margr720\\margt720\\margb720\n" - "{\\*\\pgdsctbl\n" - "{\\pgdsc0\\pgdscuse195\\lndscpsxn\\pgwsxn15840\\pghsxn12240\\marglsxn1800\\margrsxn1800\\margtsxn1440\\margbsxn1440\\pgdscnxt0 Default;}}\n" - "\\landscape\\paperh12240\\paperw15840\\margl1800\\margr1800\\margt1440\\margb1440\\sectd\\sbknone\\lndscpsxn\\pgwsxn15840\\pghsxn12240\\marglsxn1800\\margrsxn1800\\margtsxn1440\\margbsxn1440\\ftnbj\\ftnstart1\\ftnrstcont\\ftnnar\\aenddoc\\aftnrstcont\\aftnstart1\\aftnnrlc\n" - "{\\colortbl;\\red0\\green0\\blue0;\\red0\\green0\\blue255;\\red0\\green255\\blue255;\\red0\\green255\\blue0;\\red255\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green255\\blue0;\\red255\\green255\\blue255;\\red0\\green0\\blue128;\\red0\\green128\\blue128;\\red0\\green128\\blue0;\\red128\\green0\\blue128;\\red128\\green0\\blue0;\\red128\\green128\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}\n" - "{\\stylesheet{\\s15\\plain\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Text;}{\\*\\cs16 \\additive\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Base Style;}}\n" - "{\\plain\\s15{\\cs16\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024{\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024\n")) - - (goto-char (point-max)) - (insert "}}}}\n") - - (save-buffer) - (kill-buffer (current-buffer))) + (when buffer-read-only + (setq buffer-read-only nil)) + (ess-rtf-replace-chars) + (goto-char (point-min)) + (insert (concat + "{\\rtf1\\ansi{\\fonttbl\\f1\\fmodern " ess-sas-rtf-font-name ";}\n" + "\\margl720\\margr720\\margt720\\margb720\n" + "{\\*\\pgdsctbl\n" + "{\\pgdsc0\\pgdscuse195\\lndscpsxn\\pgwsxn15840\\pghsxn12240\\marglsxn1800\\margrsxn1800\\margtsxn1440\\margbsxn1440\\pgdscnxt0 Default;}}\n" + "\\landscape\\paperh12240\\paperw15840\\margl1800\\margr1800\\margt1440\\margb1440\\sectd\\sbknone\\lndscpsxn\\pgwsxn15840\\pghsxn12240\\marglsxn1800\\margrsxn1800\\margtsxn1440\\margbsxn1440\\ftnbj\\ftnstart1\\ftnrstcont\\ftnnar\\aenddoc\\aftnrstcont\\aftnstart1\\aftnnrlc\n" + "{\\colortbl;\\red0\\green0\\blue0;\\red0\\green0\\blue255;\\red0\\green255\\blue255;\\red0\\green255\\blue0;\\red255\\green0\\blue255;\\red255\\green0\\blue0;\\red255\\green255\\blue0;\\red255\\green255\\blue255;\\red0\\green0\\blue128;\\red0\\green128\\blue128;\\red0\\green128\\blue0;\\red128\\green0\\blue128;\\red128\\green0\\blue0;\\red128\\green128\\blue0;\\red128\\green128\\blue128;\\red192\\green192\\blue192;}\n" + "{\\stylesheet{\\s15\\plain\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Text;}{\\*\\cs16 \\additive\\f1\\fs16\\cf1\\cb8\\lang1024 Emacs Base Style;}}\n" + "{\\plain\\s15{\\cs16\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024{\\cs16\\f1\\fs16\\cf1\\cb8\\lang1024\n")) + (goto-char (point-max)) + (insert "}}}}\n") + (save-buffer) + (kill-buffer (current-buffer))) (defun ess-sas-rtf-us-landscape () "Creates an MS RTF US landscape file from the current buffer." @@ -1137,10 +1122,11 @@ Keep in mind that the maximum command line length in MS-DOS is "Each place is given by: (Number of times) at (Line):(Column).\\|" "[0-9][0-9]:[0-9][0-9] [MTWFS][aeioudhnrst]+day, [JFMASOND]" "[aeiouybcghlmnprstv]+ [1-9][0-9]?, 20[0-9][0-9]\\)\\)") - nil t) (replace-match (if strip " " "/*\\&*/") t)) + nil t) + (replace-match (if strip " " "/*\\&*/") t)) )) -(defun ess-sas-toggle-sas-listing-mode (&optional force) +(defun ess-sas-toggle-sas-listing-mode (&optional _force) "Toggle SAS-listing-mode for .lst files." (interactive) (ess-sas-goto-lst) @@ -1200,7 +1186,7 @@ be placed on the menubar upon ESS initialization." (setq ess-sas-created-runners (mapc (lambda (v) (ess-define-runner v "SAS")) versions)))) (define-obsolete-function-alias - 'ess-sas-create-versions 'ess-sas-define-runners "ESS 18.10") + 'ess-sas-create-versions #'ess-sas-define-runners "ESS 18.10") ;;; Section 3: Key Definitions @@ -1216,16 +1202,11 @@ Else C-TAB is `ess-sas-backward-delete-tab' and RET is `newline'." (interactive) - - (if arg - (progn - (define-key sas-mode-local-map [(control tab)] - 'ess-sas-backward-delete-tab) - (define-key sas-mode-local-map [return] 'newline) - (define-key sas-mode-local-map "\t" 'ess-sas-tab-to-tab-stop)) - ;;else - (define-key sas-mode-local-map [return] 'newline-and-indent) - (define-key sas-mode-local-map "\t" 'sas-indent-line))) + (when arg + ;; TODO: Why is this set up this way? + (define-key sas-mode-local-map [(control tab)] #'ess-sas-backward-delete-tab) + (define-key sas-mode-local-map [return] #'newline) + (define-key sas-mode-local-map "\t" #'ess-sas-tab-to-tab-stop))) (defvar ess-sas-edit-keys-toggle nil "Toggle TAB/RET key in `SAS-mode'. @@ -1233,7 +1214,7 @@ nil binds TAB to `sas-indent-line' and RET to `newline-and-indent'. Non-nil binds TAB to `ess-sas-tab-to-tab-stop', C-TAB to `ess-sas-backward-delete-tab', and RET to `newline'.") -(defun ess-sas-edit-keys-toggle (&optional arg) +(defun ess-sas-edit-keys-toggle (&optional _arg) "Toggle `ess-sas-edit-keys-toggle'. Optional arg is still accepted for backward compatibility, however, arg is ignored." (interactive) @@ -1248,27 +1229,27 @@ accepted for backward compatibility, however, arg is ignored." (defun ess-sas-global-pc-keys () "PC-like SAS key definitions" (interactive) - (global-set-key [(control f1)] 'ess-sas-rtf-portrait) - (global-set-key [(control f2)] 'ess-sas-rtf-landscape) - (global-set-key (quote [f2]) 'ess-revert-wisely) - (global-set-key (quote [f3]) 'ess-sas-goto-shell) - (global-set-key (quote [f4]) 'ess-sas-goto-file-1) - (global-set-key (quote [f5]) 'ess-sas-goto-sas) - (global-set-key (quote [f6]) 'ess-sas-goto-log) - (global-set-key [(control f6)] 'ess-sas-append-log) - (global-set-key (quote [f7]) 'ess-sas-goto-lst) - (global-set-key [(control f7)] 'ess-sas-append-lst) - (global-set-key (quote [f8]) 'ess-sas-submit) - (global-set-key [(control f8)] 'ess-sas-submit-region) - (global-set-key (quote [f9]) 'ess-sas-data-view-fsview) - (global-set-key [(control f9)] 'ess-sas-data-view-insight) - ;; (global-set-key (quote [f10]) 'ess-sas-toggle-sas-log-mode) - ;; (global-set-key [(control f10)] 'ess-sas-toggle-sas-listing-mode) - ;; (global-set-key (quote [f11]) 'ess-sas-goto-file-2) - ;; (global-set-key [(control f11)] 'ess-ebcdic-to-ascii-search-and-replace) - (global-set-key (quote [f12]) 'ess-sas-graph-view) - (global-set-key [(control tab)] 'ess-sas-backward-delete-tab) - ;; (define-key sas-mode-local-map "\C-c\C-p" 'ess-sas-file-path) + (global-set-key [(control f1)] #'ess-sas-rtf-portrait) + (global-set-key [(control f2)] #'ess-sas-rtf-landscape) + (global-set-key (quote [f2]) #'ess-revert-wisely) + (global-set-key (quote [f3]) #'ess-sas-goto-shell) + (global-set-key (quote [f4]) #'ess-sas-goto-file-1) + (global-set-key (quote [f5]) #'ess-sas-goto-sas) + (global-set-key (quote [f6]) #'ess-sas-goto-log) + (global-set-key [(control f6)] #'ess-sas-append-log) + (global-set-key (quote [f7]) #'ess-sas-goto-lst) + (global-set-key [(control f7)] #'ess-sas-append-lst) + (global-set-key (quote [f8]) #'ess-sas-submit) + (global-set-key [(control f8)] #'ess-sas-submit-region) + (global-set-key (quote [f9]) #'ess-sas-data-view-fsview) + (global-set-key [(control f9)] #'ess-sas-data-view-insight) + ;; (global-set-key (quote [f10]) #'ess-sas-toggle-sas-log-mode) + ;; (global-set-key [(control f10)] #'ess-sas-toggle-sas-listing-mode) + ;; (global-set-key (quote [f11]) #'ess-sas-goto-file-2) + ;; (global-set-key [(control f11)] #'ess-ebcdic-to-ascii-search-and-replace) + (global-set-key (quote [f12]) #'ess-sas-graph-view) + (global-set-key [(control tab)] #'ess-sas-backward-delete-tab) + ;; (define-key sas-mode-local-map "\C-c\C-p" #'ess-sas-file-path) (setq ess-sas-global-pc-keys t) (setq ess-sas-global-unix-keys nil) (setq ess-sas-local-pc-keys nil) @@ -1278,27 +1259,27 @@ accepted for backward compatibility, however, arg is ignored." (defun ess-sas-global-unix-keys () "Unix/Mainframe-like SAS key definitions" (interactive) - (global-set-key [(control f1)] 'ess-sas-rtf-portrait) - (global-set-key [(control f2)] 'ess-sas-rtf-landscape) - (global-set-key (quote [f2]) 'ess-revert-wisely) - (global-set-key (quote [f3]) 'ess-sas-submit) - (global-set-key [(control f3)] 'ess-sas-submit-region) - (global-set-key (quote [f4]) 'ess-sas-goto-sas) - (global-set-key (quote [f5]) 'ess-sas-goto-log) - (global-set-key [(control f5)] 'ess-sas-append-log) - (global-set-key (quote [f6]) 'ess-sas-goto-lst) - (global-set-key [(control f6)] 'ess-sas-append-lst) - (global-set-key (quote [f7]) 'ess-sas-goto-file-1) - (global-set-key (quote [f8]) 'ess-sas-goto-shell) - (global-set-key (quote [f9]) 'ess-sas-data-view-fsview) - (global-set-key [(control f9)] 'ess-sas-data-view-insight) - ;; (global-set-key (quote [f10]) 'ess-sas-toggle-sas-log-mode) - ;; (global-set-key [(control f10)] 'ess-sas-toggle-sas-listing-mode) - ;; (global-set-key (quote [f11]) 'ess-sas-goto-file-2) - ;; (global-set-key [(control f11)] 'ess-ebcdic-to-ascii-search-and-replace) - (global-set-key (quote [f12]) 'ess-sas-graph-view) - (global-set-key [(control tab)] 'ess-sas-backward-delete-tab) - ;;(define-key sas-mode-local-map "\C-c\C-p" 'ess-sas-file-path) + (global-set-key [(control f1)] #'ess-sas-rtf-portrait) + (global-set-key [(control f2)] #'ess-sas-rtf-landscape) + (global-set-key (quote [f2]) #'ess-revert-wisely) + (global-set-key (quote [f3]) #'ess-sas-submit) + (global-set-key [(control f3)] #'ess-sas-submit-region) + (global-set-key (quote [f4]) #'ess-sas-goto-sas) + (global-set-key (quote [f5]) #'ess-sas-goto-log) + (global-set-key [(control f5)] #'ess-sas-append-log) + (global-set-key (quote [f6]) #'ess-sas-goto-lst) + (global-set-key [(control f6)] #'ess-sas-append-lst) + (global-set-key (quote [f7]) #'ess-sas-goto-file-1) + (global-set-key (quote [f8]) #'ess-sas-goto-shell) + (global-set-key (quote [f9]) #'ess-sas-data-view-fsview) + (global-set-key [(control f9)] #'ess-sas-data-view-insight) + ;; (global-set-key (quote [f10]) #'ess-sas-toggle-sas-log-mode) + ;; (global-set-key [(control f10)] #'ess-sas-toggle-sas-listing-mode) + ;; (global-set-key (quote [f11]) #'ess-sas-goto-file-2) + ;; (global-set-key [(control f11)] #'ess-ebcdic-to-ascii-search-and-replace) + (global-set-key (quote [f12]) #'ess-sas-graph-view) + (global-set-key [(control tab)] #'ess-sas-backward-delete-tab) + ;;(define-key sas-mode-local-map "\C-c\C-p" #'ess-sas-file-path) (setq ess-sas-global-pc-keys nil) (setq ess-sas-global-unix-keys t) (setq ess-sas-local-pc-keys nil) @@ -1308,26 +1289,26 @@ accepted for backward compatibility, however, arg is ignored." (defun ess-sas-local-pc-keys () "PC-like SAS key definitions." (interactive) - (define-key sas-mode-local-map [(control f1)] 'ess-sas-rtf-portrait) - (define-key sas-mode-local-map [(control f2)] 'ess-sas-rtf-landscape) - (define-key sas-mode-local-map (quote [f2]) 'ess-revert-wisely) - (define-key sas-mode-local-map (quote [f3]) 'ess-sas-goto-shell) - (define-key sas-mode-local-map (quote [f4]) 'ess-sas-goto-file-1) - (define-key sas-mode-local-map (quote [f5]) 'ess-sas-goto-sas) - (define-key sas-mode-local-map (quote [f6]) 'ess-sas-goto-log) - (define-key sas-mode-local-map [(control f6)] 'ess-sas-append-log) - (define-key sas-mode-local-map (quote [f7]) 'ess-sas-goto-lst) - (define-key sas-mode-local-map [(control f7)] 'ess-sas-append-lst) - (define-key sas-mode-local-map (quote [f8]) 'ess-sas-submit) - (define-key sas-mode-local-map [(control f8)] 'ess-sas-submit-region) - (define-key sas-mode-local-map (quote [f9]) 'ess-sas-data-view-fsview) - (define-key sas-mode-local-map [(control f9)] 'ess-sas-data-view-insight) - (define-key sas-mode-local-map (quote [f10]) 'ess-sas-toggle-sas-log-mode) - (define-key sas-mode-local-map [(control f10)] 'ess-sas-toggle-sas-listing-mode) - (define-key sas-mode-local-map (quote [f11]) 'ess-sas-goto-file-2) - (define-key sas-mode-local-map [(control f11)] 'ess-ebcdic-to-ascii-search-and-replace) - (define-key sas-mode-local-map (quote [f12]) 'ess-sas-graph-view) - ;(define-key sas-mode-local-map "\C-c\C-p" 'ess-sas-file-path) + (define-key sas-mode-local-map [(control f1)] #'ess-sas-rtf-portrait) + (define-key sas-mode-local-map [(control f2)] #'ess-sas-rtf-landscape) + (define-key sas-mode-local-map (quote [f2]) #'ess-revert-wisely) + (define-key sas-mode-local-map (quote [f3]) #'ess-sas-goto-shell) + (define-key sas-mode-local-map (quote [f4]) #'ess-sas-goto-file-1) + (define-key sas-mode-local-map (quote [f5]) #'ess-sas-goto-sas) + (define-key sas-mode-local-map (quote [f6]) #'ess-sas-goto-log) + (define-key sas-mode-local-map [(control f6)] #'ess-sas-append-log) + (define-key sas-mode-local-map (quote [f7]) #'ess-sas-goto-lst) + (define-key sas-mode-local-map [(control f7)] #'ess-sas-append-lst) + (define-key sas-mode-local-map (quote [f8]) #'ess-sas-submit) + (define-key sas-mode-local-map [(control f8)] #'ess-sas-submit-region) + (define-key sas-mode-local-map (quote [f9]) #'ess-sas-data-view-fsview) + (define-key sas-mode-local-map [(control f9)] #'ess-sas-data-view-insight) + (define-key sas-mode-local-map (quote [f10]) #'ess-sas-toggle-sas-log-mode) + (define-key sas-mode-local-map [(control f10)] #'ess-sas-toggle-sas-listing-mode) + (define-key sas-mode-local-map (quote [f11]) #'ess-sas-goto-file-2) + (define-key sas-mode-local-map [(control f11)] #'ess-ebcdic-to-ascii-search-and-replace) + (define-key sas-mode-local-map (quote [f12]) #'ess-sas-graph-view) + ;(define-key sas-mode-local-map "\C-c\C-p" #'ess-sas-file-path) (setq ess-sas-global-pc-keys nil) (setq ess-sas-global-unix-keys nil) (setq ess-sas-local-pc-keys t) @@ -1337,26 +1318,26 @@ accepted for backward compatibility, however, arg is ignored." (defun ess-sas-local-unix-keys () "Unix/Mainframe-like SAS key definitions" (interactive) - (define-key sas-mode-local-map [(control f1)] 'ess-sas-rtf-portrait) - (define-key sas-mode-local-map [(control f2)] 'ess-sas-rtf-landscape) - (define-key sas-mode-local-map (quote [f2]) 'ess-revert-wisely) - (define-key sas-mode-local-map (quote [f3]) 'ess-sas-submit) - (define-key sas-mode-local-map [(control f3)] 'ess-sas-submit-region) - (define-key sas-mode-local-map (quote [f4]) 'ess-sas-goto-sas) - (define-key sas-mode-local-map (quote [f5]) 'ess-sas-goto-log) - (define-key sas-mode-local-map [(control f5)] 'ess-sas-append-log) - (define-key sas-mode-local-map (quote [f6]) 'ess-sas-goto-lst) - (define-key sas-mode-local-map [(control f6)] 'ess-sas-append-lst) - (define-key sas-mode-local-map (quote [f7]) 'ess-sas-goto-file-1) - (define-key sas-mode-local-map (quote [f8]) 'ess-sas-goto-shell) - (define-key sas-mode-local-map (quote [f9]) 'ess-sas-data-view-fsview) - (define-key sas-mode-local-map [(control f9)] 'ess-sas-data-view-insight) - (define-key sas-mode-local-map (quote [f10]) 'ess-sas-toggle-sas-log-mode) - (define-key sas-mode-local-map [(control f10)] 'ess-sas-toggle-sas-listing-mode) - (define-key sas-mode-local-map (quote [f11]) 'ess-sas-goto-file-2) - (define-key sas-mode-local-map [(control f11)] 'ess-ebcdic-to-ascii-search-and-replace) - (define-key sas-mode-local-map (quote [f12]) 'ess-sas-graph-view) - ;(define-key sas-mode-local-map "\C-c\C-p" 'ess-sas-file-path) + (define-key sas-mode-local-map [(control f1)] #'ess-sas-rtf-portrait) + (define-key sas-mode-local-map [(control f2)] #'ess-sas-rtf-landscape) + (define-key sas-mode-local-map (quote [f2]) #'ess-revert-wisely) + (define-key sas-mode-local-map (quote [f3]) #'ess-sas-submit) + (define-key sas-mode-local-map [(control f3)] #'ess-sas-submit-region) + (define-key sas-mode-local-map (quote [f4]) #'ess-sas-goto-sas) + (define-key sas-mode-local-map (quote [f5]) #'ess-sas-goto-log) + (define-key sas-mode-local-map [(control f5)] #'ess-sas-append-log) + (define-key sas-mode-local-map (quote [f6]) #'ess-sas-goto-lst) + (define-key sas-mode-local-map [(control f6)] #'ess-sas-append-lst) + (define-key sas-mode-local-map (quote [f7]) #'ess-sas-goto-file-1) + (define-key sas-mode-local-map (quote [f8]) #'ess-sas-goto-shell) + (define-key sas-mode-local-map (quote [f9]) #'ess-sas-data-view-fsview) + (define-key sas-mode-local-map [(control f9)] #'ess-sas-data-view-insight) + (define-key sas-mode-local-map (quote [f10]) #'ess-sas-toggle-sas-log-mode) + (define-key sas-mode-local-map [(control f10)] #'ess-sas-toggle-sas-listing-mode) + (define-key sas-mode-local-map (quote [f11]) #'ess-sas-goto-file-2) + (define-key sas-mode-local-map [(control f11)] #'ess-ebcdic-to-ascii-search-and-replace) + (define-key sas-mode-local-map (quote [f12]) #'ess-sas-graph-view) + ;;(define-key sas-mode-local-map "\C-c\C-p" #'ess-sas-file-path) (setq ess-sas-global-pc-keys nil) (setq ess-sas-global-unix-keys nil) (setq ess-sas-local-pc-keys nil) @@ -1400,7 +1381,7 @@ directory that you specify with the same name, but without the (comint-send-input) ;; (insert (read-string "Press Return to connect to Kermit: " nil nil "\C-\\c")) ;; (comint-send-input) - ;; (insert (read-string "Press Return when Kermit is ready to recieve: " nil nil + ;; (insert (read-string "Press Return when Kermit is ready to receive: " nil nil ;; (concat "receive ]" ess-sas-temp-file))) ;; (comint-send-input) ;; (insert (read-string "Press Return when transfer is complete: " nil nil "c")) @@ -1444,7 +1425,7 @@ directory with the same name, but without the `ess-kermit-prefix'." (comint-send-input) ;; (insert (read-string "Press Return to connect to Kermit: " nil nil "\C-\\c")) ;; (comint-send-input) - ;; (insert (read-string "Press Return when Kermit is ready to recieve: " nil nil + ;; (insert (read-string "Press Return when Kermit is ready to receive: " nil nil ;; (concat "receive ]" ess-sas-temp-file))) ;; (comint-send-input) ;; (insert (read-string "Press Return when transfer is complete: " nil nil "c")) diff --git a/elpa/ess-20191014.1343/ess-sas-d.el b/elpa/ess-20230419.1527/ess-sas-d.el similarity index 75% rename from elpa/ess-20191014.1343/ess-sas-d.el rename to elpa/ess-20230419.1527/ess-sas-d.el index af3ec492..98afed49 100644 --- a/elpa/ess-20191014.1343/ess-sas-d.el +++ b/elpa/ess-20230419.1527/ess-sas-d.el @@ -1,29 +1,27 @@ -;;; ess-sas-d.el --- SAS customization - -;; Copyright (C) 1997--2001 Richard M. Heiberger and A. J. Rossini -;; Copyright (C) 2002--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; ess-sas-d.el --- SAS customization -*- lexical-binding: t; -*- +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: Richard M. Heiberger ;; Created: 20 Aug 1997 ;; Maintainer: ESS-core -;; Keywords: languages - -;; This file is part of ESS. +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -32,8 +30,6 @@ ;;; Code: -;;; Autoloads: - (require 'shell) (require 'ess-sas-l) @@ -113,26 +109,26 @@ Better logic needed! (see 2 uses, in this file).") ;; Construct the LST buffer for output (if (get-buffer ess-sas-lst-bufname) nil - (shell) - (accept-process-output (get-buffer-process (current-buffer))) - (sleep-for 2) ; need to wait, else working too fast! - (setq ess-sas-lst (ess-insert-accept "tty")) - (SAS-listing-mode) - (shell-mode) - (ess-listing-minor-mode t) - (rename-buffer ess-sas-lst-bufname t)) + (with-current-buffer (shell) + (accept-process-output (get-buffer-process (current-buffer)) 0.2) + (sleep-for 2) ; need to wait, else working too fast! + (setq ess-sas-lst (ess-insert-accept "tty")) + (SAS-listing-mode) + (shell-mode) + (ess-listing-minor-mode t) + (rename-buffer ess-sas-lst-bufname t))) ;; Construct the LOG buffer for output (if (get-buffer ess-sas-log-bufname) nil - (shell) - (accept-process-output (get-buffer-process (current-buffer))) - (sleep-for 2) ; need to wait, else working too fast! - (setq ess-sas-log (ess-insert-accept "tty")) + (with-current-buffer (shell) + (accept-process-output (get-buffer-process (current-buffer)) 0.2) + (sleep-for 2) ; need to wait, else working too fast! + (setq ess-sas-log (ess-insert-accept "tty")) ;(SAS-log-mode) - (shell-mode) - (ess-transcript-minor-mode t) - (rename-buffer ess-sas-log-bufname t)) + (shell-mode) + (ess-transcript-minor-mode t) + (rename-buffer ess-sas-log-bufname t))) (setq inferior-SAS-redirect-args (concat " " ess-sas-lst @@ -170,7 +166,7 @@ Better logic needed! (see 2 uses, in this file).") (goto-char (point-max)) (insert command) (comint-send-input) - (accept-process-output (get-buffer-process (current-buffer))) + (accept-process-output (get-buffer-process (current-buffer)) 0.2) (forward-line -1) (let* ((beg (point)) (ess-tty-name (progn (end-of-line) (buffer-substring beg (point))))) @@ -179,7 +175,7 @@ Better logic needed! (see 2 uses, in this file).") (defvar SAS-customize-alist - '((ess-local-customize-alist . 'SAS-customize-alist) + '((ess-local-customize-alist . SAS-customize-alist) (ess-language . "SAS") (ess-dialect . "SAS") (inferior-ess-program . inferior-SAS-program) @@ -212,7 +208,7 @@ Better logic needed! (see 2 uses, in this file).") (setq-local paragraph-separate "^[ \t]*$") (setq-local paragraph-ignore-fill-prefix t) (setq-local adaptive-fill-mode nil) - (setq-local indent-line-function 'sas-indent-line) + (setq-local indent-line-function #'sas-indent-line) (setq-local comment-start "/*") (setq-local comment-start-skip "/[*]") (setq-local comment-end "*/") @@ -229,8 +225,8 @@ Better logic needed! (see 2 uses, in this file).") (if ess-sas-local-pc-keys (ess-sas-local-pc-keys)) (if ess-sas-global-unix-keys (ess-sas-global-unix-keys)) (if ess-sas-global-pc-keys (ess-sas-global-pc-keys))) - (define-key sas-mode-local-map ";" 'ess-electric-run-semicolon) - (define-key sas-mode-local-map (kbd "\C-c\C-w") 'ess-multi-frame-SAS) + (define-key sas-mode-local-map ";" #'ess-electric-run-semicolon) + (define-key sas-mode-local-map (kbd "\C-c\C-w") #'ess-multi-frame-SAS) ;; this is a mess ;; interactive and batch commands share sas-mode-local-map, ;; but the associated commands are very different @@ -260,29 +256,27 @@ Better logic needed! (see 2 uses, in this file).") ;; rmh Jul 10 2003 (defun ess-electric-run-semicolon (arg) - "Insert character. If the line contains \"run;\" or \"quit;\" and nothing else then indent line." + "Insert character. +If the line contains \"run;\" or \"quit;\" and nothing else then +indent line." (interactive "P") - (if ess-sas-edit-keys-toggle (insert ";") (let (insertpos) - (if (and (not arg) - (eolp) - (save-excursion - (skip-chars-backward " \t") - (backward-word 1) - (and (looking-at "run\\|quit") - (progn - (skip-chars-backward " \t") - (bolp))))) - (progn - (insert last-command-event) - (funcall indent-line-function) - (save-excursion - (if insertpos (goto-char (1+ insertpos))) - (delete-char -1)))) - (if insertpos - (save-excursion - (goto-char insertpos) - (self-insert-command (prefix-numeric-value arg))) - (self-insert-command (prefix-numeric-value arg)))))) + (if ess-sas-edit-keys-toggle + (insert ";") + (if (and (not arg) + (eolp) + (save-excursion + (skip-chars-backward " \t") + (backward-word 1) + (and (looking-at "run\\|quit") + (progn + (skip-chars-backward " \t") + (bolp))))) + (progn + (insert last-command-event) + (funcall indent-line-function) + (save-excursion + (delete-char -1)))) + (self-insert-command (prefix-numeric-value arg)))) (defun SAS-menu () "Start SAS from the menu." diff --git a/elpa/ess-20191014.1343/ess-sas-l.el b/elpa/ess-20230419.1527/ess-sas-l.el similarity index 94% rename from elpa/ess-20191014.1343/ess-sas-l.el rename to elpa/ess-20230419.1527/ess-sas-l.el index 726842b9..f6da281c 100644 --- a/elpa/ess-20191014.1343/ess-sas-l.el +++ b/elpa/ess-20230419.1527/ess-sas-l.el @@ -1,31 +1,29 @@ -;;; ess-sas-l.el --- SAS customization - -;; Copyright (C) 1997--2009 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; ess-sas-l.el --- SAS customization -*- lexical-binding: t; -*- +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Authors: Richard M. Heiberger ;; A.J. Rossini ;; Rodney Sparapani ;; Created: 20 Aug 1997 ;; Maintainer: ESS-core -;; Keywords: languages - -;; This file is part of ESS (Emacs Speaks Statistics). +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -33,7 +31,6 @@ ;;; sas-mode: indent, run etc, SAS programs. -;;; Copyright (C) 1994--1997 Tom Cook ;;; Author: Tom Cook ;;; Dept. of Biostatistics ;;; University of Wisconsin - Madison @@ -151,11 +148,11 @@ A .lst file is a SAS listing file when: (ess-listing-minor-mode 1) (buffer-disable-undo)) -(fset 'sas-log-mode 'SAS-log-mode) -(fset 'SAS-transcript-mode 'SAS-log-mode) -(fset 'sas-transcript-mode 'SAS-log-mode) -(fset 'sas-mode 'SAS-mode) -(fset 'sas-listing-mode 'SAS-listing-mode) +(defalias 'sas-log-mode #'SAS-log-mode) +(defalias 'SAS-transcript-mode #'SAS-log-mode) +(defalias 'sas-transcript-mode #'SAS-log-mode) +(defalias 'sas-mode #'SAS-mode) +(defalias 'sas-listing-mode #'SAS-listing-mode) (defcustom sas-indent-width 4 "Amount to indent sas statements." @@ -782,7 +779,7 @@ number." )) "Font Lock regexs for SAS.") -(defun beginning-of-sas-statement (arg &optional comment-start) +(defun beginning-of-sas-statement (arg &optional comstart) "Move point to beginning of current sas statement." (interactive "P") (let ((pos (point)) @@ -790,7 +787,7 @@ number." (if (search-forward ";" nil 1) (forward-char -1)) (re-search-backward ";[ \n*/]*$" (point-min) 1 arg) (skip-chars-forward sas-comment-chars) - (if comment-start nil + (if comstart nil (if (looking-at "\\*/") (progn (forward-char 2) (skip-chars-forward sas-comment-chars))) @@ -1308,7 +1305,7 @@ be submitted instead. `sas-submitable' is automatically sets to t." (message "---- SAS job submitted ---- ") (if sas-notify;; added 4/7/94 - (set-process-sentinel (get-process proc-name) 'sas-sentinel) + (set-process-sentinel (get-process proc-name) #'sas-sentinel) (display-buffer buf t)))) (message "---- File not submitted ----"))) @@ -1480,35 +1477,6 @@ be submitted instead. `sas-submitable' is automatically sets to t." page ; ")))) - - -;;-*-emacs-lisp-*- -;;; file name: sas-data.el -;;; -;;; Version 1.0 -;;; -;;; sas-data-mode: manage sas datasets -;;; Copyright (C) 1994 Tom Cook -;;; -;;; This program 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 of the License, or -;;; (at your option) any later version. -;;; -;;; This program 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 for more details. -;;; -;;; A copy of the GNU General Public License is available at -;;; https://www.r-project.org/Licenses/ -;;; -;;; Author: Tom Cook -;;; Dept. of Biostatistics -;;; University of Wisconsin - Madison -;;; Madison, WI 53706 -;;; cook@biostat.wisc.edu -;; Created: 8/11/94 ;; variables section (defvar sas-dir-mode-map nil) @@ -1522,30 +1490,26 @@ page ; (if sas-dir-mode-map () (setq sas-dir-mode-map (make-sparse-keymap)) - ;;(define-key sas-dir-mode-map "c" 'sas-contents) - (define-key sas-dir-mode-map "p" 'sas-print) - (define-key sas-dir-mode-map "m" 'sas-mark-item) - (define-key sas-dir-mode-map "u" 'sas-unmark-item) - (define-key sas-dir-mode-map " " 'sas-next-line) - (define-key sas-dir-mode-map "\C-n" 'sas-next-line) - (define-key sas-dir-mode-map "\C-p" 'sas-prev-line) - (define-key sas-dir-mode-map "\177" 'sas-prev-line-undo) - (define-key sas-dir-mode-map "\C-b" 'sas-backward-page-narrow) - (define-key sas-dir-mode-map "\C-v" 'sas-forward-page-narrow) - (define-key sas-dir-mode-map "\C-m" 'sas-goto-dataset) - (define-key sas-dir-mode-map [mouse-2] 'sas-mouse-goto-dataset) - (define-key sas-dir-mode-map "t" 'sas-dir-goto-page) - (define-key sas-dir-mode-map "q" 'bury-buffer) - (define-key sas-dir-mode-map "g" 'sas-revert-library) - (define-key sas-dir-mode-map "1" 'digit-argument) - (define-key sas-dir-mode-map "2" 'digit-argument) - (define-key sas-dir-mode-map "3" 'digit-argument) - (define-key sas-dir-mode-map "4" 'digit-argument) - (define-key sas-dir-mode-map "5" 'digit-argument) - (define-key sas-dir-mode-map "6" 'digit-argument) - (define-key sas-dir-mode-map "7" 'digit-argument) - (define-key sas-dir-mode-map "8" 'digit-argument) - (define-key sas-dir-mode-map "9" 'digit-argument) + (define-key sas-dir-mode-map "m" #'sas-mark-item) + (define-key sas-dir-mode-map "u" #'sas-unmark-item) + (define-key sas-dir-mode-map " " #'sas-next-line) + (define-key sas-dir-mode-map "\C-n" #'sas-next-line) + (define-key sas-dir-mode-map "\C-p" #'sas-prev-line) + (define-key sas-dir-mode-map "\177" #'sas-prev-line-undo) + (define-key sas-dir-mode-map "\C-b" #'sas-backward-page-narrow) + (define-key sas-dir-mode-map "\C-v" #'sas-forward-page-narrow) + (define-key sas-dir-mode-map "\C-m" #'sas-goto-dataset) + (define-key sas-dir-mode-map "t" #'sas-dir-goto-page) + (define-key sas-dir-mode-map "q" #'bury-buffer) + (define-key sas-dir-mode-map "1" #'digit-argument) + (define-key sas-dir-mode-map "2" #'digit-argument) + (define-key sas-dir-mode-map "3" #'digit-argument) + (define-key sas-dir-mode-map "4" #'digit-argument) + (define-key sas-dir-mode-map "5" #'digit-argument) + (define-key sas-dir-mode-map "6" #'digit-argument) + (define-key sas-dir-mode-map "7" #'digit-argument) + (define-key sas-dir-mode-map "8" #'digit-argument) + (define-key sas-dir-mode-map "9" #'digit-argument) (define-key sas-dir-mode-map [menu-bar sas run] '("Submit File " . submit-sas)) ) @@ -1634,9 +1598,9 @@ page ; ;;(forward-line arg) ;;(sas-move-to-filename sas-dir-buf-end))) -(defun sas-prev-line (arg) +(defun sas-prev-line (&optional _arg) "Move up one line." - (interactive "p") + (interactive) (beginning-of-line) (re-search-backward "^ *[0-9]+ *<*[^:0-9\n]" (point-min) t) (sas-move-to-filename sas-dir-buf-end)) @@ -1677,20 +1641,6 @@ page ; (buffer-substring (match-beginning 0) (match-end 0)))))) -;;(defun sas-contents () -;; "Run proc contents on current file." -;; (interactive) -;; (let ((buffer-read-only nil) (sas-get-options "linesize=70")) -;; (sas-get-dataset (sas-get-filename) 2 t t (buffer-name)) -;; (end-of-buffer) -;; (backward-page-top-of-window 1))) -;; -;;(defun sas-print () -;; "Run proc contents on current file." -;; (interactive) -;; (sas-get-dataset (sas-get-filename) 1 nil nil nil -;; (sas-create-var-string))) - (defun sas-goto-page (arg) "Goto top of page ARG. If no ARG, then goto top of file." (interactive "P") @@ -1768,21 +1718,6 @@ whose beginning matches the regexp `page-delimiter'." (sas-narrow-to-page) (goto-char (point-min))))))) -;;(defun sas-mouse-goto-dataset (event) -;; (interactive "e") -;; (let (page buf) -;; (save-window-excursion -;; (save-excursion -;; (set-buffer (window-buffer (posn-window (event-end event)))) -;; (save-excursion -;; (goto-char (posn-point (event-end event))) -;; (setq page (sas-get-file-number))) -;; (sas-goto-dataset page) -;; (setq buf (buffer-name)))) -;; (set-buffer buf) -;; (goto-char (point-min)) -;; (display-buffer buf))) - (defun sas-dir-goto-page (page) (interactive "p") @@ -1827,19 +1762,13 @@ whose beginning matches the regexp `page-delimiter'." str))) -(defun ess-imenu-SAS (&optional arg) +(defun ess-imenu-SAS (&optional _arg) "SAS language Imenu support for ESS." (interactive) (setq imenu-generic-expression - '( (nil "[ \t\n=]\\([a-zA-Z_][a-zA-Z_0-9]*[.][a-zA-Z_][a-zA-Z_0-9]*\\)[ ,()\t\n;]" 1))) + '( (nil "[ \t\n=]\\([[:alpha:]_][[:alnum:]_]*[.][[:alpha:]_][[:alnum:]_]*\\)[ ,()\t\n;]" 1))) (imenu-add-to-menubar "SAS Datasets")) -;;(defun sas-revert-library () -;; "Update current library." -;; (interactive) -;; (if sas-directory-name -;; (sas-make-library sas-directory-name t))) - (provide 'ess-sas-l) ;;; ess-sas-l.el ends here diff --git a/elpa/ess-20191014.1343/ess-site.el b/elpa/ess-20230419.1527/ess-site.el similarity index 68% rename from elpa/ess-20191014.1343/ess-site.el rename to elpa/ess-20230419.1527/ess-site.el index 917bc906..c298086f 100644 --- a/elpa/ess-20191014.1343/ess-site.el +++ b/elpa/ess-20230419.1527/ess-site.el @@ -1,31 +1,27 @@ ;;; ess-site.el --- user customization of ESS -*- lexical-binding: t; -*- -;; Copyright (C) 1993 David M. Smith -;; Copyright (C) 1997--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2018 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, Stephen Eglen, -;; Vitalie Spinu, and Lionel Henry. - +;; Copyright (C) 1993-2020 Free Software Foundation, Inc. ;; Author: David Smith ;; Created: 12 Nov 1993 ;; Maintainer: ESS-core -;; Keywords: local -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -53,14 +49,12 @@ ;; Modify this if ess-site.el is not in the ./lisp/ directory (defvar ess-lisp-directory (file-name-directory load-file-name) "Directory containing ess-site.el(c) and other ESS Lisp files.") - (add-to-list 'load-path ess-lisp-directory)) + (add-to-list 'load-path (directory-file-name ess-lisp-directory))) ;;; Loading popular dialects (they should become optional in the future) (require 'ess-r-mode) -(require 'ess-julia) (require 'essd-els) ;; ess-remote -(require 'ess-stata-mode) (require 'ess-sas-d) (require 'ess-bugs-d) (require 'ess-jags-d) diff --git a/elpa/ess-20191014.1343/ess-sp6-d.el b/elpa/ess-20230419.1527/ess-sp6-d.el similarity index 85% rename from elpa/ess-20191014.1343/ess-sp6-d.el rename to elpa/ess-20230419.1527/ess-sp6-d.el index a90ecd0c..087c7cad 100644 --- a/elpa/ess-20191014.1343/ess-sp6-d.el +++ b/elpa/ess-20230419.1527/ess-sp6-d.el @@ -1,28 +1,27 @@ -;;; ess-sp6-d.el --- S-Plus 6 & 7 & 8 customization - -;; Copyright (C) 2001--2005 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; ess-sp6-d.el --- S-Plus 6 & 7 & 8 customization -*- lexical-binding: t; -*- +;; Copyright (C) 2001-2022 Free Software Foundation, Inc. ;; Author: A.J. Rossini ;; Created: 2001/02/06 ;; Maintainer: ESS Core Team -;; Keywords: languages - -;; This file is part of ESS. +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -68,7 +67,7 @@ (defvaralias 'S+6-customize-alist 'S+-customize-alist) (defvar S+-customize-alist (append - '((ess-local-customize-alist . 'S+-customize-alist) + '((ess-local-customize-alist . S+-customize-alist) (ess-dialect . S+-dialect-name) (ess-function-pattern . ess-r-function-pattern) @@ -77,8 +76,7 @@ (inferior-ess-help-command . "help(\"%s\", pager=\"slynx -dump\", window=FALSE)\n") (inferior-ess-search-list-command . "searchPaths()\n") - (ess-directory-function . S+-directory-function) - (ess-setup-directory-function . S+-setup-directory-function) + (ess-startup-directory-function . S+-directory-function) (ess-STERM . "iESS")) S+common-cust-alist) @@ -106,9 +104,9 @@ } ") -(defalias 'S+6 'S+) -(defun S+ (&optional proc-name) - "Call 'Splus6', based on S version 4, from Bell Labs. +(defalias 'S+6 #'S+) +(defun S+ (&optional _proc-name) + "Call `Splus6', based on S version 4, from Bell Labs. New way to do it." (interactive) (ess-write-to-dribble-buffer @@ -122,9 +120,9 @@ New way to do it." inf-buf)) -(defalias 'S+6-mode 'S+-mode) +(defalias 'S+6-mode #'S+-mode) ;;;###autoload -(defun S+-mode (&optional proc-name) +(defun S+-mode (&optional _proc-name) "Major mode for editing S+ source. See `ess-mode' for more help." (interactive) (setq-local ess-local-customize-alist S+-customize-alist) @@ -133,7 +131,7 @@ New way to do it." (setq imenu-generic-expression ess-imenu-S-generic-expression) (when ess-imenu-use-S (imenu-add-to-menubar "Imenu-S"))) -(defalias 'S+6-transcript-mode 'S+-transcript-mode) +(defalias 'S+6-transcript-mode #'S+-transcript-mode) (define-derived-mode S+-transcript-mode ess-transcript-mode "ESS S Transcript" "S-PLUS 6 transcript mode." :syntax-table S-syntax-table @@ -187,7 +185,7 @@ ESS initialization." ;; Define the runners (ess-s-define-runners) (define-obsolete-function-alias - 'ess-s-versions-create 'ess-s-define-runners "ESS 18.10") + 'ess-s-versions-create #'ess-s-define-runners "ESS 18.10") diff --git a/elpa/ess-20191014.1343/ess-toolbar.el b/elpa/ess-20230419.1527/ess-toolbar.el similarity index 92% rename from elpa/ess-20191014.1343/ess-toolbar.el rename to elpa/ess-20230419.1527/ess-toolbar.el index 0ba4a832..b6d12079 100644 --- a/elpa/ess-20191014.1343/ess-toolbar.el +++ b/elpa/ess-20230419.1527/ess-toolbar.el @@ -1,27 +1,27 @@ ;;; ess-toolbar.el --- Support for a toolbar in ESS. -*- lexical-binding: t; -*- -;; Copyright (C) 1997--2009 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - +;; Copyright (C) 1997-2020 Free Software Foundation, Inc. ;; Author: Stephen Eglen ;; Created: 2004-05-06 -;; Revised: 2009-03-16 ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: diff --git a/elpa/ess-20191014.1343/ess-tracebug.el b/elpa/ess-20230419.1527/ess-tracebug.el similarity index 91% rename from elpa/ess-20191014.1343/ess-tracebug.el rename to elpa/ess-20230419.1527/ess-tracebug.el index 1e4518eb..74592dc4 100644 --- a/elpa/ess-20191014.1343/ess-tracebug.el +++ b/elpa/ess-20230419.1527/ess-tracebug.el @@ -1,31 +1,30 @@ ;; ess-tracebug.el --- Tracing and debugging facilities for ESS. -*- lexical-binding: t; -*- -;; -;; Copyright (C) 2011--2017 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. -;; -;; Filename: ess-tracebug.el + +;; Copyright (C) 2011-2022 Free Software Foundation, Inc. ;; Author: Vitalie Spinu ;; Maintainer: Vitalie Spinu -;; Copyright (C) 2010-2012, Vitalie Spinu, all rights reserved. ;; Created: Oct 14 14:15:22 2010 -;; URL: https://code.google.com/p/ess-tracebug/ -;; Keywords: tools, languages -;; -;; This file is *NOT* part of GNU Emacs. + +;; This file is part of GNU Emacs. + +;;; License: ;; -;; This program 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 3, any later version. +;; This program 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 3 of the License, or +;; (at your option) any later version. ;; -;; This program 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 for more -;; details. +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: + ;; Ess-tracebug is a package for interactive debugging of R code from ;; ESS and provides such features as: ;; - visual debugging @@ -37,21 +36,20 @@ ;; ;; For a complete description please see the documentation in the ESS ;; manual. -;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; + ;;; Code: -(eval-when-compile +(eval-and-compile (when (< emacs-major-version 26) (require 'cl)) (require 'cl-lib) (require 'tramp) - (require 'subr-x)) + (require 'subr-x) + (require 'ess-utils)) (require 'comint) (require 'compile) (require 'ring) -(require 'ess-utils) + (defvar text-scale-mode-amount) (autoload 'text-scale-mode "face-remap" "[autoload]" nil) @@ -63,6 +61,7 @@ (defvar inferior-ess-mode-map) (defvar ess-mode-map) (defvar ess--inhibit-presend-hooks) + (declare-function ess--accumulation-buffer "ess-inf") (declare-function ess--if-verbose-write-process-state "ess-inf") (declare-function ess--run-presend-hooks "ess-inf") @@ -71,38 +70,44 @@ (declare-function ess-build-load-command "ess-inf") (declare-function ess-command "ess-inf") (declare-function ess-dirs "ess-inf") +(declare-function ess-eval-region--normalise-region "ess-inf" ) (declare-function ess-force-buffer-current "ess-inf") (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") (declare-function ess-send-string "ess-inf") (declare-function ess-switch-process "ess-inf" ()) (declare-function ess-switch-to-ESS "ess-inf") -(declare-function ess-wait-for-process "ess-inf") (declare-function ess-switch-to-end-of-ESS "ess-inf" ()) -(declare-function ess-eval-region--normalise-region "ess-inf" ) -(declare-function inferior-ess-run-callback "ess-inf") +(declare-function ess-wait-for-process "ess-inf") (declare-function inferior-ess--set-status "ess-inf") +(declare-function inferior-ess-output-filter "ess-inf") +(declare-function inferior-ess-run-callback "ess-inf") + (declare-function ess-helpobjs-at-point--read-obj "ess-help") (declare-function ess-r-get-evaluation-env "ess-r-mode") +(declare-function ess-roxy--region-p "ess-roxy") + (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") + ;; Do not require tramp at runtime. It is expensive to load. Instead, ;; guard calls with (require 'tramp) and silence the byte compiler ;; here. (declare-function tramp-dissect-file-name "tramp") (declare-function tramp-get-remote-tmpdir "tramp") ;; The following declares can be removed once we drop Emacs 25 -(declare-function tramp-file-name-method "tramp") -(declare-function tramp-file-name-user "tramp") +(declare-function tramp-file-name-hop "tramp") (declare-function tramp-file-name-host "tramp") (declare-function tramp-file-name-localname "tramp") -(declare-function tramp-file-name-hop "tramp") +(declare-function tramp-file-name-method "tramp") +(declare-function tramp-file-name-user "tramp") (defgroup ess-tracebug nil @@ -322,20 +327,30 @@ 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* ((se (ess-eval-region--normalise-region start end)) + (start (car se)) + (end (cdr se)) + (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) @@ -355,47 +370,6 @@ by `ess-inject-source' variable." "Like `ess-tracebug-send-region' but with tweaks for functions." (ess-tracebug-send-region proc start end visibly message 'function)) -(defvar ess-tracebug-help nil - "ess-dev-map prefix: \\[ess-dev-map] - -* Breakpoints (`ess-dev-map'): - - b . Set BP (repeat to cycle BP type) . `ess-bp-set' - B . Set conditional BP . `ess-bp-set-conditional' - k . Kill BP . `ess-bp-kill' - K . Kill all BPs . `ess-bp-kill-all' - o . Toggle BP state . `ess-bp-toggle-state' - l . Set logger BP . `ess-bp-set-logger' - n . Goto next BP . `ess-bp-next' - p . Goto previous BP . `ess-bp-previous' - - (C- prefixed equivalents are also defined) - -* Debugging (`ess-dev-map'): - ` . Show traceback . `ess-show-traceback' (also on C-c `) - ~ . Show callstack . `ess-show-call-stack' (also on C-c ~) - e . Toggle error action (repeat to cycle). `ess-debug-toggle-error-action' - d . Flag for debugging . `ess-debug-flag-for-debugging' - u . Unflag for debugging . `ess-debug-unflag-for-debugging' - w . Watch window . `ess-watch' - - (C- prefixed equivalents are also defined) - -* Interactive Debugging (`ess-debug-minor-mode-map'): - - M-C . Continue . `ess-debug-command-continue' - M-C-C . Continue multi . `ess-debug-command-continue-multi' - M-N . Next step . `ess-debug-command-next' - M-C-N . Next step multi . `ess-debug-command-next-multi' - M-U . Up frame . `ess-debug-command-up' - M-Q . Quit debugging . `ess-debug-command-quit' - -* Navigation to errors (general Emacs functionality): - - C-x `, M-g n . `next-error' - M-g p . `previous-error'") - - ;; * Input Ring: ;; i . Goto input event marker forwards . `ess-debug-goto-input-event-marker' @@ -405,7 +379,9 @@ by `ess-inject-source' variable." (defun ess-tracebug-show-help () "Show help for `ess-tracebug'." (interactive) - (describe-variable 'ess-tracebug-help)) + (if (fboundp 'describe-keymap) + (describe-keymap 'ess-tracebug-map) + (info "(ess) ESS tracebug"))) (defun ess-tracebug--propertize (dummy bitmap face &optional string ) "If `window-system' propertize DUMMY with fringe BITMAP and FACE. @@ -453,7 +429,7 @@ See `ess-tracebug-help' for the overview of ess-tracebug functionality." (prefix-numeric-value arg) (if (ess-process-get 'tracebug) -1 1))) (if (> arg 0) - (unless (ess-process-get 'tracebug) ;; only if already not active + (unless (ess-process-get 'tracebug) ;; only if not already active (ess--tb-start) (ess-debug-start) ;; (dolist (bf (buffer-list)) @@ -485,7 +461,7 @@ See `ess-tracebug-help' for the overview of ess-tracebug functionality." (run-hooks 'ess-tracebug-exit-hook) (message "ess-tracebug mode disabled")))))) -(defalias 'ess-toggle-tracebug 'ess-tracebug) +(defalias 'ess-toggle-tracebug #'ess-tracebug) ;;;_* TRACEBACK @@ -509,7 +485,7 @@ See `ess-tracebug-help' for the overview of ess-tracebug functionality." '((((background light) (min-colors 88)) (:foreground "medium blue" :overline "medium blue")) (((background dark) (min-colors 88)) (:foreground "deep sky blue" :overline "deep sky blue")) (((background light) (min-colors 8)) (:foreground "blue")) - (((background dark) (min-colors 8)) (:foreground "syan"))) + (((background dark) (min-colors 8)) (:foreground "cyan"))) "Face for fringe bitmap for last-input position." :group 'ess-tracebug) @@ -567,15 +543,21 @@ can use `ess--busy-slash', `ess--busy-B',`ess--busy-stars', (defvar ess--busy-timer nil "Timer used for busy process indication.") +(defcustom inferior-ess-fix-misaligned-output nil + "If non-nil, try to correct misaligned process output." + :group 'ess-tracebug + :type 'boolean) + (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'." +If \\='strip, remove all such instances. Otherwise, if non-nil, `+ ++ + + ' 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 strip :tag "Replace all") + (const t :tag "Replace 3 or more +"))) (defvar ess-long+replacement ". + " "Replacement used for long + prompt. @@ -618,7 +600,7 @@ ESS internal code assumes default R prompts.") (setq ess--tb-last-input (point)) (setq ess--tb-last-input-overlay (ess--tb-make-last-input-overlay - (point-at-bol) (point-at-eol)))) + (line-beginning-position) (line-end-position)))) ;; busy timer (setq mode-line-buffer-identification (list (car (propertized-buffer-identification "%3b")) @@ -627,22 +609,18 @@ ESS internal code assumes default R prompts.") (setq ess--busy-timer (run-with-timer 2 .5 (ess--make-busy-timer-function (get-buffer-process (current-buffer))))) (add-hook 'kill-buffer-hook (lambda () (when ess--busy-timer (cancel-timer ess--busy-timer)))) - (add-hook 'comint-input-filter-functions 'ess-tracebug-set-last-input nil 'local) + (add-hook 'comint-input-filter-functions #'ess-tracebug-set-last-input nil 'local) ;; redefine ;; TODO: all this part should go (partially gone now) - (unless (fboundp 'orig-ess-parse-errors) - (defalias 'orig-ess-parse-errors (symbol-function 'ess-parse-errors)) - (defalias 'ess-parse-errors (symbol-function 'next-error))))) + (advice-add 'ess-parse-errors :override #'next-error))) (defun ess--tb-stop () "Stop ess traceback session in the current ess process." (with-current-buffer (process-buffer (get-process ess-current-process-name)) ;; restore original definitions (when (equal ess-dialect "R") - (when (fboundp 'orig-ess-parse-errors) - (defalias 'ess-parse-errors (symbol-function 'orig-ess-parse-errors)) - (fmakunbound 'orig-ess-parse-errors))) + (advice-remove 'ess-parse-errors #'next-error)) (if (local-variable-p 'ess--tb-last-input-overlay) (delete-overlay ess--tb-last-input-overlay)) (kill-local-variable 'ess--tb-last-input-overlay) @@ -652,7 +630,7 @@ ESS internal code assumes default R prompts.") (kill-local-variable 'compilation-error-regexp-alist) (kill-local-variable 'compilation-search-path) (cancel-timer ess--busy-timer) - (remove-hook 'comint-input-filter-functions 'ess-tracebug-set-last-input 'local) + (remove-hook 'comint-input-filter-functions #'ess-tracebug-set-last-input 'local) (setq mode-line-buffer-identification (propertized-buffer-identification "%12b")))) (defvar ess--dbg-forward-ring (make-ring 10) @@ -661,8 +639,9 @@ debugger or traceback events are initiated. It is used in `ess--dbg-goto-input-point'.") (defvar ess--dbg-backward-ring (make-ring 10) - "Ring of markers to the positions from which `ess--dbg-goto-input-point' is called. -See the also `ess--dbg-goto-debug-point'") + "Ring of markers for the positions from `ess--dbg-goto-input-point'. +Marks the position from which it was called. See also +`ess--dbg-goto-debug-point'") ;; (setq ess-R--tb-regexp-alist '(R R2 R3 R-recover)) ;;(pop compilation-error-regexp-alist-alist) @@ -673,9 +652,9 @@ Pop up a compilation/grep/occur like buffer. Usual global key bindings are available (\\[next-error] and \\[previous-error]) for `next-error' and `previous-error' respectively. -You can bind 'no-select' versions of this commands: -\(define-key compilation-minor-mode-map [(?n)] #'next-error-no-select) -\(define-key compilation-minor-mode-map [(?p)] #'previous-error-no-select)" +You can bind `no-select' versions of this commands: +\(define-key compilation-minor-mode-map [(?n)] #\\='next-error-no-select) +\(define-key compilation-minor-mode-map [(?p)] #\\='previous-error-no-select)" (interactive) (cl-assert ess-traceback-command nil "Not implemented for dialect %s" ess-dialect) @@ -713,7 +692,7 @@ Also see `ess-show-traceback'" (let ((ess-traceback-command ess-call-stack-command)) (ess-show-traceback))) -(defalias 'ess-show-R-traceback 'ess-show-traceback) +(defalias 'ess-show-R-traceback #'ess-show-traceback) (defun ess--tb-next-error-goto-process-marker () ;; assumes current buffer is the process buffer with compilation enabled @@ -747,7 +726,7 @@ This is the value of `next-error-function' in iESS buffers." (at-error t) (msg (condition-case nil - (compilation-next-error n nil beg-pos) + (compilation-next-error n nil beg-pos) (error (when pbuff-p (ess--tb-next-error-goto-process-marker)) @@ -784,7 +763,7 @@ This is the value of `next-error-function' in iESS buffers." (defun inferior-ess-move-last-input-overlay () "Move the overlay to the point." - (let ((pbol (point-at-bol))) + (let ((pbol (line-beginning-position))) (move-overlay ess--tb-last-input-overlay pbol (max (- (point) 2) (+ pbol 2))))) @@ -800,12 +779,12 @@ This is the value of `next-error-function' in iESS buffers." '(( "" "NONE" "NULL" ) ( " r" "RECOVER" "utils::recover") ( " t" "TRACEBACK" "base::traceback")) - "Alist of 'on-error' actions. + "Alist of `on-error' actions. Toggled with `ess-debug-toggle-error-action'. Each element must have the form (DISP SYMB ACTION) where DISP is the string to be displayed in the mode line when the action is in place. SYMB is the symbolic name of an action. ACTION is the string giving the -actual expression to be assigned to 'error' user option. See R's +actual expression to be assigned to `error' user option. See R's help ?options for more details." :type '(alist :key-type string :value-type (group string string)) @@ -855,7 +834,7 @@ In no-windowed Emacs an `overlay-arrow' is displayed at this position.") (defcustom ess-debug-blink-interval .2 "Time in seconds to blink the background of the debug line. -Currently two events are defined 'ref-not-found' and 'same-ref'. +Currently two events are defined `ref-not-found' and `same-ref'. Blinking colors for these events can be customized by corresponding faces." :group 'ess-debug @@ -937,7 +916,7 @@ The SPEC should be one of the components of (error "Unknown action")))) (defun ess-debug-toggle-error-action () - "Toggle the 'on-error' action. + "Toggle the `on-error' action. The action list is in `ess-debug-error-action-alist'." (interactive) (ess-force-buffer-current) @@ -967,12 +946,13 @@ The action list is in `ess-debug-error-action-alist'." (defun ess--dbg-activate-overlays () "Initialize active debug line overlays." (move-overlay ess--dbg-current-debug-overlay - (point-at-bol) (1+ (point-at-eol)) (current-buffer)) + (line-beginning-position) (1+ (line-end-position))) ;; used by overlay-arrow functionality on no-X, should be bol - (move-marker ess--dbg-current-debug-position (point-at-bol))) + (move-marker ess--dbg-current-debug-position (line-beginning-position))) (defun ess--dbg-deactivate-overlays () - "Deletes markers and overlays. Overlay arrow remains to indicate the last debug position." + "Delete debugger markers and overlays. +Overlay arrow remains to indicate the last debug position." (delete-overlay ess--dbg-current-debug-overlay) (set-marker ess--dbg-current-debug-position nil)) @@ -1102,14 +1082,14 @@ watch and loggers. Integrates into ESS and iESS modes by binding (process-put proc 'dbg-buffer dbuff); buffer were the look up takes place (process-put proc 'dbg-active nil) ; t if the process is in active debug state. ; Active debug states are usually those, in which prompt start with Browser[d]> - (set-process-filter proc 'inferior-ess-tracebug-output-filter) + (set-process-filter proc #'inferior-ess-tracebug-output-filter) (with-current-buffer (process-buffer proc) (unless (equal ess-dialect "R") (error "Can not activate the debugger for %s dialect" ess-dialect)) (add-to-list 'ess--mode-line-process-indicator 'ess--dbg-mode-line-debug t) (add-to-list 'ess--mode-line-process-indicator 'ess--dbg-mode-line-error-action t) - (add-hook 'ess-presend-filter-functions 'ess--dbg-remove-empty-lines nil 'local)) + (add-hook 'ess-presend-filter-functions #'ess--dbg-remove-empty-lines nil 'local)) (with-current-buffer dbuff (setq ess-local-process-name lpn) (buffer-disable-undo) @@ -1135,8 +1115,8 @@ Kill the *ess.dbg.[R_name]* buffer." (error "Can not deactivate the debugger for %s dialect" ess-dialect)) (delq 'ess--dbg-mode-line-debug ess--mode-line-process-indicator) (delq 'ess--dbg-mode-line-error-action ess--mode-line-process-indicator) - (remove-hook 'ess-presend-filter-functions 'ess--dbg-remove-empty-lines 'local)) - (set-process-filter proc 'inferior-ess-output-filter) + (remove-hook 'ess-presend-filter-functions #'ess--dbg-remove-empty-lines 'local)) + (set-process-filter proc #'inferior-ess-output-filter) (kill-buffer (process-get proc 'dbg-buffer)) (process-put proc 'dbg-buffer nil) (process-put proc 'dbg-active nil) @@ -1211,7 +1191,7 @@ Kill the *ess.dbg.[R_name]* buffer." (define-obsolete-variable-alias 'ess-mpi-alist 'ess-mpi-handlers "ESS 19.04") (defvar ess-mpi-handlers - '(("message" . message) + '(("message" . ess-mpi:message) ("error" . ess-mpi:error) ("eval" . ess-mpi:eval) ("y-or-n" . ess-mpi:y-or-n)) @@ -1220,6 +1200,9 @@ Each element is of the form (TYPE . HANDLER), where TYPE is the message type and HANDLER is a function (symbol) to be called on the payload list of each message.") +(defun ess-mpi:message (msg) + (message "%s" msg)) + (defun ess-mpi:error (msg) (error "MPI error: %s" msg)) @@ -1227,7 +1210,7 @@ the payload list of each message.") "Read STR and evaluate as Emacs expression. If present, the CALLBACK string is passed through `format' with returned value from EXPR and then sent to the subprocess." - (let ((result (eval (read str)))) + (let ((result (eval (read str) t))) (when callback (ess-send-string (ess-get-process) (format callback result))))) @@ -1280,13 +1263,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 @@ -1306,8 +1292,9 @@ value as it might be a continuation prompt." (t (error "Invalid values of `inferior-ess-replace-long+'"))))))) (defun ess--offset-output (prev-prompt str) - "Add suitable offset to STR given the preceding PREV-PROMPT." - (if prev-prompt + "Add suitable offset to STR given the preceding PREV-PROMPT. +Do nothing if `inferior-ess-fix-misaligned-output' is nil." + (if (and inferior-ess-fix-misaligned-output prev-prompt) (let ((len (length prev-prompt))) ;; prompts have at least 2 chars (if (eq (elt prev-prompt (- len 2)) ?+) @@ -1341,11 +1328,16 @@ prompts." ;; handler, or mpi printing itself takes very long. (unless (eq :incomplete (ess-mpi-handle-messages abuf)) (with-current-buffer abuf + ;; Uncomment this line when debugging. This pops up the + ;; accumulation buffer and causes point to follow + ;; automatically as the parsing progresses. + ;; (pop-to-buffer (current-buffer)) (goto-char (point-min)) (let ((case-fold-search nil)) (when (re-search-forward "Error\\(:\\| +in\\)" nil t) (unless (get-buffer-window pbuf 'visible) - (display-buffer (process-buffer proc) nil t)))) + (setq next-error-last-buffer pbuf) + (display-buffer pbuf nil t)))) (goto-char (point-min)) ;; First long + + in the output mirrors the sent input by the user and ;; is unnecessary in nowait case. A single + can be a continuation in @@ -1374,15 +1366,13 @@ prompts." tpos (if nowait (or (match-end 1) (match-end 3)) (match-end 0))) - ;; for debugging in R:accum window in order to see the pointer moving - ;; (set-window-point (get-buffer-window) tpos) (when (> pos1 pos2) (let ((str (buffer-substring pos2 pos1))) (comint-output-filter proc (ess--offset-output prev-prompt str)))) (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 @@ -1434,7 +1424,7 @@ the output into *ess.dbg* buffer." (flush-timer (process-get proc 'flush-timer))) ;; current-buffer is still the user's input buffer here - (ess--if-verbose-write-process-state proc string) + (ess--if-verbose-write-process-state proc string "tracebug-filter") (inferior-ess-run-callback proc string) (process-put proc 'is-recover match-selection) @@ -1523,7 +1513,7 @@ the output into *ess.dbg* buffer." ;; no source reference, simply show the inferior (display-buffer pbuf))) - (when match-selection ;(and (not was-in-recover) match-selection) + (when (and match-selection (not is-iess)) ;(and (not was-in-recover) match-selection) (ess-electric-selection t)))) @@ -1546,7 +1536,7 @@ the output into *ess.dbg* buffer." :keymap ess-debug-minor-mode-map) (defun ess--dbg-goto-last-ref-and-mark (dbuff &optional other-window) - "Open the most recent debug reference, and set all the necessary marks and overlays. + "Open the most recent debug reference and set the necessary marks and overlays. It's called from `inferior-ess-tracebug-output-filter'. DBUFF must be the *ess.dbg* buffer associated with the process. If OTHER-WINDOW is non nil, attempt to open the location in a @@ -1556,15 +1546,15 @@ different window." (setq ref (ess--dbg-get-next-ref -1 (point-max) ess--dbg-last-ref-marker ess--dbg-regexp-reference)) ; sets point at the end of found ref (when ref - (move-marker ess--dbg-last-ref-marker (point-at-eol)) + (move-marker ess--dbg-last-ref-marker (line-end-position)) ;; each new step repositions the current-ref! (move-marker ess--dbg-current-ref ess--dbg-last-ref-marker))) (when ref - (let ((buf (apply 'ess--dbg-goto-ref other-window ref))) + (let ((buf (apply #'ess--dbg-goto-ref other-window ref))) (if buf ;; if referenced buffer has been found, put overlays: (with-current-buffer buf - (setq t-debug-position (copy-marker (point-at-bol))) + (setq t-debug-position (copy-marker (line-beginning-position))) (if (equal t-debug-position ess--dbg-current-debug-position) (progn ;; highlights the overlay for ess--dbg-blink-interval seconds (overlay-put ess--dbg-current-debug-overlay 'face 'ess--dbg-blink-same-ref-face) @@ -1639,67 +1629,71 @@ nil, or TB-INDEX is not found return nil." (goto-char pos) (forward-line (1- line)) (if col - (goto-char (+ (point-at-bol) col)) + (goto-char (+ (line-beginning-position) col)) (back-to-indentation)) (when (bound-and-true-p org-babel-tangled-file) (org-babel-tangle-jump-to-org)) - (list (point-marker) (copy-marker (point-at-eol)))))))))) + (list (point-marker) (copy-marker (line-end-position)))))))))) +(defvar ess-r-package-library-paths) (defun ess--dbg-find-buffer (filename) "Find a buffer for file FILENAME. If FILENAME is not found at all, ask the user where to find it if `ess--dbg-ask-for-file' is non-nil. Search the directories in -`ess-tracebug-search-path'." +`ess-tracebug-search-path' and `ess-r-package-library-paths'." (let ((dirs (append (ess-r-package-source-dirs) - (cl-loop for d in ess-tracebug-search-path + ess-r-package-library-paths + (cl-loop for d in (append ess-tracebug-search-path) append (ess-r-package--all-source-dirs d)))) + (filematch (format "%s\\'" filename)) buffer name) - (setq dirs (cons default-directory dirs)) ;; TODO: should be R working dir - ;; 1. search already open buffers for match (associated file might not even exist yet) - (cl-dolist (bf (buffer-list)) - (with-current-buffer bf - (when (and buffer-file-name - (or (and (file-name-absolute-p filename) - (string-match (format "%s\\'" filename) buffer-file-name)) - (equal filename (file-name-nondirectory buffer-file-name)))) - (setq buffer bf) - (cl-return)))) - ;; 2. The file name is absolute. Use its explicit directory as + (setq dirs (delq nil (cons (with-ess-process-buffer t default-directory) dirs))) + ;; 1. The file name is absolute. Use its explicit directory as ;; the first in the search path, and strip it from FILENAME. (when (and (null buffer) (file-name-absolute-p filename)) (setq filename (abbreviate-file-name (expand-file-name filename)) dirs (cons (file-name-directory filename) dirs) filename (file-name-nondirectory filename))) - ;; 3. Now search the path. - (while (and (null buffer) dirs) - (let ((thisdir (pop dirs))) - (setq name (expand-file-name filename thisdir) - buffer (and (file-exists-p name) - (find-file-noselect name))))) - ;; 4. Ask for file if not found (tothink: maybe remove this part?) - (if (and (null buffer) - ess-debug-ask-for-file) - (save-excursion ;This save-excursion is probably not right. - (let* ((pop-up-windows t) - (name (read-file-name - (format "Find next line in (default %s): " filename) - nil filename t nil)) - (origname name)) - (cond - ((not (file-exists-p name)) - (message "Cannot find file `%s'" name) - (ding) (sit-for 2)) - ((and (file-directory-p name) - (not (file-exists-p - (setq name (expand-file-name filename name))))) - (message "No `%s' in directory %s" filename origname) - (ding) (sit-for 2)) - (t - (setq buffer (find-file-noselect name))))))) - ;; nil if not found - buffer)) + (or + ;; 2. Search the path. + (while (and (null buffer) dirs) + (let ((thisdir (pop dirs))) + (setq name (expand-file-name filename thisdir) + buffer (and (file-exists-p name) + (find-file-noselect name))))) + buffer + + ;; 3. search already open buffers for match (associated file might not even exist yet) + (cl-dolist (bf (buffer-list)) + (with-current-buffer bf + (when (and buffer-file-name + (string-match filematch buffer-file-name)) + (setq buffer bf) + (cl-return)))) + buffer + + ;; 4. Ask for file if not found (tothink: maybe remove this part?) + (when ess-debug-ask-for-file + (save-excursion ;This save-excursion is probably not right. + (let* ((pop-up-windows t) + (name (read-file-name + (format "Find next line in (default %s): " filename) + nil filename t nil)) + (origname name)) + (cond + ((not (file-exists-p name)) + (message "Cannot find file `%s'" name) + (ding) (sit-for 2)) + ((and (file-directory-p name) + (not (file-exists-p + (setq name (expand-file-name filename name))))) + (message "No `%s' in directory %s" filename origname) + (ding) (sit-for 2)) + (t + (setq buffer (find-file-noselect name))))))) + buffer))) (defun ess--dbg-get-next-ref (n &optional pt BOUND REG nF nL nC) "Move point to the next reference in the *ess.dbg* buffer. @@ -1711,9 +1705,9 @@ to move forwards (or backwards, if negative). Optional arg PT, if non-nil, specifies the value of point to start looking for the next message, default to (point). BOUND is the limiting position of the search. REG is the regular expression to search with. nF -- sub-expression of REG giving the 'file'; defaults to 1. nL - -giving the 'line'; defaults to 2. nC - sub-expr giving the -'column'; defaults to 3." +- sub-expression of REG giving the `file'; defaults to 1. nL - +giving the `line'; defaults to 2. nC - sub-expr giving the +`column'; defaults to 3." (unless ess--dbg-buf-p (error "Not in *ess.dbg* buffer")) (setq nF (or nF 1) @@ -1729,7 +1723,7 @@ giving the 'line'; defaults to 2. nC - sub-expr giving the (defun ess--debug-keys-message-string (&optional map) (let ((overriding-local-map (or map ess-debug-minor-mode-map))) (substitute-command-keys - (mapconcat 'identity + (mapconcat #'identity '("(\\[ess-debug-command-continue])cont" "(\\[ess-debug-command-continue-multi])cont-multi" "(\\[ess-debug-command-next])next" @@ -1772,17 +1766,17 @@ If supplied, EV must be a proper key event or a string representing the digit." (when (re-search-backward "\\(?: \\|^\\)\\([0-9]+\\):[^\t]+Selection:" ess--tb-last-input t) (setq depth (string-to-number (match-string 1))) (when (> depth 9) - (setq ev-char (ess-completing-read "Selection" (mapcar 'number-to-string + (setq ev-char (ess-completing-read "Selection" (mapcar #'number-to-string (number-sequence depth 0 -1)) nil t ev-char nil))))) - (setq prompt (delete-and-extract-region (point-at-bol) mark-pos)) + (setq prompt (delete-and-extract-region (line-beginning-position) mark-pos)) (insert (concat prompt ev-char "\n")) (ess-send-string proc ev-char) (move-marker (process-mark proc) (max-char))))) (defun ess-debug-command-next () "Step next in debug mode. -Equivalent to 'n' at the R prompt." +Equivalent to `n' at the R prompt." (interactive) (ess-force-buffer-current) (unless (ess--dbg-is-active-p) @@ -1820,8 +1814,7 @@ Equivalent to 'n' at the R prompt." (ess-debug-command-continue)) (defun ess-debug-command-up () - "Step up one call frame. -Equivalent to 'n' at the R prompt." + "Step up one call frame.." (interactive) (ess-force-buffer-current) (unless (ess--dbg-is-active-p) @@ -1897,7 +1890,7 @@ ARGS are ignored to allow using this function in process hooks." (((class color) (background dark) (min-colors 88)) (:foreground "deep sky blue")) (((background light) (min-colors 8)) (:foreground "blue")) (((background dark) (min-colors 8)) (:foreground "cyan"))) - "Face used to highlight 'browser' breakpoints." + "Face used to highlight `browser' breakpoints." :group 'ess-debug) (defface ess-bp-fringe-recover-face @@ -1905,20 +1898,27 @@ ARGS are ignored to allow using this function in process hooks." (((class color) (background dark) (min-colors 88)) (:foreground "magenta")) (((background light) (min-colors 8)) (:foreground "magenta")) (((background dark) (min-colors 8)) (:foreground "magenta"))) - "Face used to highlight 'recover' breakpoints fringe." + "Face used to highlight `recover' breakpoints fringe." :group 'ess-debug) (defun ess--bp-pipe-block-p () (save-excursion - (let ((inhibit-point-motion-hooks t) - (inhibit-field-text-motion t)) + (let ((inhibit-field-text-motion t)) + (forward-line -1) + (end-of-line) + (looking-back "%>%[ \t]*" (line-beginning-position))))) + +(defun ess--bp-pipe-native-block-p () + (save-excursion + (let ((inhibit-field-text-motion t)) (forward-line -1) (end-of-line) - (looking-back "%>%[ \t]*" (point-at-bol))))) + (looking-back "|>[ \t]*" (line-beginning-position))))) (defvar ess--bp-identifier 1) (defcustom ess-bp-type-spec-alist '((pipe ".ess_pipe_browser() %%>%%" "B %>%\n" filled-square ess-bp-fringe-browser-face ess--bp-pipe-block-p) + (pipe-native ".ess_pipe_browser() |>" "B |>\n" filled-square ess-bp-fringe-browser-face ess--bp-pipe-native-block-p) (browser "browser(expr=is.null(.ESSBP.[[%s]]));" "B>\n" filled-square ess-bp-fringe-browser-face) (recover "recover()" "R>\n" filled-square ess-bp-fringe-recover-face)) "List of lists of breakpoint types. @@ -1928,7 +1928,8 @@ Each sublist has five elements: 3- string to be displayed instead of the expression 4- fringe bitmap to use 5- face for fringe and displayed string -6- optional, a function which should return nil if this BP doesn't apply to current context." +6- optional, a function which should return nil if this BP + doesn't apply to current context." :group 'ess-debug :type '(alist :key-type symbol :value-type (group string string symbol face))) @@ -2089,7 +2090,7 @@ Returns the beginning position of the hidden text." ;; 'bp-substring 'comment))) )))))))) -(add-hook 'ess-r-mode-hook 'ess-bp-recreate-all) +(add-hook 'ess-r-mode-hook #'ess-bp-recreate-all) (defun ess-bp-get-bp-position-nearby () @@ -2138,8 +2139,8 @@ to the current position, nil if not found." (interactive) (let* ((pos (ess-bp-get-bp-position-nearby)) (same-line (and pos - (<= (point-at-bol) (cdr pos)) - (>= (point-at-eol) (car pos)))) + (<= (line-beginning-position) (cdr pos)) + (>= (line-end-position) (car pos)))) (types ess-bp-type-spec-alist) (ev last-command-event) (com-char (event-basic-type ev)) @@ -2189,14 +2190,14 @@ to the current position, nil if not found." (init-pos (make-marker))) (if (null pos) (if interactive? (message "No breakpoints nearby")) - (if (eq (point) (point-at-eol)) + (if (eq (point) (line-end-position)) (goto-char (1- (point)))) ;; work-around for issue 3 (set-marker init-pos (point)) (goto-char (car pos)) (delete-region (car pos) (cdr pos)) (indent-for-tab-command) (goto-char init-pos) - (if (eq (point) (point-at-eol)) (forward-char))))) + (if (eq (point) (line-end-position)) (forward-char))))) (defun ess-bp-kill-all nil "Delete all breakpoints in current buffer." @@ -2320,7 +2321,7 @@ If there is no active R session, this command triggers an error." (dummy-string (ess-tracebug--propertize "|" 'current-watch-bar 'font-lock-keyword-face))) (ess-tracebug--set-left-margin) - (setq-local revert-buffer-function 'ess-watch-revert-buffer) + (setq-local revert-buffer-function #'ess-watch-revert-buffer) (turn-on-font-lock) (setq ess-watch-current-block-overlay (make-overlay (point-min) (point-max))) @@ -2368,7 +2369,7 @@ the debugging." (ess-command ess-watch-command wbuf sleep no-prompt-check) ;; delete the ++++++> line ;; not very reliable but works fine so far. (goto-char (point-min)) - (delete-region (point-at-bol) (+ 1 (point-at-eol))) + (delete-region (line-beginning-position) (+ 1 (line-end-position))) (ess-watch-set-current curr-block) (set-window-point (get-buffer-window wbuf) (point)))))) @@ -2455,7 +2456,7 @@ Arguments IGNORE and NOCONFIRM currently not used." (goto-char (point-min)) (re-search-forward ess-watch-start-expression nil t nr) (goto-char (match-end 0)) - (apply 'move-overlay ess-watch-current-block-overlay (ess-watch-block-limits-at-point))) + (apply #'move-overlay ess-watch-current-block-overlay (ess-watch-block-limits-at-point))) (defun ess-watch--make-alist () @@ -2482,8 +2483,10 @@ string giving the actual R expression." wal))) (defun ess-watch--parse-assoc (al) - "Return a string of the form 'assign(\".ess_watch_expressions\", list(a = parse(expr_a), b= parse(expr_b)), envir = .GlobalEnv)' -ready to be send to R process. AL is an association list as return by `ess-watch--make-alist'" + "Return a string command ready to be passed to R process. +The command is of the form `assign(\".ess_watch_expressions\", +list(a = parse(expr_a), b= parse(expr_b)), envir = .GlobalEnv)'. +AL is an association list as return by `ess-watch--make-alist'" (concat ".ess_watch_assign_expressions(list(" (mapconcat (lambda (el) (if (> (length (cadr el) ) 0) @@ -2524,7 +2527,7 @@ Optional N if supplied gives the number of steps forward `backward-char'." (unless (re-search-forward ess-watch-start-expression nil t n) (goto-char (point-min)) ;;circular but always moves to start! (re-search-forward ess-watch-start-expression nil t 1)) - (apply 'move-overlay ess-watch-current-block-overlay (ess-watch-block-limits-at-point))) + (apply #'move-overlay ess-watch-current-block-overlay (ess-watch-block-limits-at-point))) (defun ess-watch-previous-block (&optional n) "Move the overlay over the previous block. @@ -2536,7 +2539,7 @@ Optional N if supplied gives the number of backward steps." (goto-char (point-max)) ;;circular but always moves to last! (re-search-backward ess-watch-start-expression nil t 1)) (goto-char (match-end 0)) - (apply 'move-overlay ess-watch-current-block-overlay (ess-watch-block-limits-at-point))) + (apply #'move-overlay ess-watch-current-block-overlay (ess-watch-block-limits-at-point))) ;;;_ + BLOCK MANIPULATION and EDITING (defun ess-watch-rename () @@ -2550,7 +2553,7 @@ Optional N if supplied gives the number of backward steps." ;; (reg-expr (concat "^" ess-watch-start-expression "\\s-*\\(.*\\)$")) ;; (reg-all (concat "\\(" reg-name "\\)\n\\(" reg-expr "\\)")) ;; (pos 0) wal name expr) - (unless (re-search-forward reg-name (point-at-eol) t) + (unless (re-search-forward reg-name (line-end-position) t) (error "Can not find the name substring in the current watch block ")) (setq name (match-string-no-properties 1)) (setq start (match-beginning 1)) @@ -2589,7 +2592,7 @@ Optional N if supplied gives the number of backward steps." (ess-watch-refresh-buffer-visibly (current-buffer)))) (defun ess-watch-add () - "Ask for new R expression and name and append it to the end of the list of watch expressions." + "Ask for new R expression and append to the current list of watch expressions." (interactive) (let (nr expr name) (goto-char (point-max)) @@ -2623,7 +2626,7 @@ Optional N if supplied gives the number of backward steps." wbl) (when (> nr 1) (setq buffer-read-only nil) - (setq wbl (apply 'delete-and-extract-region (ess-watch-block-limits-at-point))) + (setq wbl (apply #'delete-and-extract-region (ess-watch-block-limits-at-point))) (re-search-backward ess-watch-start-block nil t 1) ;; current block was deleted, point is at the end of previous block (insert wbl) (ess-watch--install-.ess_watch_expressions) @@ -2639,7 +2642,7 @@ Optional N if supplied gives the number of backward steps." wbl) (when (< nr nr-all) (setq buffer-read-only nil) - (setq wbl (apply 'delete-and-extract-region (ess-watch-block-limits-at-point))) + (setq wbl (apply #'delete-and-extract-region (ess-watch-block-limits-at-point))) (end-of-line) (when (re-search-forward ess-watch-start-block nil t 1) ;; current block was deleted, point is at the end of previous block or point-max (goto-char (match-beginning 0))) @@ -2651,7 +2654,7 @@ Optional N if supplied gives the number of backward steps." "Kill the current block." (interactive) (setq buffer-read-only nil) - (apply 'delete-region (ess-watch-block-limits-at-point)) + (apply #'delete-region (ess-watch-block-limits-at-point)) (ess-watch--install-.ess_watch_expressions)) ;;;_ + Debug/Undebug at point @@ -2691,7 +2694,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"))) diff --git a/elpa/ess-20191014.1343/ess-trns.el b/elpa/ess-20230419.1527/ess-trns.el similarity index 92% rename from elpa/ess-20191014.1343/ess-trns.el rename to elpa/ess-20230419.1527/ess-trns.el index 19fa8059..42a62e97 100644 --- a/elpa/ess-20191014.1343/ess-trns.el +++ b/elpa/ess-20230419.1527/ess-trns.el @@ -1,29 +1,26 @@ ;;; ess-trns.el --- Support for manipulating S transcript files -*- lexical-binding: t; -*- -;; Copyright (C) 1989--1994 Bates, Kademan, Ritter and Smith -;; Copyright (C) 1997--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2012 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. - +;; Copyright (C) 1989-2020 Free Software Foundation, Inc. ;; Author: David Smith ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: diff --git a/elpa/ess-20191014.1343/ess-utils.el b/elpa/ess-20230419.1527/ess-utils.el similarity index 86% rename from elpa/ess-20191014.1343/ess-utils.el rename to elpa/ess-20230419.1527/ess-utils.el index 6c49e11c..98084753 100644 --- a/elpa/ess-20191014.1343/ess-utils.el +++ b/elpa/ess-20230419.1527/ess-utils.el @@ -1,36 +1,36 @@ ;;; ess-utils.el --- General Emacs utility functions used by ESS -*- lexical-binding: t; -*- -;; Copyright (C) 1998--2010 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. -;; Copyright (C) 2011--2017 A.J. Rossini, Richard M. Heiberger, Martin Maechler, -;; Kurt Hornik, Rodney Sparapani, Stephen Eglen and Vitalie Spinu. - +;; Copyright (C) 1998-2022 Free Software Foundation, Inc. ;; Author: Martin Maechler ;; Created: 9 Sept 1998 ;; Maintainer: ESS-core -;; This file is part of ESS (Emacs Speaks Statistics). +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ - +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: ;; Various utilities for ESS. ;;; Code: + (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 @@ -94,7 +94,7 @@ Otherwise go as far as possible and return -1." (defun ess-skip-thing (thing) "Leave point at the end of THING. -THING can be 'function, 'paragraph, or 'line." +THING can be \\='function, \\='paragraph, or \\='line." (cond ((eql thing 'line) (goto-char (line-end-position))) ((eql thing 'paragraph) (forward-paragraph)) @@ -155,7 +155,7 @@ This function will work even if LIST is unsorted. See also `delete-dups'." (setq list (setcdr list (funcall predicate (car list) (cdr list)))))) list) -(define-obsolete-function-alias 'ess-uniq-list 'delete-dups "ESS 19.04") +(define-obsolete-function-alias 'ess-uniq-list #'delete-dups "ESS 19.04") (defalias 'ess-flatten-list ;; `flatten-tree' is a function in Emacs 27 @@ -163,7 +163,7 @@ This function will work even if LIST is unsorted. See also `delete-dups'." 'flatten-tree (lambda (list) "Take the arguments and flatten them into one long LIST. -Drops 'nil' entries." +Drops `nil' entries." ;; Taken from lpr.el ;; `lpr-flatten-list' is defined here (copied from "message.el" and ;; enhanced to handle dotted pairs as well) until we can get some @@ -180,10 +180,24 @@ Drops 'nil' entries." (t (list list)))) (define-obsolete-function-alias 'ess-delete-blank-lines - 'delete-blank-lines "ESS 19.04") + #'delete-blank-lines "ESS 19.04") (define-obsolete-function-alias 'ess-line-to-list-of-words #'split-string "ESS 19.04") +(defmacro ess--exit-protect (body &rest exit) + "Run EXIT when BODY exits early. +Unlike `unwind-protect', the unwind forms only run in case of +early exits. Unlike `condition-case', they run inconditionally, +no matter the reason for exiting early (e.g. error or quit)." + (declare + (indent 1) + (debug (form &rest form))) + `(let ((--early-exit t)) + (unwind-protect + (prog1 ,body (setq --early-exit nil)) + (when --early-exit + ,@exit)))) + ;;*;; System @@ -201,7 +215,7 @@ Drops 'nil' entries." (goto-char ess-temp-store-point)) t))) -(define-obsolete-function-alias 'ess-find-exec 'ess-find-exec-completions "ESS 19.04") +(define-obsolete-function-alias 'ess-find-exec #'ess-find-exec-completions "ESS 19.04") (defun ess-find-exec-completions (root) "Given the ROOT of an executable file name, find all possible completions. Search for the executables in the variable `exec-path'." @@ -221,7 +235,7 @@ Search for the executables in the variable `exec-path'." (defun ess-drop-non-directories (file-strings) "Drop all entries in FILE-STRINGS that do not \"look like\" directories." - (ess-flatten-list (mapcar 'file-name-directory file-strings))) + (ess-flatten-list (mapcar #'file-name-directory file-strings))) (defun ess--parent-dir (path n) "Return Nth parent of PATH." @@ -266,8 +280,21 @@ process to avoid excessive requests." (process-put *proc* ',time-var (current-time)) out))))) +(defmacro with-ess-process-buffer (no-error &rest body) + "Execute BODY in the process buffer of `ess-current-process-name'. +If NO-ERROR is t don't trigger error when there is not current +process. Symbol *proc* is bound to the current process during the +evaluation of BODY." + (declare (indent 1) (debug t)) + `(let ((*proc* (and ess-local-process-name (get-process ess-local-process-name)))) + (if *proc* + (with-current-buffer (process-buffer *proc*) + ,@body) + (unless ,no-error + (error "No current ESS process"))))) + -;;; Emacs Integration +;;*;; Emacs Integration (defun ess-derived-mode-p () "Non-nil if the current major mode is an ESS major mode." @@ -290,7 +317,7 @@ process to avoid excessive requests." (if (and (symbolp sym) (custom-variable-p sym)) (cons - (eval (car (get sym 'standard-value))) + (eval (car (get sym 'standard-value)) t) (symbol-value sym)) (error "`ess-font-lock-keywords' must be a symbol of a custom variable")))) @@ -364,8 +391,37 @@ ess-[dialect]-font-lock-keywords variable." (ess--extract-fl-keywords))) t]))) +(declare-function untrace-function "trace" ()) +(defvar ess--is-tracing nil) + +;;;###autoload +(define-minor-mode ess-elisp-trace-mode + "Toggle tracing of ess-prefixed functions. +Tracing is useful for debugging background ESS behaviour. When +enabled, all functions prefixed in `ess-' and `inferior-ess' are +instrumented with `trace-function'. Tracing is turned off by +calling `untrace-function' on these functions." + :global t + :group 'ess + (let ((fns (append (all-completions "ess-" obarray) + (all-completions "inferior-ess-" obarray) + (list "update-ess-process-name-list" + "forward-ess-r-expr" + "forward-ess-r-sexp" + "backward-ess-r-expr" + "backward-ess-r-sexp" + "company-ess-julia-objects" + "run-ess-r" + "run-ess-r-newest"))) + (do (symbol-function (if ess-elisp-trace-mode + #'untrace-function + #'trace-function)))) + (dolist (fn fns) + (when (symbol-function (intern fn)) + (funcall do (intern fn)))))) + -;;; External modes +;;*;; External modes ;; Define these here for the byte compiler since ido dynamically ;; let-binds them: @@ -375,6 +431,8 @@ ess-[dialect]-font-lock-keywords variable." (defvar ido-directory-nonreadable) (defvar ido-current-directory) (defvar ido-enable-flex-matching) +(declare-function ido-choose-completion-string "ido") +(declare-function ido-minibuffer-setup "ido") (declare-function ido-read-internal "ido" (item prompt hist &optional default require-match initial)) (defun ess-completing-read (prompt collection &optional predicate @@ -402,15 +460,15 @@ with ': ' and (default %s) when needed. If HIST is nil use sel) (unwind-protect (progn - (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) - (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) + (add-hook 'minibuffer-setup-hook #'ido-minibuffer-setup) + (add-hook 'choose-completion-string-functions #'ido-choose-completion-string) (setq sel (ido-read-internal 'list prompt hist def require-match initial-input)) (when hist ;; ido does not push into hist the whole match if C-SPC or RET is used (reported) (unless (string= sel (car (symbol-value hist))) (set hist (cons sel (symbol-value hist)))))) (when reset-ido - (remove-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) - (remove-hook 'choose-completion-string-functions 'ido-choose-completion-string))) + (remove-hook 'minibuffer-setup-hook #'ido-minibuffer-setup) + (remove-hook 'choose-completion-string-functions #'ido-choose-completion-string))) sel) ;; else usual completion (completing-read prompt collection predicate require-match initial-input hist def)))) @@ -445,8 +503,25 @@ specifies inferior buffers." (cl-copy-list (append sources company-backends))) (delq 'company-capf company-backends))) +(defun ess--setup-eldoc (fun) + "Setup support for eldoc. +FUN is the function to return data for eldoc." + (when ess-use-eldoc + (if (not (boundp 'eldoc-documentation-functions)) + ;; older versions of Eldoc included in Emacs 27 and previous + (add-function :before-until (local 'eldoc-documentation-function) + fun) + ;; new eldoc, in Emacs 28+ + (add-hook 'eldoc-documentation-functions fun nil t) + ;; Eldoc is on GNU ELPA so you can have new eldoc + Emacs 27.1 + ;; or older, see bug#1130 and Emacs bug # 47388 for why we have + ;; to do this + (when (and (fboundp 'eldoc-documentation-default) + (function-equal #'ignore eldoc-documentation-function)) + (setq-local eldoc-documentation-function #'eldoc-documentation-default))))) + (defmacro ess--execute-electric-command (map &optional prompt wait exit-form &rest args) - "Execute single-key commands defined in MAP till a key is pressed which is not part of map. + "Execute keys defined in MAP till a key is pressed which is not in MAP. Single-key input commands are those that once executed do not require the prefix command for subsequent invocation. Return the value of the lastly executed command. PROMPT is passed to @@ -490,7 +565,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. @@ -510,9 +585,10 @@ the prompt from those lines that remain. Invoke this command with (setq this-command 'yank)))) (defun ess-yank (&optional arg) - "Call `ess-yank-cleaned-commands' if ARG is 16. -With double prefix ARG (\\[universal-argument] -\\[universal-argument]) call `ess-yank-cleaned-commands'." + "Variant of `yank' that optionally extracts commands from transcripts. +When called with double prefix ARG (\\[universal-argument] +\\[universal-argument]), calls `ess-transcript-clean-region' +before yanking. See `ess-yank-cleaned-commands'." (interactive "*P") (if (equal '(16) arg) (ess-yank-cleaned-commands) @@ -529,7 +605,7 @@ With double prefix ARG (\\[universal-argument] If the current language defines `ess-build-tags-command' use it and ask the subprocess to build the tags. Otherwise use imenu regexp and call find .. | etags .. in a shell command. You must -have 'find' and 'etags' programs installed. +have `find' and `etags' programs installed. Use M-. to navigate to a tag. \\[visit-tags-table] to append/replace the currently used tag table. @@ -564,13 +640,13 @@ GTags file (default TAGS): ") (nth 2 l)))) imenu-generic-expression))) (tags-cmd (format "etags -o %s --regex='%s' -" tagfile - (mapconcat 'identity regs "' --regex='")))) + (mapconcat #'identity regs "' --regex='")))) (message "Building tags: %s" tagfile) (when (= 0 (shell-command (format "%s | %s" find-cmd tags-cmd))) (message "Building tags .. ok!"))))) -;;; UI +;;*;; UI (defvar ess-current-region-overlay (let ((overlay (make-overlay (point) (point)))) @@ -666,10 +742,10 @@ Copied almost verbatim from gnus-utils.el (but with test for mac added)." (when focus-follows-mouse (set-mouse-position frame (1- (frame-width frame)) 0))) -(define-obsolete-function-alias 'ess-do-auto-fill 'do-auto-fill "ESS 19.04") +(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'." @@ -734,7 +810,10 @@ Copied almost verbatim from gnus-utils.el (but with test for mac added)." space "function\\s-*(" ; whitespace, function keyword, parenthesis ))) `(,part-1 ,part-2)) - "Placeholder for use in constructing `ess-r-function-pattern' and `ess-s-function-pattern'.") + "Partial regex for matching functions. + +Placeholder for use in constructing `ess-r-function-pattern' and +`ess-s-function-pattern'.") (defvar ess-r-function-pattern (concat (car ess--r-s-function-pattern) @@ -796,7 +875,7 @@ Intended for completion." (and bounds (not (save-excursion (goto-char (car bounds)) - (looking-at "/\\|.[0-9]"))) + (looking-at "/\\|[.0-9]"))) bounds))) (defun ess-symbol-start () @@ -849,7 +928,7 @@ also return t if inside curly brackets." r))) -;;; String manipulation +;;*;; String manipulation (defun ess-quote-special-chars (string) "Quote special characters in STRING." @@ -956,23 +1035,6 @@ Otherwise treat \\ in NEWTEXT string as special: newtext "")))))) (concat rtn-str (substring str start)))) -;;- From: friedman@gnu.ai.mit.edu (Noah Friedman) -;;- Date: 12 Feb 1995 21:30:56 -0500 -;;- Newsgroups: gnu.emacs.sources -;;- Subject: nuke-trailing-whitespace -;;- -;;- This is too trivial to make into a big todo with comments and copyright -;;- notices whose length exceed the size of the actual code, so consider it -;;- public domain. Its purpose is along similar lines to that of -;;- `require-final-newline', which is built in. I hope the names make it -;;- obvious. - -;; (add-hook 'write-file-hooks 'nuke-trailing-whitespace) -;;or at least -;; (add-hook 'ess-mode-hook -;; (lambda () -;; (add-hook 'local-write-file-hooks 'nuke-trailing-whitespace))) - (defvar ess-nuke-trailing-whitespace-p nil;disabled by default 'ask "[Dis]activates (ess-nuke-trailing-whitespace). Disabled if nil; if t, it works unconditionally, otherwise, @@ -1012,8 +1074,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'." @@ -1030,7 +1095,7 @@ nil and not t, query for each instance." (save-excursion (goto-char (point-max)) (forward-line -1) - (delete-region (point-at-eol) (point-max)))) + (delete-region (line-end-position) (point-max)))) (defun ess-sleep () "Put Emacs to sleep for `ess-sleep-for-shell' seconds (floats work)." @@ -1041,16 +1106,32 @@ nil and not t, query for each instance." (when buf (set-buffer buf)) (mapc (lambda (pair) (make-local-variable (car pair)) - (set (car pair) (eval (cdr pair))) + (set (car pair) (eval (cdr pair) t)) (when (bound-and-true-p ess--make-local-vars-permanent) (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") +(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) diff --git a/elpa/ess-20191014.1343/ess.el b/elpa/ess-20230419.1527/ess.el similarity index 83% rename from elpa/ess-20191014.1343/ess.el rename to elpa/ess-20230419.1527/ess.el index 8ad45957..31cac957 100644 --- a/elpa/ess-20191014.1343/ess.el +++ b/elpa/ess-20230419.1527/ess.el @@ -1,5 +1,7 @@ ;;; ess.el --- Emacs Speaks Statistics -*- lexical-binding: t; -*- -;; + +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. + ;; Author: David Smith ;; A.J. Rossini ;; Richard M. Heiberger @@ -14,51 +16,60 @@ ;; J. Alexander Branham ;; ;; Maintainer: ESS Core Team -;; Copyright (C) 1997-2018 ESS Core Team ;; Created: 7 Jan 1994 ;; Version: 18.10.3snapshot ;; URL: https://ess.r-project.org/ -;; Package-Requires: ((emacs "25.1") (julia-mode "0.3")) -;; ESSR-Version: 1.5 +;; Package-Requires: ((emacs "25.1")) +;; ESSR-Version: 1.8 + +;; This file is part of GNU Emacs. + +;;; License: ;; -;; This file is free software; you can redistribute it and/or modify +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ -;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; + ;;; Commentary: ;; ;; Emacs Speaks Statistics (ESS) is a package designed to support editing of ;; scripts and interaction with various statistical analysis programs such as R, ;; S-Plus, SAS, Stata and OpenBUGS/JAGS. For more details please visit ESS home ;; page at https://ess.r-project.org/ -;; + ;;; Code: (require 'ess-utils) (require 'cl-generic) - +(require 'lisp-mnt) (defvar reporter-prompt-for-summary-p) ;; Versions (defconst ess-version (eval-when-compile - (require 'lisp-mnt) - (lm-version (or load-file-name buffer-file-name))) + (lm-version (or (and (boundp 'load-true-file-name) + load-true-file-name) + load-file-name + buffer-file-name))) "Version of ESS currently loaded.") (defconst essr-version (eval-when-compile - (require 'lisp-mnt) - (save-excursion (lm-header "ESSR-Version"))) + (lm-with-file (or (and (boundp 'load-true-file-name) + load-true-file-name) + load-file-name + buffer-file-name) + (lm-header "ESSR-Version"))) "Version of ESSR package.") (defvar ess-revision nil @@ -90,7 +101,8 @@ Is set by \\[ess-version-string].") (git-rev (when (file-exists-p git-fname) (with-current-buffer (find-file-noselect git-fname) (goto-char (point-min)) - (concat "git: "(buffer-substring 1 (point-at-eol)))))) + (concat "git: "(buffer-substring + (point-min) (line-end-position)))))) (elpa-fname (concat ess-dir "ess-pkg.el")) (elpa-rev (when (file-exists-p elpa-fname) ;; Get it from ELPA dir name, (probably won't work if installed manually) @@ -152,7 +164,7 @@ Is set by \\[ess-version-string].") ;;; Timer (defcustom ess-idle-timer-interval 1 - "Number of idle seconds to wait before running function in `ess-idle-timer-functions'." + "Number of seconds to wait before running function in `ess-idle-timer-functions'." :type '(integer) :group 'ess) @@ -177,7 +189,8 @@ etc.") (require 'timer) (defvar ess--idle-timer - (run-with-idle-timer ess-idle-timer-interval 'repeat 'ess--idle-timer-function) + (run-with-idle-timer ess-idle-timer-interval 'repeat + #'ess--idle-timer-function) "Timer used to run `ess-idle-timer-functions'.") diff --git a/elpa/ess-20191014.1343/ess.info b/elpa/ess-20230419.1527/ess.info similarity index 93% rename from elpa/ess-20191014.1343/ess.info rename to elpa/ess-20230419.1527/ess.info index 0ab70e35..9c96dfc7 100644 --- a/elpa/ess-20191014.1343/ess.info +++ b/elpa/ess-20230419.1527/ess.info @@ -1,4 +1,4 @@ -This is ess.info, produced by makeinfo version 6.5 from ess.texi. +This is ess.info, produced by makeinfo version 6.7 from ess.texi. INFO-DIR-SECTION Emacs START-INFO-DIR-ENTRY @@ -251,6 +251,126 @@ File: ess.info, Node: New features, Next: Credits, Prev: Features, Up: Intro Changes and New Features in 19.04 (unreleased): + * ESS[R]: When a background command is interrupted with C-g, ESS now + asks the user if they want to disable background evaluations + altogether. This is a resiliency measure against cases where + background evals cause cascading errors or hangs. + + * ESS[R]: Background commands now propagate errors to Emacs. + + * ESS[R]: Background commands can now be disabled by process instad + of globally. For instance when a process has failed to initialize + properly, background evals are disabled for that particular process + to avoid cascading errors. Other processes may still use + background commands. + + * ESS[R]: ESSR commands are now more robust when ESSR is not in + scope. This can happen when using 'browser()' in an environment + that doesn't inherit from the search path. + + * ESS[R]: Unexpected exits are now detected during startup. In that + case an error is thrown with advice about how to recover. + + * ESS[R]: 'options(width = )' is now set on startup based on the + width of the inferior window. + + * ESS[R]: Add support for R projects and start R by default in the + project folder. + + * ESS[R]: Backticked symbols in the process buffer are no longer + fontified as strings. + + * ESS[R]: 'ess-command' now runs R code in a sandboxed environment. + Use '.ess.environment()' to inspect the current environment. + + * ESS[R]: Added support for new syntax in R 4.0 and R 4.1. This + concerns raw strings, lambda functions, and the pipe operator. + + * ESS[R]: Highlight error locations in rlang style backtraces + + * ESS[R]: Fixed issue that caused ESS-help to hang when usage blocks + include R comments (#1025). Fix contributed by Bill Evans. + + * ESS: New 'ess-elisp-trace-mode' minor mode. Toggle it to start or + stop tracing all 'ess'-prefixed functions with 'trace-function'. + Tracing is useful for debugging background ESS behaviour. + + * 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 30 seconds. It + should normally be avoided with long-running tasks because it + causes Emacs to block while the command is running. If the timeout + is reached, an error is thrown. An interrupt is also 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 30 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). It also strips continuation prompts ('+' + prompts) automatically and reliably (#1116). + + * 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. + + * 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 @@ -294,9 +414,9 @@ Changes and New Features in 19.04 (unreleased): '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. See - *Note (ess)Controlling buffer display:: for more information and - examples. + '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 @@ -317,6 +437,10 @@ Changes and New Features in 19.04 (unreleased): 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'. @@ -345,6 +469,11 @@ Changes and New Features in 19.04 (unreleased): * 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. + + * ESS no longer activates eldoc if the user has disabled + global-eldoc-mode. + The following have been made obsolete or removed, see their documentation for more detail: @@ -412,8 +541,8 @@ documentation for more detail: '(with-require-after-load "ess" )' 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. *Note (ess)Activating and Loading ESS:: for more - information on this feature. + 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 @@ -445,7 +574,7 @@ documentation for more detail: 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]: 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()'. @@ -779,10 +908,10 @@ separate *Help* buffer. Second, 'C-h m' pops up a complete list of keybindings available in each ESS mode and brief description of that mode. - Emacs is a versatile editor written in both C and a dialect of lisp -known as elisp. ESS is written in elisp and benefits from the flexible + Emacs is a versatile editor written in both C and a dialect of Lisp +known as Elisp. ESS is written in Elisp and benefits from the flexible nature of lisp. In particular, many aspects of ESS behaviour can be -changed by suitable customization of lisp variables. This manual +changed by suitable customization of Lisp variables. This manual mentions some of the most frequent variables. A full list of them however is available by using the Custom facility within Emacs. Type 'M-x customize-group RET ess RET' to get started. *note Customization:: @@ -861,7 +990,7 @@ directory 'ESS' in the current working directory. 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 + Optionally, compile Elisp files, build the documentation, and the autoloads: cd /path/to/ESS/ make @@ -1154,17 +1283,17 @@ this. Note that the order matters; '*R Dired*' would match '*R' if it came before in the alist. (setq display-buffer-alist - `(("*R Dired" + `(("^\\*R Dired" (display-buffer-reuse-window display-buffer-in-side-window) (side . right) (slot . -1) (window-width . 0.33) (reusable-frames . nil)) - ("*R" + ("^\\*R" (display-buffer-reuse-window display-buffer-at-bottom) (window-width . 0.5) (reusable-frames . nil)) - ("*Help" + ("^\\*Help" (display-buffer-reuse-window display-buffer-in-side-window) (side . right) (slot . 1) @@ -1173,11 +1302,11 @@ came before in the alist. Some users prefer working with multiple frames where one frame has the source code and the other frame has the inferior process. To -achieve this, use this example. *Note (elisp)Buffer Display Action -Alists:: for a detailed description of 'reusable-frames'. +achieve this, use this example. For a detailed description of +'reusable-frames', see *Note (elisp)Buffer Display Action Alists::. (setq display-buffer-alist - '(("*R" + '(("^\\*R" (display-buffer-reuse-window display-buffer-pop-up-frame) (reusable-frames . 0)))) @@ -1187,7 +1316,7 @@ so that other buffers are not shown on top of that window. *Note from being displayed in the window showing the inferior R process. (setq display-buffer-alist - '(("*R" + '(("^\\*R" nil (dedicated . t)))) @@ -1198,7 +1327,7 @@ script buffer and the process buffer share the same window, you can do so like this: (setq display-buffer-alist - '(("*R" . ((display-buffer-same-window) (inhibit-same-window . nil))) + '(("^\\*R" . ((display-buffer-same-window) (inhibit-same-window . nil))) ("\\.R$" . ((display-buffer-same-window) (inhibit-same-window . nil)))))  @@ -1494,7 +1623,7 @@ discussion of the history mechanism, and do experiment with the 'In/Out' menu to explore the possibilities. Many ESS users like to have even easier access to these, and -recommend to add something like +recommend adding something like (eval-after-load "comint" '(progn (define-key comint-mode-map [up] @@ -1800,9 +1929,11 @@ The behavior is controlled by the variable: -- User Option: ess-eval-visibly Non-'nil' means 'ess-eval-*' commands display commands and output - in the process buffer. Default is 't'. + in the process buffer. A value of 't' blocks Emacs while R is + busy. A value of 'nowait' does not block Emacs but printing may be + slightly off. - Passing a prefix ('C-u') (in elisp terms, the argument VIS) to any of + Passing a prefix ('C-u') (in Elisp terms, the argument VIS) to any of the following commands, however, reverses the meaning of 'ess-eval-visibly' for that command only -- for example 'C-u C-c C-j' evaluates the current line without showing the input in the iESS buffer. @@ -2080,8 +2211,8 @@ expression on the line containing the comment if it extends beyond the indentation column. You turn off the default behavior by adding the line '(setq ess-indent-with-fancy-comments nil)' to your '.emacs' file. - ESS also supports Roxygen entries which is R documentation maintained -in the source code as comments *Note Roxygen::. + ESS also supports roxygen2 entries which is R documentation +maintained in the source code as comments *Note roxygen2::. The indentation commands provided by ESS are: @@ -2532,8 +2663,8 @@ variable 'ess-help-own-frame'. Help buffers are displayed by calling the function 'ess-display-help'. You can customize where these buffers are displayed -by adding an entry in 'display-buffer-alist' (see *Note (ess)Controlling -buffer display:: for examples) or by customizing the options +by adding an entry in 'display-buffer-alist'; for examples, see *Note +(ess)Controlling buffer display::. Or by customizing the options 'ess-help-own-frame', 'ess-help-frame-alist', and 'ess-display-buffer-reuse-frame'. @@ -2842,15 +2973,15 @@ File: ess.info, Node: Editing documentation, Next: Namespaced Evaluation, Pre ESS provides two ways of writing documentation for R objects. Either using the standard R documentation system or using in-source documentation written as structured comment fields for use with the -Roxygen package. +roxygen2 package. * Menu: * R documentation files:: Edit objects in a specialized buffer -* Roxygen:: Loading source files into the ESS process +* roxygen2:: Loading source files into the ESS process  -File: ess.info, Node: R documentation files, Next: Roxygen, Up: Editing documentation +File: ess.info, Node: R documentation files, Next: roxygen2, Up: Editing documentation 10.2.1 Editing R documentation (Rd) files ----------------------------------------- @@ -2944,18 +3075,18 @@ mode, add the following lines to one of your Emacs startup files: (font-lock-mode 1)))  -File: ess.info, Node: Roxygen, Prev: R documentation files, Up: Editing documentation +File: ess.info, Node: roxygen2, Prev: R documentation files, Up: Editing documentation -10.2.2 Editing Roxygen documentation ------------------------------------- +10.2.2 Editing roxygen2 documentation +------------------------------------- -The Roxygen R package makes it possible to keep the intended contents -for Rd files as structured comments in the R source files. Roxygen can +The roxygen2 R package makes it possible to keep the intended contents +for Rd files as structured comments in the R source files. roxygen2 can then parse R files and generate appropriate Rd files from these comments, fill the usage fields as well as updating 'NAMESPACE' files. -See the Roxygen documentation found via for more -information on its usage. An example of an Roxygen entry for a simple R -function can look like this: +See the roxygen2 documentation found via +for more information on its usage. An example of an roxygen2 entry for +a simple R function can look like this: ##' Description of the function ##' @@ -2967,30 +3098,30 @@ function can look like this: myfun <- function(me) cat("Hello", me, "\n") The entry is immediately preceding the object to document and all -lines start with the Roxygen prefix string, in this case '##''. ESS +lines start with the roxygen2 prefix string, in this case '##''. ESS provides support to edit these documentation entries by providing line filling, navigation, template generation etc. Syntax highlighting is provided. - Roxygen is customized by the variables in the customization group -"Ess Roxy". Customizables include the Roxygen prefix, use of folding to -toggle visibility of Roxygen entries and the Roxygen template. + roxygen2 is customized by the variables in the customization group +"Ess Roxy". Customizations include the roxygen2 prefix, use of folding +to toggle visibility of roxygen2 entries and the roxygen2 template. - All ESS Roxygen support is defined in 'ess-roxy.el' which is loaded + All ESS roxygen2 support is defined in 'ess-roxy.el' which is loaded by default in ESS. The following special Emacs commands are provided. -- Command: ess-roxy-update-entry - 'C-c C-o C-o' Generate a Roxygen template or update the parameter - list in Roxygen entry at point (or above the function at the + 'C-c C-o C-o' Generate a roxygen2 template or update the parameter + list in roxygen2 entry at point (or above the function at the point). Documented parameters that are not in the function are placed last in the list, parameters that are not documented and not in the definition are dropped. Parameter descriptions are filled if 'ess-roxy-fill-param-p' is non-nil. -- Command: ess-roxy-toggle-roxy-region BEG END - 'C-c C-o C-c' Toggle the presence of the leading Roxygen string on + 'C-c C-o C-c' Toggle the presence of the leading roxygen2 string on all lines in the marked region (between BEG and END. Convenient - for transferring text to Roxygen entries and to evaluate example + for transferring text to roxygen2 entries and to evaluate example fields. -- Command: ess-roxy-preview-Rd NAME-FILE @@ -2999,31 +3130,31 @@ by default in ESS. The following special Emacs commands are provided. checking syntax. When used with the prefix argument NAME-FILE, i.e. 'C-u C-c C-e C-r', place the content in a buffer associated with a Rd file with the same name as the documentation. Requires - the Roxygen package to be installed. + the roxygen2 package to be installed. -- Command: ess-roxy-preview-HTML VISIT-INSTEAD-OF-OPEN 'C-c C-o C-t' Use the attached R process to parse the entry at to generate HTML for the entry and open it in a browser. When used with the prefix argument VISIT-INSTEAD-OF-OPEN, i.e. 'C-u C-c C-e - C-t', visit the generated HTML file instead. Requires the Roxygen + C-t', visit the generated HTML file instead. Requires the roxygen2 and tools packages to be installed. -- Command: ess-roxy-previous-entry - 'C-c C-o p' Go to start of the Roxygen entry above point. + 'C-c C-o p' Go to start of the roxygen2 entry above point. -- Command: ess-roxy-next-entry - 'C-c C-o n' Go to end of the Roxygen entry above point. + 'C-c C-o n' Go to end of the roxygen2 entry above point. -- Command: ess-roxy-hide-all 'C-c C-o C-h' Use the hideshow mode to fold away the visibility of - all Roxygen entries. Hide-show support must be enabled for this + all roxygen2 entries. Hide-show support must be enabled for this binding to get defined. ESS also advises the following standard editing functions in order to -make Roxygen editing more intuitive: +make roxygen2 editing more intuitive: 'TAB' - 'ess-R-complete-object-name' Complete Roxygen tag at point. E.g. + 'ess-R-complete-object-name' Complete roxygen2 tag at point. E.g. doing 'TAB' when the point is at the end of '@par' completes to '@param'. @@ -3034,18 +3165,18 @@ make Roxygen editing more intuitive: 'TAB' 'ess-indent-command' If hide-show support is enabled, fold away the - visibility of the Roxygen entry at point. + visibility of the roxygen2 entry at point. 'M-q' - 'fill-paragraph' Fill the Roxygen field at point. + 'fill-paragraph' Fill the roxygen2 field at point. 'C-a' 'ess-roxy-move-beginning-of-line' Move to the point directly to the - right of the Roxygen start string. If already there, move to the + right of the roxygen2 start string. If already there, move to the beginning of the line. 'RET' - 'newline-and-indent' Insert a new line and the Roxygen prefix + 'newline-and-indent' Insert a new line and the roxygen2 prefix string.  @@ -3356,8 +3487,8 @@ File: ess.info, Node: Xref, Next: Rdired, Prev: Toolbar, Up: Extras Xref is an Emacs interface that supports finding "identifiers," usually function definitions in ESS's view. ESS ships with support for Xref in -Emacs versions 25.1 and higher. *Note (emacs)Xref:: for how to use this -feature. +Emacs versions 25.1 and higher. For how to use this feature, see *Note +(emacs)Xref::.  File: ess.info, Node: Rdired, Next: Package listing, Prev: Xref, Up: Extras @@ -3414,10 +3545,10 @@ under the 'C-c C-.' keymap: -- Command: ess-rutils-rm-all 'C-c C-. m' Remove all R objects. - -- Command: ess-rutils-load-wkspc + -- Command: ess-rutils-load-workspace 'C-c C-. w' Load a workspace file into R. - -- Command: ess-rutils-save-wkspc + -- Command: ess-rutils-save-workspace 'C-c C-. s' Save a workspace file. -- Command: ess-change-directory @@ -3438,9 +3569,9 @@ File: ess.info, Node: Org, Next: Sweave and AUCTeX, Prev: Package listing, U =============================== Org-mode () now supports reproducible research and -literate programming in many languages (including R) - see chapter 14 of +literate programming in many languages (including R) - see chapter 15 of the Org manual -(). For ESS +(). For ESS users, this offers a document-based work environment within which to embed ESS usage. R code lives in code blocks of an Org document, from which it can be edited in ess-mode, evaluated, extracted ("tangled") to @@ -3565,9 +3696,9 @@ you can change the Unix environment variable 'PATH', as this variable is used to set 'exec-path'. R on GNU/Linux systems and other Unix-like systems (macOS): If you -have "R-1.8.1" on your 'exec-path', it can be started using 'M-x -R-1.8.1'. By default, ESS will find versions of R beginning "R-1", -"R-2", "R-3", "R-devel", or "R-patched". If your versions of R are +have "R-3.6.3" on your 'exec-path', it can be started using 'M-x +R-3.6.3'. By default, ESS will find versions of R beginning "R-1", +"R-2", ..., "R-7", "R-devel", or "R-patched". If your versions of R are called other names, consider renaming them with a symbolic link or change the variable 'ess-r-runners-prefixes'. To see which functions have been created for starting different versions of R, type 'M-x R-' @@ -3884,14 +4015,14 @@ The setup of function keys for SAS batch processing is unavoidably complex, but the usage of function keys is simple. There are five distinct options: - Option 1 (default). Function keys in ESS[SAS] are not bound to elisp + Option 1 (default). Function keys in ESS[SAS] are not bound to Elisp commands. This is in accordance with the GNU Elisp Coding Standards (GECS) which do not allow function keys to be bound so that they are available to the user. Options 2-5. Since GECS does not allow function keys to be bound by modes, these keys are often unused. So, ESS[SAS] provides users with -the option of binding elisp commands to these keys. Users who are +the option of binding Elisp commands to these keys. Users who are familiar with SAS will, most likely, want to duplicate the function key capabilities of the SAS Display Manager. There are four options (noted in parentheses). @@ -4362,7 +4493,7 @@ File: ess.info, Node: Bugs, Next: Reporting Bugs, Up: Mailing lists/bug repor * Multi-line commands could be handled better by the command history mechanism. - * Changes to the continutation prompt in R (e.g. 'options(continue = + * Changes to the continuation prompt in R (e.g. 'options(continue = " ")') are not automatically detected by ESS. Hence, for now, the best thing is not to change the continuation prompt. If you do change the continuation prompt, you will need to change accordingly @@ -4478,23 +4609,23 @@ Key index * C-c C-. s: Package listing. (line 27) * C-c C-. u: Package listing. (line 17) * C-c C-. w: Package listing. (line 24) -* C-c C-b: Evaluating code. (line 66) +* C-c C-b: Evaluating code. (line 68) * C-c C-c: Other. (line 9) -* C-c C-c <1>: Evaluating code. (line 39) +* C-c C-c <1>: Evaluating code. (line 41) * C-c C-e C-d: Edit buffer. (line 9) * C-c C-e C-s: Styles. (line 15) * C-c C-e s: Styles. (line 15) -* C-c C-f: Evaluating code. (line 52) -* C-c C-j: Evaluating code. (line 45) -* C-c C-o C-c: Roxygen. (line 45) -* C-c C-o C-h: Roxygen. (line 72) -* C-c C-o C-o: Roxygen. (line 37) -* C-c C-o C-r: Roxygen. (line 51) -* C-c C-o C-t: Roxygen. (line 59) -* C-c C-o n: Roxygen. (line 69) -* C-c C-o p: Roxygen. (line 66) +* C-c C-f: Evaluating code. (line 54) +* C-c C-j: Evaluating code. (line 47) +* C-c C-o C-c: roxygen2. (line 45) +* C-c C-o C-h: roxygen2. (line 72) +* C-c C-o C-o: roxygen2. (line 37) +* C-c C-o C-r: roxygen2. (line 51) +* C-c C-o C-t: roxygen2. (line 59) +* C-c C-o n: roxygen2. (line 69) +* C-c C-o p: roxygen2. (line 66) * C-c C-q: Hot keys. (line 71) -* C-C C-r: Evaluating code. (line 59) +* C-C C-r: Evaluating code. (line 61) * C-c C-s: Hot keys. (line 34) * C-c C-t C-s: Namespaced Evaluation. (line 36) @@ -4502,11 +4633,11 @@ Key index * C-c C-w: Clean. (line 11) * C-c C-x: Hot keys. (line 24) * C-c C-z: Other. (line 13) -* C-c M-b: Evaluating code. (line 69) -* C-c M-f: Evaluating code. (line 55) -* C-c M-j: Evaluating code. (line 48) +* C-c M-b: Evaluating code. (line 71) +* C-c M-f: Evaluating code. (line 57) +* C-c M-j: Evaluating code. (line 50) * C-c M-l: Hot keys. (line 50) -* C-c M-r: Evaluating code. (line 62) +* C-c M-r: Evaluating code. (line 64) * C-c RET: Resubmit. (line 14) * C-c `: Error Checking. (line 9) * C-j: Indenting. (line 60) @@ -4517,8 +4648,8 @@ Key index * C-M-h: Other edit buffer commands. (line 18) * C-M-q: Indenting. (line 49) -* C-M-x: Evaluating code. (line 36) -* C-RET: Evaluating code. (line 32) +* C-M-x: Evaluating code. (line 38) +* C-RET: Evaluating code. (line 34) * ESC C-a: Other edit buffer commands. (line 10) * ESC C-e: Other edit buffer commands. @@ -4581,20 +4712,20 @@ Function and program index * ess-display-help-on-object <2>: Help. (line 25) * ess-dump-object-into-edit-buffer: Edit buffer. (line 8) * ess-electric-brace: Indenting. (line 52) -* ess-eval-buffer: Evaluating code. (line 65) -* ess-eval-buffer-and-go: Evaluating code. (line 68) -* ess-eval-function: Evaluating code. (line 51) -* ess-eval-function-and-go: Evaluating code. (line 54) -* ess-eval-line: Evaluating code. (line 44) -* ess-eval-line-and-go: Evaluating code. (line 47) +* ess-eval-buffer: Evaluating code. (line 67) +* ess-eval-buffer-and-go: Evaluating code. (line 70) +* ess-eval-function: Evaluating code. (line 53) +* ess-eval-function-and-go: Evaluating code. (line 56) +* ess-eval-line: Evaluating code. (line 46) +* ess-eval-line-and-go: Evaluating code. (line 49) * ess-eval-line-and-step: Help. (line 106) -* ess-eval-region: Evaluating code. (line 58) +* ess-eval-region: Evaluating code. (line 60) * ess-eval-region <1>: Help. (line 111) -* ess-eval-region-and-go: Evaluating code. (line 61) -* ess-eval-region-or-function-or-paragraph: Evaluating code. (line 35) +* ess-eval-region-and-go: Evaluating code. (line 63) +* ess-eval-region-or-function-or-paragraph: Evaluating code. (line 37) * ess-eval-region-or-function-or-paragraph-and-step: Evaluating code. - (line 38) -* ess-eval-region-or-line-and-step: Evaluating code. (line 31) + (line 40) +* ess-eval-region-or-line-and-step: Evaluating code. (line 33) * ess-execute-objects: Hot keys. (line 23) * ess-execute-search: Hot keys. (line 33) * ess-goto-beginning-of-function-or-para: Other edit buffer commands. @@ -4603,7 +4734,7 @@ Function and program index (line 13) * ess-handy-commands: Handy commands. (line 6) * ess-handy-commands <1>: Handy commands. (line 6) -* ess-indent-command: Roxygen. (line 90) +* ess-indent-command: roxygen2. (line 90) * ess-indent-exp: Indenting. (line 48) * ess-indent-or-complete: Indenting. (line 34) * ess-load-file: Hot keys. (line 49) @@ -4614,7 +4745,7 @@ Function and program index * ess-parse-errors <1>: Error Checking. (line 9) * ess-quit: Hot keys. (line 70) * ess-quit <1>: Help. (line 170) -* ess-R-complete-object-name: Roxygen. (line 80) +* ess-R-complete-object-name: roxygen2. (line 80) * ess-r-package-list-available-packages: Package listing. (line 12) * ess-r-package-list-local-packages: Package listing. (line 9) * ess-r-package-update-packages: Package listing. (line 16) @@ -4625,18 +4756,18 @@ Function and program index * ess-request-a-process: Multiple ESS processes. (line 18) * ess-resynch: Object names. (line 52) -* ess-roxy-hide-all: Roxygen. (line 71) -* ess-roxy-move-beginning-of-line: Roxygen. (line 97) -* ess-roxy-next-entry: Roxygen. (line 68) -* ess-roxy-preview-HTML: Roxygen. (line 58) -* ess-roxy-preview-Rd: Roxygen. (line 50) -* ess-roxy-previous-entry: Roxygen. (line 65) -* ess-roxy-toggle-roxy-region: Roxygen. (line 44) -* ess-roxy-update-entry: Roxygen. (line 36) +* ess-roxy-hide-all: roxygen2. (line 71) +* ess-roxy-move-beginning-of-line: roxygen2. (line 97) +* ess-roxy-next-entry: roxygen2. (line 68) +* ess-roxy-preview-HTML: roxygen2. (line 58) +* ess-roxy-preview-Rd: roxygen2. (line 50) +* ess-roxy-previous-entry: roxygen2. (line 65) +* ess-roxy-toggle-roxy-region: roxygen2. (line 44) +* ess-roxy-update-entry: roxygen2. (line 36) * ess-rutils-html-docs: Package listing. (line 32) -* ess-rutils-load-wkspc: Package listing. (line 23) +* ess-rutils-load-workspace: Package listing. (line 23) * ess-rutils-rm-all: Package listing. (line 20) -* ess-rutils-save-wkspc: Package listing. (line 26) +* ess-rutils-save-workspace: Package listing. (line 26) * ess-set-style: Styles. (line 14) * ess-skip-to-help-section: Help. (line 55) * ess-skip-to-next-section: Help. (line 46) @@ -4656,13 +4787,13 @@ Function and program index * ess-transcript-send-command-and-move: Resubmit. (line 17) * ess-use-ido, ess-completing-read: Minibuffer completion. (line 6) -* fill-paragraph: Roxygen. (line 94) +* fill-paragraph: roxygen2. (line 94) * getting started with tracebug: Getting started with tracebug. (line 6) * inferior-ess-send-input: Command-line editing. (line 9) -* mark-paragraph: Roxygen. (line 85) -* newline-and-indent: Roxygen. (line 102) +* mark-paragraph: roxygen2. (line 85) +* newline-and-indent: roxygen2. (line 102) * objects(): Hot keys. (line 24) * printer(): printer. (line 11) * q(): Hot keys. (line 71) @@ -4670,7 +4801,7 @@ Function and program index * S: Starting up. (line 11) * search(): Hot keys. (line 34) * search() <1>: Object names. (line 19) -* source(): Evaluating code. (line 18) +* source(): Evaluating code. (line 20) * source() <1>: Loading. (line 11) * STERM: Statistical Process running in ESS?. (line 6) @@ -4779,7 +4910,7 @@ Concept Index * dump file names: Source Directories. (line 6) * dump files: Edit buffer. (line 27) * dump files <1>: Source Files. (line 10) -* echoing commands when evaluating: Evaluating code. (line 18) +* echoing commands when evaluating: Evaluating code. (line 20) * edit buffer: Edit buffer. (line 6) * editing commands: Command History. (line 6) * editing functions: Editing objects. (line 6) @@ -4788,7 +4919,7 @@ Concept Index * emacsclient: Emacsclient. (line 6) * entering commands: Entering commands. (line 6) * errors: Error Checking. (line 6) -* ESS commands blocking Emacs: Evaluating code. (line 18) +* ESS commands blocking Emacs: Evaluating code. (line 20) * ess developer: Namespaced Evaluation. (line 6) * ESS process buffer: Starting up. (line 17) @@ -4796,10 +4927,10 @@ Concept Index * ESS tracebug: ESS tracebug. (line 6) * ESS-elsewhere: ESS processes on Remote Computers. (line 9) -* ess-roxy: Roxygen. (line 6) -* evaluating code with echoed commands: Evaluating code. (line 18) -* evaluating R expressions: Evaluating code. (line 29) -* evaluating S expressions: Evaluating code. (line 29) +* ess-roxy: roxygen2. (line 6) +* evaluating code with echoed commands: Evaluating code. (line 20) +* evaluating R expressions: Evaluating code. (line 31) +* evaluating S expressions: Evaluating code. (line 31) * finding function definitions: Xref. (line 6) * flymake: ESS Flymake. (line 6) * font-lock mode: Highlighting. (line 7) @@ -4851,8 +4982,8 @@ Concept Index * remote Computers: ESS processes on Remote Computers. (line 9) * reverting function definitions: Edit buffer. (line 27) -* roxy: Roxygen. (line 6) -* Roxygen: Roxygen. (line 6) +* roxy: roxygen2. (line 6) +* roxygen2: roxygen2. (line 6) * running R: Starting up. (line 6) * running S: Starting up. (line 6) * S+elsewhere: ESS processes on Remote Computers. @@ -4894,104 +5025,109 @@ Node: Introduction2914 Node: Features5668 Node: Current Features6494 Node: New features9945 -Node: Credits29468 -Node: Manual33085 -Node: Installation35751 -Node: Installing from a third-party repository36688 -Node: Installing from source37635 -Node: Activating and Loading ESS39227 -Node: Check Installation40301 -Node: Interactive ESS40521 -Node: Starting up41366 -Node: Multiple ESS processes42110 -Node: ESS processes on Remote Computers43191 -Node: Customizing startup47294 -Node: Controlling buffer display50184 -Node: Entering commands52782 -Node: Command-line editing53940 -Node: Transcript55173 -Node: Last command56942 -Node: Process buffer motion58368 -Node: Transcript resubmit59871 -Node: Saving transcripts61836 -Node: Command History63626 -Node: Saving History67035 -Node: History expansion67796 -Node: Hot keys71007 -Node: Statistical Process running in ESS?75077 -Node: Emacsclient76356 -Node: Other77148 -Node: Evaluating code78167 -Node: Transcript Mode81848 -Node: Resubmit83001 -Node: Clean84064 -Node: Editing objects85060 -Node: Edit buffer86178 -Node: Loading88224 -Node: Error Checking89251 -Node: Indenting90300 -Node: Styles93342 -Node: Other edit buffer commands95716 -Node: Source Files97372 -Node: Source Directories101976 -Node: Help105129 -Node: Completion109573 -Node: Object names109788 -Node: Function arguments112422 -Node: Minibuffer completion113365 -Node: Company113839 -Node: Icicles114226 -Node: Developing with ESS115546 -Node: ESS tracebug115992 -Node: Getting started with tracebug118999 -Node: Editing documentation121157 -Node: R documentation files121707 -Node: Roxygen125409 -Node: Namespaced Evaluation129783 -Node: Extras131781 -Node: ESS ElDoc132805 -Node: ESS Flymake134301 -Node: Handy commands135395 -Node: Highlighting136592 -Node: Parens137627 -Node: Graphics138103 -Node: printer138774 -Node: X11139530 -Node: winjava139869 -Node: Imenu140281 -Node: Toolbar141128 -Node: Xref141536 -Node: Rdired141859 -Node: Package listing142922 -Node: Org144298 -Node: Sweave and AUCTeX145252 -Node: ESS for R147804 -Node: ESS(R)--Editing files148104 -Node: iESS(R)--Inferior ESS processes148605 -Node: Philosophies for using ESS(R)151255 -Node: Example ESS usage152182 -Node: ESS for SAS153587 -Node: ESS(SAS)--Design philosophy154310 -Node: ESS(SAS)--Editing files155243 -Node: ESS(SAS)--TAB key157097 -Node: ESS(SAS)--Batch SAS processes158463 -Node: ESS(SAS)--Function keys for batch processing163491 -Node: iESS(SAS)--Interactive SAS processes172978 -Node: iESS(SAS)--Common problems176732 -Node: ESS(SAS)--Graphics178255 -Node: ESS(SAS)--Windows179038 -Node: ESS for BUGS179616 -Node: ESS for JAGS181372 -Node: Mailing lists/bug reports184724 -Node: Bugs184988 -Node: Reporting Bugs186613 -Node: Mailing Lists187506 -Node: Help with Emacs188233 -Node: Customization188765 -Node: Indices189539 -Node: Key index189714 -Node: Function and program index194846 -Node: Variable index204266 -Node: Concept index207827 +Node: Credits35243 +Node: Manual38860 +Node: Installation41526 +Node: Installing from a third-party repository42463 +Node: Installing from source43410 +Node: Activating and Loading ESS45002 +Node: Check Installation46076 +Node: Interactive ESS46296 +Node: Starting up47141 +Node: Multiple ESS processes47885 +Node: ESS processes on Remote Computers48966 +Node: Customizing startup53069 +Node: Controlling buffer display55959 +Node: Entering commands58580 +Node: Command-line editing59738 +Node: Transcript60971 +Node: Last command62740 +Node: Process buffer motion64166 +Node: Transcript resubmit65669 +Node: Saving transcripts67634 +Node: Command History69424 +Node: Saving History72833 +Node: History expansion73594 +Node: Hot keys76805 +Node: Statistical Process running in ESS?80875 +Node: Emacsclient82154 +Node: Other82946 +Node: Evaluating code83965 +Node: Transcript Mode87761 +Node: Resubmit88914 +Node: Clean89977 +Node: Editing objects90973 +Node: Edit buffer92091 +Node: Loading94137 +Node: Error Checking95164 +Node: Indenting96213 +Node: Styles99257 +Node: Other edit buffer commands101631 +Node: Source Files103287 +Node: Source Directories107891 +Node: Help111044 +Node: Completion115490 +Node: Object names115705 +Node: Function arguments118339 +Node: Minibuffer completion119282 +Node: Company119756 +Node: Icicles120143 +Node: Developing with ESS121463 +Node: ESS tracebug121909 +Node: Getting started with tracebug124916 +Node: Editing documentation127074 +Node: R documentation files127626 +Node: roxygen2131329 +Node: Namespaced Evaluation135740 +Node: Extras137738 +Node: ESS ElDoc138762 +Node: ESS Flymake140258 +Node: Handy commands141352 +Node: Highlighting142549 +Node: Parens143584 +Node: Graphics144060 +Node: printer144731 +Node: X11145487 +Node: winjava145826 +Node: Imenu146238 +Node: Toolbar147085 +Node: Xref147493 +Node: Rdired147821 +Node: Package listing148884 +Node: Org150268 +Node: Sweave and AUCTeX151222 +Node: ESS for R153774 +Node: ESS(R)--Editing files154074 +Node: iESS(R)--Inferior ESS processes154575 +Node: Philosophies for using ESS(R)157230 +Node: Example ESS usage158157 +Node: ESS for SAS159562 +Node: ESS(SAS)--Design philosophy160285 +Node: ESS(SAS)--Editing files161218 +Node: ESS(SAS)--TAB key163072 +Node: ESS(SAS)--Batch SAS processes164438 +Node: ESS(SAS)--Function keys for batch processing169466 +Node: iESS(SAS)--Interactive SAS processes178953 +Node: iESS(SAS)--Common problems182707 +Node: ESS(SAS)--Graphics184230 +Node: ESS(SAS)--Windows185013 +Node: ESS for BUGS185591 +Node: ESS for JAGS187347 +Node: Mailing lists/bug reports190699 +Node: Bugs190963 +Node: Reporting Bugs192587 +Node: Mailing Lists193480 +Node: Help with Emacs194207 +Node: Customization194739 +Node: Indices195513 +Node: Key index195688 +Node: Function and program index200820 +Node: Variable index210240 +Node: Concept index213801  End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/ess-20191014.1343/essd-els.el b/elpa/ess-20230419.1527/essd-els.el similarity index 83% rename from elpa/ess-20191014.1343/essd-els.el rename to elpa/ess-20230419.1527/essd-els.el index 1ed6ef98..f1612cd6 100644 --- a/elpa/ess-20191014.1343/essd-els.el +++ b/elpa/ess-20230419.1527/essd-els.el @@ -1,30 +1,26 @@ ;;; essd-els.el --- S-PLUS 3.x at another location customization -*- lexical-binding: t; -*- -;; Copyright (C) 1998 Richard M. Heiberger -;; Copyright (C) 1999--2005 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;; Copyright (C) 1998-2022 Free Software Foundation, Inc. ;; Author: Richard M. Heiberger ;; Created: December 1998 - ;; Maintainer: ESS-core -;; Keywords: languages - -;; This file is part of ESS. - -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -32,17 +28,16 @@ ;;; Code: -(require 'ess-julia) -(require 'ess-s-lang) +(require 'ess-r-mode) (require 'ess-sp6-d) (require 'ess-sas-d) -(require 'ess-stata-mode) (require 'ess-trns) (require 'ess-utils) +(defvar ess-julia-customize-alist) ;; Easily changeable in a user's .emacs (defvar S+elsewhere-dialect-name "S+6" - "Name of 'dialect' for S-PLUS at another location.") + "Name of `dialect' for S-PLUS at another location.") (defvar S+elsewhere-start-args "-i" "Arguments for `S+elsewhere-dialect-name'.") @@ -56,7 +51,7 @@ The default value is nil." (defvar S+elsewhere-customize-alist (append - '((ess-local-customize-alist . 'S+elsewhere-customize-alist) + '((ess-local-customize-alist . S+elsewhere-customize-alist) (ess-dialect . S+elsewhere-dialect-name) (ess-object-name-db-file . "ess-spelsewhere-namedb.el" ) (inferior-ess-program . inferior-S-elsewhere-program) @@ -84,21 +79,19 @@ The default value is nil." (setq-local ess-local-customize-alist S+elsewhere-customize-alist) (ess-mode)) -(define-obsolete-function-alias 'S+elsewhere-transcript-mode #'S-transcript-mode "2000") - ;; This REALLY shouldn't need an editing mode. Just a transcript and ;; an inferior process handler. (defun ess-select-alist-dialect (&optional dialect) "Query user for an ESS DIALECT and return the matching customize-alist." (interactive) - (let* ((dialects '("R" "S+" "julia" "arc" "vst" "omg" "s3" "s4" "stata" "sp3" "sp4" - "sqpe4" "sp5" "sqpe" "XLS" "SAS")) + (let* ((dialects '("R" "S+" "julia" "s3" "s4" + "sp3" "sp4" "sqpe4" "sp5" "sqpe" "SAS")) (dialect (or dialect (ess-completing-read "Dialect" dialects nil t)))) (cond - ((string= dialect "julia") ess-julia-customize-alist) - ((string= dialect "stata") STA-customize-alist) + ((string= dialect "julia") (progn (require 'julia-mode) + ess-julia-customize-alist)) ((string= dialect "R") ess-r-customize-alist) ((string= dialect "SAS") SAS-customize-alist) (t S+elsewhere-customize-alist)))) @@ -113,7 +106,7 @@ buffer on the local computer." (let ((proc (get-buffer-process (buffer-name)))) (if (not proc) (error "No process is associated with this buffer") - (set-process-filter proc 'inferior-ess-output-filter) + (set-process-filter proc #'inferior-ess-output-filter) (setq ess-current-process-name (process-name proc)) (add-to-list 'ess-process-name-list (list ess-current-process-name))))) diff --git a/elpa/ess-20230419.1527/etc/ESSR.rds b/elpa/ess-20230419.1527/etc/ESSR.rds new file mode 100644 index 0000000000000000000000000000000000000000..5203244f23b5bb5641f94104bd43bfe43b000b25 GIT binary patch literal 79396 zcmV*IKxe-niwFP!000001MGbXm>frSaL>-Y_odU4J(8`@4}=g%!ezn{2nk6z5^Nv=2k&3i zb-k*tzE&%F_%r*d)YDbfuc}_XdiCnnt5R=Lt-FFW!(@>|i5Cr}tc;ac=z7kb8MhJn1*Y!)WVwNhbnrdDjCs#NmN$ZMv-bIvSy`{ubEW~ z!|8SsNO*z<7wqz+CN_4BCNfpAYE!Lgl9HYW0Q+en><<)_ng{t^#T@rZOf}6$qcW%D z;HlQ>a1u8h<-2+c`=@{|j?O-4el z9xKvFh}A^ZGHaUnu4YLS8?Tmind4RSv<`NyV$JHZAKKG2Tx9KPNlaIRST5kJOl_uG zKz(RyFaSshr(vv*&KqLfce(MqLQDI)aR)Fts!~m|X6Egx;XABX>q_F?z(8IwzW^wr z+s+US>*g?ER?Y{3L%pPlPL`X93yN~sK=mvOR$YAu6awq8YTlm$#AuqV+f}nAw|dz; z34W#aXzAu5O=KTxZ^>+#`AHiMT)Ew@%vqEf)yFQMRx)~!ueKUpS6!{6-U*?qe&LYTt$7^=gsTmwa_p}n>359x>^-w z0$v&Ll*c%hJgiDn5As6r$wg{iy#`I%wi^!IW#!z80SOO0)>ci z=YiC>3$%B+2VDqiE!A5(X)%u4OQQ#2bUvRKxi44QbI{mGTGd8tPGq=tUQ>o6<1M&^ zO1TEb-^DMXtE3bElJ*2zWg46{$?Ho8YkL4^k;TIT{xgglK+nso4piU08gjUlez4DH z7Sqnh@gfsyB)lZ?RJG9%bCj$5H|_3L+tzdl1?DpJwZy--Dcn#eK|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1343/etc/ESSR/BUILDESSR b/elpa/ess-20230419.1527/etc/ESSR/BUILDESSR similarity index 72% rename from elpa/ess-20191014.1343/etc/ESSR/BUILDESSR rename to elpa/ess-20230419.1527/etc/ESSR/BUILDESSR index 5fe79863..248d660e 100755 --- a/elpa/ess-20191014.1343/etc/ESSR/BUILDESSR +++ b/elpa/ess-20230419.1527/etc/ESSR/BUILDESSR @@ -1,10 +1,10 @@ -#!/usr/bin/Rscript +#!/usr/bin/env Rscript ## -*- mode: R -*- -## code to build ESSR environemnt. +## code to build ESSR environment. ## Assume that current directory is etc/ESSR ## run "./BUILDESSR" to create ../ESSR.rda ## exactly as in inferior-ess-r-load-ESSR in ess-r-d.el source('./R/.load.R', local=TRUE) -ESSR <- .ess.load.ESSR('./R/') +ESSR <- .ess.ESSR.load('./R/') saveRDS(ESSR, file = "../ESSR.rds") diff --git a/elpa/ess-20191014.1343/etc/ESSR/LOADREMOTE b/elpa/ess-20230419.1527/etc/ESSR/LOADREMOTE similarity index 100% rename from elpa/ess-20191014.1343/etc/ESSR/LOADREMOTE rename to elpa/ess-20230419.1527/etc/ESSR/LOADREMOTE diff --git a/elpa/ess-20230419.1527/etc/ESSR/R/.basic.R b/elpa/ess-20230419.1527/etc/ESSR/R/.basic.R new file mode 100644 index 00000000..b7a41a57 --- /dev/null +++ b/elpa/ess-20230419.1527/etc/ESSR/R/.basic.R @@ -0,0 +1,265 @@ +#### Essential functionality needed by ESS + +## Should work on *all* versions of R. +## Do not use _ in names, nor :: , nor 1L etc, as they +## cannot be parsed in old R versions + +.ess.getRversion <- function() { + if(exists("getRversion", mode="function")) getRversion() + else paste(R.version$major, R.version$minor, sep=".") +} + +## loading ESSR.rda might fail, so re-assign here: +.ess.Rversion <- .ess.getRversion() + +.ess.R.has.utils <- (.ess.Rversion >= "1.9.0") +.ess.utils.name <- paste("package", + if(.ess.Rversion >= "1.9.0") "utils" else "base", + sep = ":") + +## Instead of modern utils::help use one that works in R 1.0.0: +.ess.findFUN <- get("find", .ess.utils.name) + + +### HELP +.ess.help <- function(..., help.type = getOption("help_type")) { + if (is.null(help.type)) { + help.type <- "text" + } + + ## - get("help", ..) searching in global env works with devtools redefines + ## - Redefining to .ess.help this way is necessary because + ## utils:::print.help_files_with_topic (used internally when there's + ## more than one a package) uses the quoted call + ## MM: don't understand; more specifically? + ..help <- function(...) { + do.call(get("help", envir = .GlobalEnv), list(...)) + } + + if (.ess.Rversion > "2.10") { + ## Abbreviating help_type to avoid underscore + if(!is.null(getOption("warnPartialMatchArgs"))) { + op <- options(warnPartialMatchArgs = FALSE); on.exit(options(op)) + } + ..help(..., help = help.type) + } else { + ..help(..., htmlhelp = help.type == "html") + } +} + +.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) + } +}) + +.ess.helpLinks <- function(topic, package) { + tryCatch( + warning = function(...) NULL, + error = function(...) NULL, + { + ast <- .ess.fetchParsedRd(topic, package) + .ess.findLinks(ast) + } + ) +} + +.ess.fetchParsedRd <- function(topic, package) { + path <- utils:::index.search(topic, find.package(package)) + utils:::.getHelpFile(path) +} + +.ess.findLinks <- function(x) { + links <- NULL + findLinksRec <- function(x) { + if (.ess.isRdLink(x)) { + ## Ignore `pkg` for now + links <<- c(links, .ess.getRdLink(x)[[2]]) + } else if (is.list(x)) { + for (elt in x) + findLinksRec(elt) + } + } + + findLinksRec(x) + links +} + +.ess.isRdLink <- function(x) { + identical(attr(x, "Rd_tag"), "\\link") +} + +## From `tools:::get_link()` +.ess.getRdLink <- function(x) { + pkg <- "" + dest <- paste(unlist(x), collapse = "") + + opt <- attr(x, "Rd_option") + if (!is.null(opt)) { + if (grepl("^=", opt, perl = TRUE, useBytes = TRUE)) { + dest <- sub("^=", "", opt) + } else if (grepl(":", opt, perl = TRUE, useBytes = TRUE)) { + dest <- sub("^[^:]*:", "", opt) + pkg <- sub(":.*", "", opt) + } else { + pkg <- as.character(opt) + } + } + + c(pkg, dest) +} + +### SOURCING +.ess.eval <- function(string, visibly = TRUE, output = FALSE, + max.deparse.length = 300, + file = tempfile("ESS"), local = NULL) +{ + if (is.null(local)) { + local <- if (.ess.Rversion > '2.13') parent.frame() else FALSE + } + + ## create FILE, put string into it. Then source. + ## arguments are like in source and .ess.source + cat(string, file = file) + ## The following on.exit infloops in R 3.3.0 + ## https://github.com/emacs-ess/ESS/issues/334 + ## https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16971 + ## So we are cleaning it in .ess.source instead. + ## on.exit(file.remove(file)) + .ess.source(file, visibly = visibly, output = output, + max.deparse.length = max.deparse.length, + local = local, fake.source = TRUE) +} + +.ess.strip.error <- function(msg, srcfile) { + pattern <- paste0(srcfile, ":[0-9]+:[0-9]+: ") + sub(pattern, "", msg) +} + +.ess.file.remove <- function(file){ + if (base::file.exists(file)) base::file.remove(file) + else FALSE +} + +.ess.source <- function(file, visibly = TRUE, output = FALSE, + max.deparse.length = 300, local = NULL, + fake.source = FALSE, keep.source = TRUE, + message.prefix = "") { + if (is.null(local)) { + local <- if (.ess.Rversion > "2.13") + parent.frame() + else FALSE + } + + ss <- + if (.ess.Rversion >= "3.4") + base::source + else if (.ess.Rversion >= "2.8") + function(..., spaced) base::source(...) + else function(..., spaced, keep.source) base::source(...) + + on.exit({ + if (fake.source) + .ess.file.remove(file) + }) + + out <- ss(file, echo = visibly, local = local, print.eval = output, spaced = FALSE, + max.deparse.length = max.deparse.length, keep.source = keep.source) + + if(!fake.source) + cat(sprintf("%sSourced file %s\n", message.prefix, file)) + + ## Return value for org-babel + invisible(out$value) +} + +if(.ess.Rversion < "1.8") + ## (works for "1.7.2"): bquote() was new in 1.8.0 + bquote <- function(expr, where=parent.frame()){ + unquote <- function(e) + if (is.pairlist(e)) as.pairlist(lapply(e, unquote)) + else if (length(e) <= 1) e + else if (e[[1]] == as.name(".")) eval(e[[2]], where) + else as.call(lapply(e, unquote)) + + 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 <- !identical(stdout(), getConnection(1)) + if (sinked) + sink(getConnection(1)) + + on.exit({ + writeLines(paste0(sentinel, "-END")) + if (sinked) + sink(NULL) + }) + + writeLines(paste0(sentinel, "-START")) + + .ess.environment.state$env <- parent.frame() + on.exit(.ess.environment.state$env <- NULL, add = TRUE) + + + ## Don't interrupt `browser()` sessions (#1081) + restart <- function(...) { + if (!is.null(findRestart("browser"))) + invokeRestart("browser") + } + + ## Should be an exiting handler to be able to catch + ## stack overflow errors + rethrow <- function(cnd) { + stop('ESSR::ERROR \"', conditionMessage(cnd), '\"') + } + + out <- tryCatch( + error = rethrow, + 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) +} + +.ess.environment.state <- new.env(parent = emptyenv()) + +.ess.environment <- function() { + .ess.environment.state$env +} diff --git a/elpa/ess-20230419.1527/etc/ESSR/R/.load.R b/elpa/ess-20230419.1527/etc/ESSR/R/.load.R new file mode 100644 index 00000000..9b38af2b --- /dev/null +++ b/elpa/ess-20230419.1527/etc/ESSR/R/.load.R @@ -0,0 +1,96 @@ +## This file is sourced when R starts and `load.ESSR` is called. See +## inferior-ess-r-load-ESSR--local. +## Do not use _ in names, nor :: as they cannot be parsed in old R versions + +## obtain the R version number as a string +.ess.ESSR.get.rver <- function() { + if(exists("getRversion", mode="function")) getRversion() + else paste(R.version$major, R.version$minor, sep=".") +} + +## load .base.R and all other files into ESSR environment; then attach ESSR +.ess.ESSR.load <- function(dir) { + + if (nzchar(Sys.getenv("ESSR_TEST_LOAD_ERROR"))) + stop('Loading failed with a nice message.') + + Rver <- .ess.ESSR.get.rver() + ESSR <- .ess.ESSR.create.env(Rver) + .ess.ESSR.source.files(ESSR, dir, Rver) + .ess.ESSR.attach.env(ESSR, Rver) + + ## BUILDESSR needs this: + invisible(ESSR) +} + +.ess.ESSR.create.env <- function(Rver) { + + ESSR <- + if (Rver <= "1.3.0") ## really old library() revert order a bit + attach(NULL, name = "ESSR") + else if(length(nn <- names(formals(new.env))) && any(nn == "parent")) + new.env(parent = + if (Rver >= "1.9.0") getNamespace("utils") + else .BaseNamespaceEnv) + else + new.env() + + assign(".ess.Rversion", Rver, envir = ESSR) + + ## updated by make !! + VERSION <- "1.8" + assign(".ess.ESSRversion", VERSION, envir = ESSR) + + ESSR +} + +## attempt to source the files in the ESSR directory and place the resulting R +## objects into ESSR environment; the updated version of the environment is +## returned +.ess.ESSR.source.files <- function(ESSR, dir, Rver) { + + .source <- + if(any("keep.source" == names(formals(sys.source)))) + sys.source + else + function(..., keep.source) sys.source(...) + + ## .basic.R: + try(.source(paste(dir,'/.basic.R', sep = ""), envir = ESSR, keep.source = FALSE)) + + ## all others try(*) as it will fail in old R + if (Rver > "1.3.0") { # no sense if very old R + for (f in dir(dir, pattern='\\.R$', full.names=TRUE)) + try(.source(f, envir = ESSR, keep.source = FALSE)) + } + + ESSR +} + + +## attach the ESSR environment to the search path +.ess.ESSR.attach.env <- function(ESSR, Rver) { + if (Rver >= "2.4.0") + attach(ESSR) + else if (Rver > "1.3.0") { # borrow from older library() + e <- attach(NULL, name = "ESSR") + .Internal(lib.fixup(ESSR, e)) + } else { # if old R, use as in that old library(): + .Internal(lib.fixup(ESSR, .GlobalEnv)) + } +} + + +## copy any ESSR R objects in the global environment into a newly created ESSR +## environment; then remove the original objects and attach ESSR +.ess.collect.ESSR.objects <- function() { + + Rver <- .ess.ESSR.get.rver() + ESSR <- .ess.ESSR.create.env(Rver) + essr.nms <- grep('\\.(ess|ESS)', ls(.GlobalEnv, all.names = TRUE), value = TRUE) + for (nm in essr.nms) { + assign(nm, get(nm, pos = .GlobalEnv), envir = ESSR) + } + .ess.ESSR.attach.env(ESSR, Rver) + rm(list = essr.nms, pos = .GlobalEnv) +} diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/completion.R b/elpa/ess-20230419.1527/etc/ESSR/R/completion.R similarity index 86% rename from elpa/ess-20191014.1343/etc/ESSR/R/completion.R rename to elpa/ess-20230419.1527/etc/ESSR/R/completion.R index 2a2acc06..50017df0 100644 --- a/elpa/ess-20191014.1343/etc/ESSR/R/completion.R +++ b/elpa/ess-20230419.1527/etc/ESSR/R/completion.R @@ -9,7 +9,7 @@ if(!exists("local")) local <- function(expr, envir = environment()) { invisible(eval(expr, envir=envir)) } ##' Robust version of -##' utils:::.addFunctionInfo(c = c("recursive", "use.names")) +##' utils:::.addFunctionInfo(c = c("recursive", "use.names")) # needed only for R <= 3.y.z local({ U <- asNamespace("utils"); fn <- ".addFunctionInfo" EX <- exists(fn, envir=U) @@ -21,7 +21,7 @@ local({ .ess_eval <- function(str, env = globalenv()) { ## don't remove; really need eval(parse( here!! - tryCatch(base::eval(base::parse(text=str), envir = env), + tryCatch(eval(parse(text=str), envir = env), error=function(e) NULL) ## also works for special objects containing @:$ etc } @@ -30,6 +30,7 @@ local({ else x } +## not needed for completion; called from (ess-r-xref--srcref *) in ../../../lisp/ess-r-xref.el .ess_srcref <- function(name, pkg) { if (!is.null(pkg) && requireNamespace(pkg)) { env <- asNamespace(pkg) @@ -37,12 +38,19 @@ local({ env <- globalenv() } fn <- .ess_eval(name, env) + if (is.null(fn)) { + objs <- utils::getAnywhere(name)$objs + for (fn in objs) { + if(is.function(fn)) + break + } + } out <- "()\n" if (is.function(fn) && !is.null(utils::getSrcref(fn))) { file <- utils::getSrcFilename(fn, full.names = TRUE) if (file != "") { - line <- .ess_nonull(utils::getSrcLocation(fn, "line"), 1) - col <- .ess_nonull(utils::getSrcLocation(fn, "column"), 1) + line <- .ess_nonull(utils::getSrcLocation(fn, "line" ), 1) + col <- .ess_nonull(utils::getSrcLocation(fn, "column"), 1) out <- sprintf("(\"%s\" %d %d)\n", file, line, col - 1) } } @@ -51,16 +59,8 @@ local({ .ess_fn_pkg <- function(fn_name) { - fn <- .ess_eval(fn_name) - env_name <- base::environmentName(base::environment(fn)) - out <- if (base::is.primitive(fn)) { # environment() does not work on primitives. - "base" - } else if (base::is.function(fn) && env_name != "R_GlobalEnv") { - env_name - } else { - "" - } - base::cat(base::sprintf("%s\n", out)) + objs <- utils::getAnywhere(fn_name) + print(sub("(package|namespace):", "", objs$where)) } .ess_funargs <- function(funname) { @@ -111,7 +111,11 @@ local({ .ess_get_completions <- function(string, end, suffix = " = ") { oldopts <- utils::rc.options(funarg.suffix = suffix) on.exit(utils::rc.options(oldopts)) - if(.ess.Rversion > '2.14.1'){ + sett <- utils::rc.settings + oldDots <- sett()[["dots"]] + on.exit(sett(dots=oldDots), add=TRUE) + sett(dots = FALSE) + if(.ess.Rversion > '2.14.1') { comp <- compiler::enableJIT(0) op <- options(error=NULL) on.exit({ options(op); compiler::enableJIT(comp)}, add = TRUE) @@ -124,7 +128,7 @@ local({ utils:::.retrieveCompletions()) } -.ess_arg_help <- function(arg, func){ +.ess_arg_help <- function(arg, func) { op <- options(error=NULL) on.exit(options(op)) fguess <- @@ -150,9 +154,9 @@ local({ } } funcs <- c(fguess, tryCatch(methods(fguess), - warning=function(w) {NULL}, - error=function(e) {NULL})) - if(length(funcs) > 1 && length(pos <- grep('default', funcs))){ + warning= function(w) NULL, + error = function(e) NULL)) + if(length(funcs) > 1 && length(pos <- grep('default', funcs))) { funcs <- c(funcs[[pos[[1]]]], funcs[-pos[[1]]]) } i <- 1; found <- FALSE diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/debug.R b/elpa/ess-20230419.1527/etc/ESSR/R/debug.R similarity index 96% rename from elpa/ess-20191014.1343/etc/ESSR/R/debug.R rename to elpa/ess-20230419.1527/etc/ESSR/R/debug.R index a4fcf638..cb2580bc 100644 --- a/elpa/ess-20191014.1343/etc/ESSR/R/debug.R +++ b/elpa/ess-20230419.1527/etc/ESSR/R/debug.R @@ -82,7 +82,7 @@ paste0(pkgname, ':::`', dbged, '`') })) env <- parent.frame() - ## traced function don't appear here. Not realy needed and would affect performance. + ## traced function don't appear here. Not really needed and would affect performance. all <- .ess_all_functions(packages = packages, env = env) which_deb <- lapply(all, function(nm){ ## if isdebugged is called with string it doess find @@ -160,10 +160,13 @@ .essWEnames <- allNames(exps) len0p <- !nzchar(.essWEnames) .essWEnames[len0p] <- seq_along(len0p)[len0p] + oo <- options(width = 10000) + on.exit(options(oo)) for(i in seq_along(exps)) { cat('\n@---- ', .essWEnames[[i]], ' ', rep.int('-', max(0, 35 - nchar(.essWEnames[[i]]))), '-@\n', sep = '') - cat(paste('@---:', deparse(exps[[i]][[1]])), ' \n', sep = '') + expr <- gsub(" +", " ", paste(deparse(exps[[i]][[1]]), collapse = " ")) + cat(paste('@---:', expr), ' \n', sep = '') tryCatch(print(eval(exps[[i]], envir = .parent_frame)), error = function(e) cat('Error:', e$message, '\n' ), diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/misc.R b/elpa/ess-20230419.1527/etc/ESSR/R/misc.R similarity index 85% rename from elpa/ess-20191014.1343/etc/ESSR/R/misc.R rename to elpa/ess-20230419.1527/etc/ESSR/R/misc.R index e3bba966..000cf5b7 100644 --- a/elpa/ess-20191014.1343/etc/ESSR/R/misc.R +++ b/elpa/ess-20230419.1527/etc/ESSR/R/misc.R @@ -51,7 +51,7 @@ } else { if (is.matrix(x)) x <- data.frame(unclass(x)) - ## conversion needed, to avoid problems with derived classes suchs + ## conversion needed, to avoid problems with derived classes such ## as data.table h <- as.data.frame(head(x, hlength)) t <- as.data.frame(tail(x, tlength)) @@ -141,3 +141,34 @@ } else remote paste0(home, "/doc/html/index.html") } + + +.ess.rdired <- function() { + cat('\n') + + objs <- ls(envir = .GlobalEnv) + if (length(objs)==0) { + cat("No objects to view!\n") + return(invisible(NULL)) + } + + names(objs) <- objs + objs <- lapply(objs, get, envir = .GlobalEnv) + + mode <- sapply(objs, data.class) + length <- sapply(objs, length) + size <- sapply(objs, function(obj) format(object.size(obj))) + d <- data.frame(mode, length, size) + + var.names <- row.names(d) + + ## If any names contain spaces, we need to quote around them. + quotes <- rep('', length(var.names)) + spaces <- grep(' ', var.names) + if (any(spaces)) + quotes[spaces] <- '\"' + var.names <- paste(quotes, var.names, quotes, sep = '') + row.names(d) <- paste(' ', var.names, sep = '') + + print(d) +} diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/mpi.R b/elpa/ess-20230419.1527/etc/ESSR/R/mpi.R similarity index 94% rename from elpa/ess-20191014.1343/etc/ESSR/R/mpi.R rename to elpa/ess-20230419.1527/etc/ESSR/R/mpi.R index 53d7e470..0ad5cfcb 100644 --- a/elpa/ess-20191014.1343/etc/ESSR/R/mpi.R +++ b/elpa/ess-20230419.1527/etc/ESSR/R/mpi.R @@ -1,4 +1,4 @@ -## simple Message Parsing Inerface +## simple Message Parsing Interface .ess_mpi_send <- function(head, ...){ dots <- lapply(list(...), function(el) { diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/ns-eval.R b/elpa/ess-20230419.1527/etc/ESSR/R/ns-eval.R similarity index 98% rename from elpa/ess-20191014.1343/etc/ESSR/R/ns-eval.R rename to elpa/ess-20230419.1527/etc/ESSR/R/ns-eval.R index 83bbaec2..8dc4da88 100644 --- a/elpa/ess-20191014.1343/etc/ESSR/R/ns-eval.R +++ b/elpa/ess-20230419.1527/etc/ESSR/R/ns-eval.R @@ -29,12 +29,11 @@ fake.source = FALSE, fallback_env = NULL, local_env = NULL) { - oldopts <- options(warn = 2) - on.exit(options(oldopts)) pname <- paste("package:", package, sep = "") envpkg <- tryCatch(as.environment(pname), error = function(cond) NULL) - if (is.null(envpkg)) - if (require(package, quietly = TRUE, character.only = TRUE)) { + + if (is.null(envpkg)) { + if (suppressWarnings(require(package, quietly = TRUE, character.only = TRUE))) { envpkg <- tryCatch(as.environment(pname), error = function(cond) NULL) } else { ## no such package; source in current (local) user environment @@ -42,6 +41,7 @@ output = output, local = local_env, fake.source = fake.source)) } + } envns <- tryCatch(asNamespace(package), error = function(cond) NULL) if (is.null(envns)) @@ -223,7 +223,7 @@ ## table is used. When ess-developer is used to source method definitions the ## two copies of the functions are identical up to the environment. The ## environment of the cached object has namespace:foo as it's parent but the - ## environment of the object in local table is precisely namspace:foo. This + ## environment of the object in local table is precisely namespace:foo. This ## does not cause any difference in evaluation. methodNames <- allMethodTables methods <- sub(methods:::.TableMetaPrefix(), "", methodNames) @@ -392,7 +392,7 @@ .ess.ns_insert_essenv <- function(nsenv) { if (is.character(nsenv)) - nsenv <- base::asNamespace(nsenv) + nsenv <- asNamespace(nsenv) stopifnot(isNamespace(nsenv)) if (identical(nsenv, .BaseNamespaceEnv)) return(.GlobalEnv) diff --git a/elpa/ess-20191014.1343/etc/ESSR/R/pkg.R b/elpa/ess-20230419.1527/etc/ESSR/R/pkg.R similarity index 100% rename from elpa/ess-20191014.1343/etc/ESSR/R/pkg.R rename to elpa/ess-20230419.1527/etc/ESSR/R/pkg.R diff --git a/elpa/ess-20191014.1343/etc/Makefile b/elpa/ess-20230419.1527/etc/Makefile similarity index 100% rename from elpa/ess-20191014.1343/etc/Makefile rename to elpa/ess-20230419.1527/etc/Makefile diff --git a/elpa/ess-20191014.1343/etc/ess-julia.jl b/elpa/ess-20230419.1527/etc/ess-julia.jl similarity index 100% rename from elpa/ess-20191014.1343/etc/ess-julia.jl rename to elpa/ess-20230419.1527/etc/ess-julia.jl diff --git a/elpa/ess-20191014.1343/etc/ess-sas-sh-command b/elpa/ess-20230419.1527/etc/ess-sas-sh-command similarity index 100% rename from elpa/ess-20191014.1343/etc/ess-sas-sh-command rename to elpa/ess-20230419.1527/etc/ess-sas-sh-command diff --git a/elpa/ess-20191014.1343/obsolete/ess-eldoc.el b/elpa/ess-20230419.1527/obsolete/ess-eldoc.el similarity index 89% rename from elpa/ess-20191014.1343/obsolete/ess-eldoc.el rename to elpa/ess-20230419.1527/obsolete/ess-eldoc.el index d43d640a..59f0c466 100644 --- a/elpa/ess-20191014.1343/obsolete/ess-eldoc.el +++ b/elpa/ess-20230419.1527/obsolete/ess-eldoc.el @@ -1,30 +1,31 @@ -;;; ess-eldoc.el --- Use eldoc to report R function names. - -;; Copyright (C) 1997--2009 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; ess-eldoc.el --- Use eldoc to report R function names. -*- lexical-binding: t; -*- +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: Stephen Eglen ;; Created: 2007-06-30 ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; http://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: -;;;;; eldoc funcitonality has been moved into the core ;;;;; +;;;;; eldoc functionality has been moved into the core ;;;;; ;;;;; this file has no effect and is left in ESS in order not to break ;;;;; users configuration @@ -85,7 +86,7 @@ ;; Emacs 21, because it needs the variable ;; eldoc-documentation-function. -;;;; VS [25-02-2012]: all these issues were at least partially addresed in the +;;;; VS [25-02-2012]: all these issues were at least partially addressed in the ;;;; new implementation: ;; Bug (in eldoc?): the arg list for legend() is too long to fit in diff --git a/elpa/ess-20230419.1527/obsolete/ess-font-lock.el b/elpa/ess-20230419.1527/obsolete/ess-font-lock.el new file mode 100755 index 00000000..0487b550 --- /dev/null +++ b/elpa/ess-20230419.1527/obsolete/ess-font-lock.el @@ -0,0 +1,150 @@ +;;; ess-font-lock.el --- font-lock color options -*- lexical-binding: t; -*- + +;; Copyright (C) 2000-2022 Free Software Foundation, Inc. + +;; Author: Richard M. Heiberger +;; Created: 06 Feb 2000 + +;; Keywords: languages, faces + +;; This file is part of ESS + +;; This file 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. +;; +;; This file 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 for more details. +;; +;; A copy of the GNU General Public License is available at +;; https://www.r-project.org/Licenses/ + +;;; Commentary: + +;; provides syntax highlighting support. + +;;; Code: + + ; Requires and autoloads + +(require 'font-lock) +(require 'paren) + +;; FIXME: What is this doing here!? +(if (fboundp 'show-paren-mode) (show-paren-mode 1)) + +;;; Emacs 20.x notes: + +;; font-lock faces are defined in /emacs/emacs-20.5/lisp/font-lock.el +;; The font-lock faces are applied to ESS buffers by +;; ess-mode.el ess-inf.el ess-trns.el ess-custom.el +;; The keywords for faces are defined in the ess[dl]*.el files. +;; All faces can be looked at, under Emacs 20.x, with +;; [menu-bar] [Edit] [Text Properties] [Display Faces} + +(defun ess-font-lock-rmh () + "Set font-lock colors to Richard Heiberger's usual choice." + ;; FIXME: Turn it into a Custom theme! + (interactive) + + (set-foreground-color "Black") + (set-background-color "lightcyan") + + (set-face-background 'mode-line "lightskyblue") + (set-face-foreground 'mode-line "midnightblue") + + (set-face-foreground 'font-lock-comment-face "Firebrick") + (set-face-foreground 'font-lock-function-name-face "Blue") + (set-face-foreground 'font-lock-keyword-face "Purple") + (set-face-foreground 'font-lock-constant-face "Brown") + (set-face-foreground 'font-lock-string-face "VioletRed") + (set-face-foreground 'font-lock-type-face "Sienna") + (set-face-foreground 'font-lock-variable-name-face "Black")) + +(defun ess-font-lock-blue () + "Set font-lock colors to Richard Heiberger's blue color scheme." + ;; FIXME: Turn it into a Custom theme! + (interactive) + + (set-foreground-color "Black") + (set-background-color "LightBlue") + + (set-face-foreground 'mode-line "LightBlue") + (set-face-background 'mode-line "DarkSlateBlue") + + (set-face-foreground 'font-lock-comment-face "Firebrick") + (set-face-foreground 'font-lock-function-name-face "Blue") + (set-face-foreground 'font-lock-keyword-face "Purple") + (set-face-foreground 'font-lock-constant-face "Brown") + (set-face-foreground 'font-lock-string-face "VioletRed") + (set-face-foreground 'font-lock-type-face "Sienna") + (set-face-foreground 'font-lock-variable-name-face "Black")) + +(defun ess-font-lock-wheat () + "Set font-lock colors to Richard Heiberger's wheat color scheme." + ;; FIXME: Turn it into a Custom theme! + (interactive) + + (set-foreground-color "Black") + (set-background-color "Wheat") + + (set-face-foreground 'mode-line "Wheat") + (set-face-background 'mode-line "Sienna") + + (set-face-foreground 'font-lock-comment-face "Firebrick") + (set-face-foreground 'font-lock-function-name-face "Blue") + (set-face-foreground 'font-lock-keyword-face "Purple") + (set-face-foreground 'font-lock-constant-face "Brown") + (set-face-foreground 'font-lock-string-face "VioletRed") + (set-face-foreground 'font-lock-type-face "Sienna") + (set-face-foreground 'font-lock-variable-name-face "Black")) + + +(defun ess-font-lock-bw () + "Set font-lock colors to Richard Heiberger's black and white color scheme." + ;; FIXME: Turn it into a Custom theme! + (interactive) + + (set-foreground-color "Black") + (set-background-color "white") + + (set-face-foreground 'mode-line "gray10") + (set-face-background 'mode-line "gray90") + + ;; modify-face is an interactive compiled Lisp function in `faces'. + ;; Sample usage: + + ;;(modify-face FACE FOREGROUND BACKGROUND STIPPLE BOLD-P ITALIC-P UNDERLINE-P &optional INVERSE-P FRAME) + + (modify-face 'mode-line "gray10" "gray90" nil nil t nil ) + (modify-face 'font-lock-comment-face "black" "white" nil nil t nil ) + (modify-face 'font-lock-function-name-face "black" "white" nil t nil nil ) + (modify-face 'font-lock-keyword-face "black" "white" nil nil nil t ) + (modify-face 'font-lock-constant-face "black" "white" nil t nil nil ) + (modify-face 'font-lock-string-face "black" "white" nil nil t t ) + (modify-face 'font-lock-type-face "black" "white" nil t t nil ) + (modify-face 'font-lock-variable-name-face "black" "white" nil nil nil nil ) + (modify-face 'font-lock-builtin-face "black" "white" nil t nil nil ) + (modify-face 'font-lock-warning-face "black" "white" nil t nil nil ) + (modify-face 'show-paren-match-face "gray20" "gray80" nil t nil nil ) + (modify-face 'show-paren-mismatch-face "white" "gray40" nil t t nil )) + +(defun ess-font-lock-db () + "Set font-lock colors (leave fore-/back-ground alone) courtesy David Brahm " + ;; FIXME: Turn it into a Custom theme! + (interactive) + (set-face-foreground 'font-lock-comment-face "Firebrick") ; #... %... + (set-face-foreground 'font-lock-string-face "SeaGreen") ; "..." "..." + (set-face-foreground 'font-lock-keyword-face "MediumBlue") ; if \end + (set-face-foreground 'font-lock-function-name-face "VioletRed") ; talk<- {center} + (set-face-foreground 'font-lock-variable-name-face "Blue") ; xv + (set-face-foreground 'font-lock-type-face "Goldenrod") ; T,F ? + (set-face-foreground 'font-lock-constant-face "Magenta") ; <- {eq1} + ) + +(provide 'ess-font-lock) + +;;; ess-font-lock.el ends here diff --git a/elpa/ess-20191014.1343/obsolete/ess-mouse.el b/elpa/ess-20230419.1527/obsolete/ess-mouse.el similarity index 88% rename from elpa/ess-20191014.1343/obsolete/ess-mouse.el rename to elpa/ess-20230419.1527/obsolete/ess-mouse.el index 88e877f5..6e6976d8 100644 --- a/elpa/ess-20191014.1343/obsolete/ess-mouse.el +++ b/elpa/ess-20230419.1527/obsolete/ess-mouse.el @@ -1,32 +1,32 @@ -;;; ess-mouse.el --- Support for mouse- or cursor-sensitive actions - -;; Copyright (C) 2001 Richard M. Heiberger -;; Copyright (C) 2002--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; ess-mouse.el --- Support for mouse- or cursor-sensitive actions -*- lexical-binding: t; -*- +;; Copyright (C) 2001-2022 Free Software Foundation, Inc. ;; Author: Richard M. Heiberger ;; Created: 25 Mar 2001 ;; Maintainer: ESS-core -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: ;; Support for mouse- or cursor-sensitive actions. This is based on -;; and uses mouseme.el. mouseme.el only does mouse sensititivity. +;; and uses mouseme.el. mouseme.el only does mouse sensitivity. ;; The new functions ess-mouse-me and ess-mouse-me-helper do similar ;; things based on the cursor, not the mouse, and can be bound to a ;; keystroke. @@ -94,7 +94,7 @@ (setq cmd (funcall func name)) ;; run the command, eval'ing if it was a list (if (listp cmd) - (setq cmd (eval cmd))) + (setq cmd (eval cmd t))) (setq mmtype (get cmd 'mouse-me-type)) (cond ((eq mmtype 'region) (funcall cmd beg end)) @@ -160,7 +160,7 @@ the symbol `string' it will be called with one string argument." (defun ess-mouse-me-eval-expanded (string &optional head tail commands-buffer - page value-returned) + _page value-returned) "Send the expanded STRING to the inferior-ess process using `ess-command' after first concating the HEAD and TAIL. Put answer in COMMANDS-BUFFER if specified, otherwise in \"tmp-buffer\". In either @@ -169,7 +169,7 @@ constructed command. If PAGE is non-nil, expand the string one more time by embedding it in a \"page()\" command." (interactive) (let* (scommand - page-scommand + ;; page-scommand (lproc-name ess-local-process-name) (ess-mouse-customize-alist ess-local-customize-alist)) (if (not head) (setq head "summary(")) @@ -180,7 +180,7 @@ the string one more time by embedding it in a \"page()\" command." (ess-make-buffer-current) (pop-to-buffer-same-window commands-buffer) - (ess-setq-vars-local (eval ess-mouse-customize-alist) (current-buffer)) + (ess-setq-vars-local (eval ess-mouse-customize-alist t) (current-buffer)) (setq ess-local-process-name lproc-name) (ess-command (concat scommand "\n") commands-buffer) (if (not value-returned) (pop-to-buffer-same-window (nth 1 (buffer-list)))) @@ -213,9 +213,9 @@ the string one more time by embedding it in a \"page()\" command." ;; (defun ess-S-mouse-me-ess-transcript-mode () ;; (define-key ess-transcript-mode-map [S-mouse-3] 'ess-mouse-me)) ;; -(add-hook 'ess-mode-hook 'ess-S-mouse-me-menu-commands) -(add-hook 'inferior-ess-mode-hook 'ess-S-mouse-me-menu-commands) -(add-hook 'ess-transcript-mode-hook 'ess-S-mouse-me-menu-commands) +(add-hook 'ess-mode-hook #'ess-S-mouse-me-menu-commands) +(add-hook 'inferior-ess-mode-hook #'ess-S-mouse-me-menu-commands) +(add-hook 'ess-transcript-mode-hook #'ess-S-mouse-me-menu-commands) ;; (add-hook 'ess-transcript-mode-hook 'ess-S-mouse-me-ess-transcript-mode) diff --git a/elpa/ess-20191014.1343/obsolete/ess-r-a.el b/elpa/ess-20230419.1527/obsolete/ess-r-a.el similarity index 86% rename from elpa/ess-20191014.1343/obsolete/ess-r-a.el rename to elpa/ess-20230419.1527/obsolete/ess-r-a.el index ccd958f1..7872fbac 100644 --- a/elpa/ess-20191014.1343/obsolete/ess-r-a.el +++ b/elpa/ess-20230419.1527/obsolete/ess-r-a.el @@ -1,28 +1,27 @@ ;;; ess-r-a.el -- Possible local customizations for R with ESS. -*- lexical-binding: t; -*- -;; Copyright (C) 1997--2005 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. - +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: A.J. Rossini ;; Created: 17 November 1999 ;; Maintainer: ESS-core -;; Keywords: languages - -;; This file is part of ESS +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; -;; This file is distributed in the hope that it will be useful, +;; This program 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 for more details. ;; -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -43,7 +42,7 @@ (declare-function ns-do-applescript "nsfns.m" (script)) (declare-function do-applescript "ess-r-a" (script)) (unless (fboundp 'do-applescript) - (defalias 'do-applescript 'ns-do-applescript)) + (defalias 'do-applescript #'ns-do-applescript)) (defalias 'essr (read-kbd-macro @@ -143,8 +142,8 @@ is)." ;; call this once ;; (ajr::scroll-to-end::peterD "emacs") - (global-set-key [f11] 'show-max-other-window) - (global-set-key [f12] 'ess-eval-line-visibly-and-step)) + (global-set-key [f11] #'show-max-other-window) + (global-set-key [f12] #'ess-eval-line-visibly-and-step)) ; Provide package diff --git a/elpa/ess-20191014.1343/obsolete/mouseme.el b/elpa/ess-20230419.1527/obsolete/mouseme.el similarity index 94% rename from elpa/ess-20191014.1343/obsolete/mouseme.el rename to elpa/ess-20230419.1527/obsolete/mouseme.el index be9cbf7c..82e7c61d 100644 --- a/elpa/ess-20191014.1343/obsolete/mouseme.el +++ b/elpa/ess-20230419.1527/obsolete/mouseme.el @@ -1,24 +1,27 @@ -;;; mouseme.el --- mouse menu with commands that operate on strings +;;; mouseme.el --- mouse menu with commands that operate on strings -*- lexical-binding: t; -*- -;; Copyright (C) 1997 by Free Software Foundation, Inc. +;; Copyright (C) 1997-2022 by Free Software Foundation, Inc. ;; Author: Howard Melman ;; Keywords: mouse, menu ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; GNU Emacs is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; https://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: @@ -75,8 +78,7 @@ It can return either the string or to be most efficient, a list of three elements: the string and the beginning and ending points of the string in the buffer." :type 'function - :options '(mouse-me-get-string) - :group 'mouseme) + :options '(mouse-me-get-string)) (defcustom mouse-me-build-menu-function 'mouse-me-build-menu "Function used by `mouse-me' to build the popup menu. @@ -85,8 +87,7 @@ be made buffer local and set to something more appropriate for a specific mode. The function will be called with one argument, the string selected, as returned by `mouse-me-get-string-function'." :type 'function - :options '(mouse-me-build-menu) - :group 'mouseme) + :options '(mouse-me-build-menu)) (defvar mouse-me-grep-use-extension 't "If non-nil `mouse-me-grep' grep's in files with current file's extension.") @@ -130,8 +131,7 @@ argument. Or if the function has the symbol property `mouse-me-type' and if its value is the symbol `region' it will be called with the beginning and ending points of the selected string. If the value is the symbol `string' it will be called with one string argument." - :type '(repeat sexp) - :group 'mouseme) + :type '(repeat sexp)) (put 'kill-region 'mouse-me-type 'region) (put 'ispell-region 'mouse-me-type 'region) @@ -176,7 +176,7 @@ Returns a list of three elements, the string and the beginning and ending positions of the string in the buffer in that order." (save-match-data (save-excursion - (let ((start (point)) beg end str p) + (let ((start (point)) beg end str) (skip-syntax-forward "^ >()\"") (setq end (point)) (goto-char start) @@ -282,8 +282,7 @@ ending positions of the string in the buffer in that order." (interactive "sGrep: ") (grep-compute-defaults) (let ((reg grep-find-command) - (ext (mouse-me-buffer-file-extension)) - beg end) + (ext (mouse-me-buffer-file-extension))) (if (string-match "\\(^.+-type f \\)\\(.+$\\)" reg) (setq reg (concat (match-string 1 reg) (if mouse-me-grep-use-extension @@ -295,7 +294,7 @@ ending positions of the string in the buffer in that order." (defun mouse-me-buffer-file-extension () "Return the extension of the current buffer's filename or nil. -Returned extension is a string begining with a period." +Returned extension is a string beginning with a period." (let* ((bfn (buffer-file-name)) (filename (and bfn (file-name-sans-versions bfn))) (index (and filename (string-match "\\.[^.]*$" filename)))) @@ -341,7 +340,7 @@ Returned extension is a string begining with a period." (setq cmd (funcall func)) ;; run the command, eval'ing if it was a list (if (listp cmd) - (setq cmd (eval cmd))) + (setq cmd (eval cmd t))) (setq mmtype (get cmd 'mouse-me-type)) (cond ((eq mmtype 'region) (funcall cmd beg end)) diff --git a/elpa/ess-20191014.1343/obsolete/msdos.el b/elpa/ess-20230419.1527/obsolete/msdos.el similarity index 83% rename from elpa/ess-20191014.1343/obsolete/msdos.el rename to elpa/ess-20230419.1527/obsolete/msdos.el index c76fdbe5..f3e1d9a8 100644 --- a/elpa/ess-20191014.1343/obsolete/msdos.el +++ b/elpa/ess-20230419.1527/obsolete/msdos.el @@ -1,50 +1,44 @@ -;;; msdos.el --- Run an MS-DOS shell in an NTemacs buffer with bash as the shell - -;; Copyright (C) 1999 Richard M. Heiberger -;; Copyright (C) 2000--2004 A.J. Rossini, Richard M. Heiberger, Martin -;; Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen. +;;; msdos.el --- Run an MS-DOS shell in an NTemacs buffer with bash as the shell -*- lexical-binding: t; -*- +;; Copyright (C) 1999-2022 Free Software Foundation, Inc. ;; Author: Richard M. Heiberger ;; Created: February 1999 ;; Maintainer: ESS-core -;; Keywords: processes - -;; This file is part of ESS. +;; This file is part of GNU Emacs. -;; This file is free software; you can redistribute it and/or modify +;;; License: +;; +;; This program 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. - -;; This file is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program 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 for more details. - -;; A copy of the GNU General Public License is available at -;; http://www.r-project.org/Licenses/ +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; ;;; Commentary: ;; The file msdos.el in the next mail message opens an *msdos* buffer ;; in shell-mode and msdos-minor-mode. When cmdproxy.exe/command.com -;; is the emacs shell, then this gets various setting right that M-x +;; is the Emacs shell, then this gets various setting right that M-x ;; shell currently misses. The function M-x msdos-minor-mode could be -;; automatically run by emacs in shell-mode in that case. +;; automatically run by Emacs in shell-mode in that case. -;; When bash is the emacs shell, msdos.el still opens a +;; When bash is the Emacs shell, msdos.el still opens a ;; cmdproxy.exe/command.com shell in the buffer *msdos*. There are ;; occasions when it is necessary to run DOS character-based programs -;; in an emacs window. +;; in an Emacs window. ;; I followed the suggestion by AndrewI to look at M-x shell and modify ;; it. It turns out not to have been trivial. -;; I've listed it as part of ESS (emacs speaks statistics) for now. I -;; will be happy to sign it over to FSF and have it become part of the -;; standard distribution for windows machines. - ;;; Code: (require 'shell); and hence 'comint @@ -110,7 +104,7 @@ its value is used as a list of arguments when invoking the shell. (save-excursion (setenv "COMSPEC" explicit-msdos-comspec-file-name) (setenv "SHELL" explicit-msdos-shell-file-name) - (set-buffer (apply 'make-comint "msdos" prog + (set-buffer (apply #'make-comint "msdos" prog (if (and xargs-name (boundp xargs-name)) (symbol-value xargs-name)) (if (file-exists-p startfile) @@ -148,7 +142,7 @@ d. strips ctrl-m from output. (setq msdos-minor-mode t) (set (make-local-variable 'comint-completion-addsuffix) '("\\" . " ")) (setq comint-process-echoes t) - (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) + (add-hook 'comint-output-filter-functions #'shell-strip-ctrl-m nil t) (set-process-coding-system (get-buffer-process (current-buffer)) 'raw-text-dos 'raw-text-dos) ;; buffer-process-coding-system is critical. ) -- 2.47.3