Skip to content

Commit

Permalink
Have attempted to make r-autoyas compatible with yasnippet 0.8. This
Browse files Browse the repository at this point in the history
will possibly address github issue #4
  • Loading branch information
mattfidler committed Sep 12, 2012
1 parent 3f12b4f commit a6ec96f
Show file tree
Hide file tree
Showing 5 changed files with 479 additions and 135 deletions.
128 changes: 96 additions & 32 deletions README.org
@@ -1,12 +1,30 @@
#+TITLE: R-autoyas
#+AUTHOR: Sven Hartenstein & Matthew L. Fidler
* Library Information
/r-autoyas.el/ --- Provides automatically created yasnippets for R function argument lists.

- Filename :: [[file:r-autoyas.el][r-autoyas.el]]
- Description :: r-autoyas is a small ESS complement. It provides automatically created yasnippets for R function argument lists.
- Author :: Sven Hartenstein & Matthew Fidler
- Maintainer :: Matthew Fidler
- Created :: Fri Mar 25 10:36:08 2011 (-0500)

- Version :: 0.27
- Last-Updated :: Mon Jun 25 15:12:20 2012 (-0500)
- By :: Matthew L. Fidler
- Update # :: 873

- URL :: https://github.com/mlf176f2/r-autoyas.el
- Keywords :: R yasnippet
Compatibility:


* About
r-autoyas is a small ESS complement. It provides automatically created
yasnippets for R function argument lists.
r-autoyas is a small ESS complement. It provides automatically created
yasnippets for R function argument lists.

