[ESS-bugs] ess-mode 14.11 [elpa: 20141226.1023]; R: Generate/Update Roxygen template adding superfluous parameter

Jason W. Morgan jason.w.morgan at gmail.com
Tue Feb 24 17:37:52 CET 2015


--text follows this line--

When generating or updating an Roxygen template with a function that has
a default argument with nested lists, the template generator is creating
a superfluous parameter and tacking on a parenthesis. Please see
reproduceable example below.

##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##' @title
##' @param x
##' @param lst
##' @param list)
##' @return
##' @author Jason Morgan
fn <- function(x, lst=list(list(x), list(x))) { }


-------------------------------------------------------
This bug report will be sent to the ESS bugs email list
Press C-c C-c when you are ready to send your message.
-------------------------------------------------------

) (fill-nobreak-predicate quote ess-inside-string-p) (normal-auto-fill-function quote ess-do-auto-fill)) 
(ess-mode-1.6): editing-alist=((paragraph-start concat \s-*$\| page-delimiter) (paragraph-separate concat \s-*$\| page-delimiter) (paragraph-ignore-fill-prefix . t) (require-final-newline . mode-require-final-newline) (indent-line-function quote ess-indent-line) (parse-sexp-ignore-comments . t) (ess-style . ess-default-style) (ess-mode-syntax-table . S-syntax-table) (add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (ess-font-lock-keywords quote ess-R-font-lock-keywords) (ess-font-lock-defaults ess--extract-default-fl-keywords ess-R-font-lock-keywords) (font-lock-defaults quote (ess-font-lock-defaults nil nil ((46 . w) (95 . w))))) 
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, comint..echoes=t, comint..sender=comint-simple-send

Finished setting up ESS-mode.
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, comint..echoes=t, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=dynnet.R 
(ess-mode-1.5): alist=((ess-local-customize-alist quote R-customize-alist) (ess-eldoc-function quote ess-R-eldoc-function) (ess-dialect . R) (ess-suffix . R) (ess-ac-sources quote (ac-source-R)) (ess-build-tags-command . rtags('%s', recursive = TRUE, pattern = '\\.[RrSs](rw)?$',ofile = '%s')) (ess-traceback-command . local({cat(geterrmessage(), "---------------------------------- 
", fill=TRUE);try(traceback(), silent=TRUE)})
) (ess-call-stack-command . traceback(1)
) (ess-eval-command . .ess.eval("%s", FALSE, FALSE, file="%f")
) (ess-eval-visibly-command . .ess.eval("%s", TRUE, TRUE, 300, file="%f")
) (ess-eval-visibly-noecho-command . .ess.eval("%s", FALSE, TRUE, 300, file="%f")
) (ess-load-command . .ess.source("%s", FALSE, FALSE)
) (ess-load-visibly-command . .ess.source("%s", TRUE, TRUE, 300)
) (ess-load-visibly-noecho-command . .ess.source("%s", FALSE, TRUE, 300)
) (ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix ess-dump-filename-template-proto) (ess-help-web-search-command quote ess-R-sos) (ess-mode-syntax-table . R-syntax-table) (ess-mode-editing-alist . R-editing-alist) (ess-change-sp-regexp . ess-R-change-sp-regexp) (ess-help-sec-regex . ess-help-R-sec-regex) (ess-help-sec-keys-alist . ess-help-R-sec-keys-alist) (ess-loop-timeout . ess-S-loop-timeout) (ess-cmd-delay . ess-R-cmd-delay) (ess-function-pattern . ess-R-function-pattern) (ess-object-name-db-file . ess-r-namedb.el) (ess-smart-operators . ess-R-smart-operators) (inferior-ess-program . inferior-R-program-name) (inferior-ess-objects-command . inferior-R-objects-command) (inferior-ess-font-lock-keywords quote inferior-R-font-lock-keywords) (inferior-ess-search-list-command . search()
) (inferior-ess-help-command . inferior-ess-r-help-command) (inferior-ess-help-filetype) (inferior-ess-exit-command . q()) (inferior-ess-exit-prompt . Save workspace image? [y/n/c]: ) (inferior-ess-start-file) (inferior-ess-start-args . ) (ess-error-regexp-alist . ess-R-error-regexp-alist) (ess-describe-object-at-point-commands quote ess-R-describe-object-at-point-commands) (ess-STERM . iESS) (ess-editor . R-editor) (ess-pager . R-pager) (prettify-symbols-alist quote ((<- . 8592) (<<- . 8606) (-> . 8594) (->> . 8608))) (ess-language . S) (inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start) (comint-use-prompt-regexp . t) (comint-process-echoes . t) (inferior-ess-primary-prompt . > ) (inferior-ess-secondary-prompt . + ) (comment-start . #) (ess-imenu-generic-expression . ess-imenu-S-generic-expression) (comment-add . 1) (comment-start-skip . #+ *) (comment-use-syntax . t) (comment-column . 40) (ess-no-skip-regexp concat ^ *@\| (default-value (quote ess-no-skip-regexp))) (inferior-ess-prompt . inferior-S-prompt) (ess-get-help-topics-function quote ess-get-S-help-topics-function) (ess-getwd-command . getwd()
) (ess-setwd-command . setwd('%s')
) (ess-funargs-command . .ess_funargs("%s")
) (fill-nobreak-predicate quote ess-inside-string-p) (normal-auto-fill-function quote ess-do-auto-fill)) 
(ess-mode-1.6): editing-alist=((paragraph-start concat \s-*$\| page-delimiter) (paragraph-separate concat \s-*$\| page-delimiter) (paragraph-ignore-fill-prefix . t) (require-final-newline . mode-require-final-newline) (indent-line-function quote ess-indent-line) (parse-sexp-ignore-comments . t) (ess-style . ess-default-style) (ess-mode-syntax-table . S-syntax-table) (add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (ess-font-lock-keywords quote ess-R-font-lock-keywords) (ess-font-lock-defaults ess--extract-default-fl-keywords ess-R-font-lock-keywords) (font-lock-defaults quote (ess-font-lock-defaults nil nil ((46 . w) (95 . w))))) 
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, comint..echoes=t, comint..sender=comint-simple-send

Finished setting up ESS-mode.
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1, (p)-Ini-pt = 28
ELSE  not in setMethod() header ...
	Match,Pt:(1,28),1
ess-END-of-fun: S4=nil, beginning = 1
ess-END-of-fun: found #1 : 227
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1, (p)-Ini-pt = 28
ELSE  not in setMethod() header ...
	Match,Pt:(1,28),1
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1, (p)-Ini-pt = 28
ELSE  not in setMethod() header ...
	Match,Pt:(1,28),1
ess-END-of-fun: S4=nil, beginning = 1
ess-END-of-fun: found #1 : 227
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1, (p)-Ini-pt = 28
ELSE  not in setMethod() header ...
	Match,Pt:(1,28),1
ess-END-of-fun: S4=nil, beginning = 1
ess-END-of-fun: found #1 : 227
ess-BEG-of-fun after 'search-FWD (': Ini-pt 654, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(654,685),654
ess-END-of-fun: S4=nil, beginning = 654
ess-END-of-fun: found #1 : 1250
ess-BEG-of-fun after 'search-FWD (': Ini-pt 654, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(654,685),654
ess-BEG-of-fun after 'search-FWD (': Ini-pt 654, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(654,685),654
ess-END-of-fun: S4=nil, beginning = 654
ess-END-of-fun: found #1 : 1250
ess-BEG-of-fun after 'search-FWD (': Ini-pt 654, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(654,685),654
ess-END-of-fun: S4=nil, beginning = 654
ess-END-of-fun: found #1 : 1250
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1029, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(1029,1060),1029
ess-END-of-fun: S4=nil, beginning = 1029
ess-END-of-fun: found #1 : 1683
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1029, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(1029,1060),1029
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1029, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(1029,1060),1029
ess-END-of-fun: S4=nil, beginning = 1029
ess-END-of-fun: found #1 : 1683
ess-BEG-of-fun after 'search-FWD (': Ini-pt 1029, (p)-Ini-pt = 32
ELSE  not in setMethod() header ...
	Match,Pt:(1029,1060),1029
ess-END-of-fun: S4=nil, beginning = 1029
ess-END-of-fun: found #1 : 1683
ess-BEG-of-fun after 'search-FWD (': Ini-pt 651, (p)-Ini-pt = 16
ELSE  not in setMethod() header ...
	Match,Pt:(651,666),651
ess-END-of-fun: S4=nil, beginning = 651
ess-END-of-fun: found #1 : 701
ess-BEG-of-fun after 'search-FWD (': Ini-pt 651, (p)-Ini-pt = 16
ELSE  not in setMethod() header ...
	Match,Pt:(651,666),651
ess-BEG-of-fun after 'search-FWD (': Ini-pt 651, (p)-Ini-pt = 16
ELSE  not in setMethod() header ...
	Match,Pt:(651,666),651
ess-END-of-fun: S4=nil, beginning = 651
ess-END-of-fun: found #1 : 701
ess-BEG-of-fun after 'search-FWD (': Ini-pt 651, (p)-Ini-pt = 16
ELSE  not in setMethod() header ...
	Match,Pt:(651,666),651
ess-END-of-fun: S4=nil, beginning = 651
ess-END-of-fun: found #1 : 701


Emacs  : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-07 on lamiak, modified by Debian
Package: ess-mode 14.11 [elpa: 20141226.1023]

current state:
==============
(setq
 ess-language "S"
 ess-dialect "R"
 ess-ask-for-ess-directory t
 ess-ask-about-transfile nil
 ess-directory nil
 ess-keep-dump-files "always"
 ess-source-directory "/tmp"
 ess-use-ido t
 ess-use-eldoc t
 ess-use-tracebug t
 ess-use-auto-complete t
 ess-eval-visibly-p t
 ess-can-eval-in-background nil
 ess-local-process-name nil
 )


-- 
~ Jason Morgan


"Those who have had no share in the good fortunes of the mighty
 Often have a share in their misfortunes."
                -- Bertolt Brecht, "Der Kaukasische Kreidekreis"
                                    (The Caucasian Chalk Circle)



More information about the ESS-bugs mailing list