* Requirements
The following are needed:
The following are needed:
- yasnippet https://github.com/capitaomorte/yasnippet
- R & ESS
- R process must be running.
Expand All @@ -16,53 +34,99 @@ The following are needed:
field, the parameter will be deleted from this list
- To exit the snipped and delete remaining arguments, press =C-g=
* Options
This is an incomplete list of user definable options. The complete
list can be retrieved by
=M-x customize-group r-autoyas=
This is an incomplete list of user definable options. The complete
list can be retrieved by
=M-x customize-group r-autoyas=
** Debugging
Debugging messages can be put on-screen. This is done by
#+BEGIN_SRC emacs-lisp
Debugging messages can be put on-screen. This is done by
#+BEGIN_SRC emacs-lisp
(setq r-autoyas-debug t)
#+END_SRC
#+END_SRC
** Sending a ... replacement to R via emacs instead of by a global options statement
Uses Lisp-based dot-replacement defined by
`r-autoyas-r-based-dot-replacement' instead of specifying through
options in R startup. This is on by default but can be turned off by
#+BEGIN_SRC emacs-lisp
Uses Lisp-based dot-replacement defined by
`r-autoyas-r-based-dot-replacement' instead of specifying through
options in R startup. This is on by default but can be turned off by
#+BEGIN_SRC emacs-lisp
(setq r-autoyas-use-r-based-dot-replacement nil)
#+END_SRC
#+END_SRC
** Specifying the `...' replacement via the R options() statement
Emacs can change the functions `...' replacement through lisp. The
easiest way to change this is, typing:
Emacs can change the functions `...' replacement through lisp. The
easiest way to change this is, typing:

=M-x customize-variable r-autoyas-r-based-dot-replacement=
=M-x customize-variable r-autoyas-r-based-dot-replacement=
** Using functions within a namespace only
By default, R-autoyas only expands predefined functions in
namespaces/package that are loaded in R. This ignores any
user-defined functions. However, R-autoyas may be used to expand
user-defined functions as well. This is done with the
=r-autoyas-expand-package-functions-only= variable. To turn on
r-autoyas's expansion of user-defined functions, the following code
may be used:
#+BEGIN_SRC emacs-lisp
By default, R-autoyas only expands predefined functions in
namespaces/package that are loaded in R. This ignores any
user-defined functions. However, R-autoyas may be used to expand
user-defined functions as well. This is done with the
=r-autoyas-expand-package-functions-only= variable. To turn on
r-autoyas's expansion of user-defined functions, the following code
may be used:
#+BEGIN_SRC emacs-lisp
(setq r-autoyas-expand-package-functions-only nil)
#+END_SRC
#+END_SRC

This variable may also be customized.
This variable may also be customized.

* Limitations
- No nice error handling when no R process is found
- Partial nested support -- not perfected
* Loading r-autoyas in ~/.emacs
You may use marmalade-repo and ELPA to install r-autoyas
(http://marmalade-repo.org/), or put it into your load-path and put
the following in ~/.emacs
You may use marmalade-repo and ELPA to install r-autoyas
(http://marmalade-repo.org/), or put it into your load-path and put
the following in ~/.emacs

#+BEGIN_SRC emacs-lisp :results silent
#+BEGIN_SRC emacs-lisp :results silent
(require 'r-autoyas)
(add hook 'ess-mode-hook 'r-autoyas-ess-activate)
#+END_SRC
#+END_SRC


# LocalWords: yasnippets autoyas ESS Hartenstein
* Wish-List/To-Do
* Functions
** Interactive Functions

** Internal Functions
* Variables
** Customizable Variables

** Internal Variables
* History

- 12-Sep-2012 :: Have attempted to make r-autoyas compatible with yasnippet 0.8. This will possibly address github issue #4 ()
- 04-Jun-2012 :: Bug fix for autopair-mode (Matthew L. Fidler)
- 04-Jun-2012 :: Changed syntax table for yas/expand so that write.csv will expand if you have a snippet named csv. (Matthew L. Fidler)
- 04-Jun-2012 :: Bug fix for autopair. (Matthew L. Fidler)
- 07-May-2012 :: Changed the syntax table for =r-autoyas-expand= so that when a snippet =csv= is defined and you expand at write.csv, write.csv will be expanded instead of =csv= (Matthew L. Fidler)
- 02-Feb-2012 :: This package no longer auto-loads. (Matthew L. Fidler)
- 29-Nov-2011 :: Change the *r-autoyas* buffer to be hidden (ie " *r-autoyas*") (Matthew L. Fidler)
- 18-Nov-2011 :: Added gihub URL (Matthew L. Fidler)
- 17-Nov-2011 :: Fixed =called-interactively-p= to have a single argument. (Matthew L. Fidler)
- 17-Nov-2011 :: Added which to the default ignored parenthetical statements (Matthew L. Fidler)
- 17-Nov-2011 :: Fixed =r-autoyas-defined-p= (Matthew L. Fidler)
- 17-Nov-2011 :: Added Forward compatablilty for (interactive-p) (Matthew L. Fidler)
- 17-Nov-2011 :: Changed the order of r-autoyas alais of old (Matthew L. Fidler)
- 16-Nov-2011 :: Changed ignored expressions to only be ignore when using a parenthesis, and added more ignored expressions (Matthew L. Fidler)
- 16-Nov-2011 :: Updated to have better wrapping after exiting a snippet. (Matthew L. Fidler)
- 08-Jun-2011 :: A partial fix for noweb (Rnw) (Matthew L. Fidler)
- 06-Jun-2011 :: Small update to fix lisp-based replacements. (Matthew L. Fidler)
- 06-Jun-2011 :: Added a bug-fix for complex language statements like reshape. (Matthew L. Fidler)
- 16-May-2011 :: Bug Fixes for cached snippets. (Matthew L. Fidler)
- 16-May-2011 :: Added wrapping capaibilites to code. Currently only works on Ctl-G. (Matthew L. Fidler)
- 16-May-2011 :: Added option to remove explicit parameter names for functions if not needed. (Matthew L. Fidler)
- 16-May-2011 :: Allow autopair backspace to delete autostarted template. (Matthew L. Fidler)
- 16-May-2011 :: Changed language constructs to make sure its not a default text. (Matthew L. Fidler)
- 16-May-2011 :: Changed quoting method to fix read.table() (Matthew L. Fidler)
- 16-May-2011 :: Removed if (grepl(', ', str, fixed=TRUE)) str <- sub(', ', '', str); from R code to fix write.table() (Matthew L. Fidler)
- 26-Apr-2011 :: Now when using Control-G to exit snippets, it will not delete anything inside the snippet. For example, using ls(name=".txt|",...) where the cursor is at |, pressing Cntrl-G (Matthew L. Fidler)
- 26-Apr-2011 :: Added a space to try to fix the strange duplication issues. (Matthew L. Fidler)
- 25-Apr-2011 :: Bug fix for nested auto-expansion using (. (Matthew L. Fidler)
- 21-Apr-2011 :: Tried to fix the autobrackets in r-auotyas. (Matthew L. Fidler)
- 15-Apr-2011 :: Bugfix for ess-eval-linewise option (Matthew L. Fidler)
- 15-Apr-2011 :: Fixed autopair bug. (Matthew L. Fidler)
- 15-Apr-2011 :: Changed =r-autoyas-inject-commnads= to use =ess-eval-linewise= in mering with Svens' version. (Its an option) (Matthew L. Fidler)
- 11-Apr-2011 :: (Matthew L. Fidler)
- 10-Apr-2011 :: 09-Apr-2011 Added autoload. ()
- 09-Apr-2011 :: 30-Mar-2011 Matthew L. Fidler Attempted to allow nested expansion, as well as changing the mechanism of Yasnippet expansion. ()
- 25-Mar-2011 :: (Matthew L. Fidler)
5 changes: 5 additions & 0 deletions el-get/r-autoyas
@@ -0,0 +1,5 @@
(:name r-autoyas
:description "r-autoyas"
:website "https://github.com/mlf176f2/r-autoyas.el"
:type git
:url "https://github.com/mlf176f2/r-autoyas.el.git")
4 changes: 4 additions & 0 deletions melpa/r-autoyas
@@ -0,0 +1,4 @@
(r-autoyas
:repo "mlf176f2/r-autoyas.el"
:fetcher github
:files ("r-autoyas.el"))

0 comments on commit a6ec96f

Please sign in to comment.