[ESS-bugs] ess-mode 5.3.5; NWFL eliminates buffer-local variables

Michael Hoffman b3i4old02 at sneakemail.com
Sun Dec 2 18:55:23 CET 2007


This is a problem with NWFL mode eliminating buffer-local variables when 
you pass through a code chunk. Here's a test case for AUCTeX 11.84. 
Create a file called test.Rnw:

============
text

<<chunk>>=
x = runif(100)
@

more text

%%% Local Variables:
%%% TeX-PDF-mode: t
%%% End:
============

Close and reopen to load the local variables. If you immediately type 
C-h v TeX-PDF-mode, Emacs will display:

} TeX-PDF-mode is a variable defined in `tex.el'.
} Its value is t
} Local in buffer test.Rnw; global value is nil

Press the down arrow several times until you are at "more text,"
having traveled through the code chunk. Do it again and you now get:

} TeX-PDF-mode is a variable defined in `tex.el'.
} Its value is nil

My real problem is that it is not respecting a TeX-master directive in
the same way, but this was a simpler test case.

[ess-site.el]: ess-customize-alist=nil
[ess-site.el _2_]: ess-customize-alist=nil
(R): ess-rterm-versions-create making M-x defuns for 
c:/progra~1/R/R-2.4.0/bin/Rterm.exe(n-i-m-l: 1)(n-i-m-l: 
1)(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=sunflower.Rnw
(ess-mode-1.5): alist=((ess-local-customize-alist quote 
R-customize-alist) (ess-dialect . R) (ess-suffix . R) 
(ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix 
ess-dump-filename-template-proto) (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-imenu-mode-function quote ess-imenu-R) (inferior-ess-program . 
inferior-R-program-name) (inferior-ess-objects-command . 
inferior-R-objects-command) (inferior-ess-font-lock-keywords . 
inferior-ess-R-font-lock-keywords) (inferior-ess-search-list-command . 
search()
) (inferior-ess-help-command . help("%s", htmlhelp=FALSE)
) (inferior-ess-help-filetype) (inferior-ess-exit-command . q()) 
(inferior-ess-exit-prompt . Save workspace image? [y/n/c]: ) 
(inferior-ess-primary-prompt . \([A-Z][][A-Za-z0-9.]*\)*> ) 
(inferior-ess-secondary-prompt . + ?) (inferior-ess-start-file) 
(inferior-ess-start-args . ) (ess-STERM . iESS) (ess-editor . R-editor) 
(ess-pager . R-pager) (ess-language . S) (inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start) 
(comint-use-prompt-regexp-instead-of-fields . t))
(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 . t) 
(comment-start . #) (comment-add . 1) (comment-start-skip . #+ *) 
(comment-column . 40) (indent-line-function quote S-indent-line) 
(parse-sexp-ignore-comments . t) (ess-set-style . ess-default-style) 
(ess-local-process-name) (ess-mode-syntax-table . S-syntax-table) 
(add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (font-lock-defaults quote (ess-R-mode-font-lock-keywords nil 
nil ((46 . w) (95 . w)))))
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send

Finished setting up ESS-mode.
(n-i-m-l: 1)(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=sunflower.Rnw
(ess-mode-1.5): alist=((ess-local-customize-alist quote 
R-customize-alist) (ess-dialect . R) (ess-suffix . R) 
(ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix 
ess-dump-filename-template-proto) (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-imenu-mode-function quote ess-imenu-R) (inferior-ess-program . 
inferior-R-program-name) (inferior-ess-objects-command . 
inferior-R-objects-command) (inferior-ess-font-lock-keywords . 
inferior-ess-R-font-lock-keywords) (inferior-ess-search-list-command . 
search()
) (inferior-ess-help-command . help("%s", htmlhelp=FALSE)
) (inferior-ess-help-filetype) (inferior-ess-exit-command . q()) 
(inferior-ess-exit-prompt . Save workspace image? [y/n/c]: ) 
(inferior-ess-primary-prompt . \([A-Z][][A-Za-z0-9.]*\)*> ) 
(inferior-ess-secondary-prompt . + ?) (inferior-ess-start-file) 
(inferior-ess-start-args . ) (ess-STERM . iESS) (ess-editor . R-editor) 
(ess-pager . R-pager) (ess-language . S) (inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start) 
(comint-use-prompt-regexp-instead-of-fields . t))
(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 . t) 
(comment-start . #) (comment-add . 1) (comment-start-skip . #+ *) 
(comment-column . 40) (indent-line-function quote S-indent-line) 
(parse-sexp-ignore-comments . t) (ess-set-style . ess-default-style) 
(ess-local-process-name) (ess-mode-syntax-table . S-syntax-table) 
(add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (font-lock-defaults quote (ess-R-mode-font-lock-keywords nil 
nil ((46 . w) (95 . w)))))
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send

Finished setting up ESS-mode.
(n-i-m-l: 1)(n-i-m-l: 1)(ess-setq-vars-LOCAL): language=S, dialect=R, 
buf=nil, comint..echoes=nil, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=test.Rnw
(ess-mode-1.5): alist=((ess-local-customize-alist quote 
R-customize-alist) (ess-dialect . R) (ess-suffix . R) 
(ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix 
ess-dump-filename-template-proto) (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-imenu-mode-function quote ess-imenu-R) (inferior-ess-program . 
inferior-R-program-name) (inferior-ess-objects-command . 
inferior-R-objects-command) (inferior-ess-font-lock-keywords . 
inferior-ess-R-font-lock-keywords) (inferior-ess-search-list-command . 
search()
) (inferior-ess-help-command . help("%s", htmlhelp=FALSE)
) (inferior-ess-help-filetype) (inferior-ess-exit-command . q()) 
(inferior-ess-exit-prompt . Save workspace image? [y/n/c]: ) 
(inferior-ess-primary-prompt . \([A-Z][][A-Za-z0-9.]*\)*> ) 
(inferior-ess-secondary-prompt . + ?) (inferior-ess-start-file) 
(inferior-ess-start-args . ) (ess-STERM . iESS) (ess-editor . R-editor) 
(ess-pager . R-pager) (ess-language . S) (inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start) 
(comint-use-prompt-regexp-instead-of-fields . t))
(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 . t) 
(comment-start . #) (comment-add . 1) (comment-start-skip . #+ *) 
(comment-column . 40) (indent-line-function quote S-indent-line) 
(parse-sexp-ignore-comments . t) (ess-set-style . ess-default-style) 
(ess-local-process-name) (ess-mode-syntax-table . S-syntax-table) 
(add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (font-lock-defaults quote (ess-R-mode-font-lock-keywords nil 
nil ((46 . w) (95 . w)))))
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send

Finished setting up ESS-mode.
(n-i-m-l: 1)(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=test.Rnw
(ess-mode-1.5): alist=((ess-local-customize-alist quote 
R-customize-alist) (ess-dialect . R) (ess-suffix . R) 
(ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix 
ess-dump-filename-template-proto) (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-imenu-mode-function quote ess-imenu-R) (inferior-ess-program . 
inferior-R-program-name) (inferior-ess-objects-command . 
inferior-R-objects-command) (inferior-ess-font-lock-keywords . 
inferior-ess-R-font-lock-keywords) (inferior-ess-search-list-command . 
search()
) (inferior-ess-help-command . help("%s", htmlhelp=FALSE)
) (inferior-ess-help-filetype) (inferior-ess-exit-command . q()) 
(inferior-ess-exit-prompt . Save workspace image? [y/n/c]: ) 
(inferior-ess-primary-prompt . \([A-Z][][A-Za-z0-9.]*\)*> ) 
(inferior-ess-secondary-prompt . + ?) (inferior-ess-start-file) 
(inferior-ess-start-args . ) (ess-STERM . iESS) (ess-editor . R-editor) 
(ess-pager . R-pager) (ess-language . S) (inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start) 
(comint-use-prompt-regexp-instead-of-fields . t))
(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 . t) 
(comment-start . #) (comment-add . 1) (comment-start-skip . #+ *) 
(comment-column . 40) (indent-line-function quote S-indent-line) 
(parse-sexp-ignore-comments . t) (ess-set-style . ess-default-style) 
(ess-local-process-name) (ess-mode-syntax-table . S-syntax-table) 
(add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (font-lock-defaults quote (ess-R-mode-font-lock-keywords nil 
nil ((46 . w) (95 . w)))))
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send

Finished setting up ESS-mode.
(n-i-m-l: 1)(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send
(ess-mode-1): ess-language=S, ess-dialect=R buf=test.Rnw
(ess-mode-1.5): alist=((ess-local-customize-alist quote 
R-customize-alist) (ess-dialect . R) (ess-suffix . R) 
(ess-dump-filename-template ess-replace-regexp-in-string S$ ess-suffix 
ess-dump-filename-template-proto) (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-imenu-mode-function quote ess-imenu-R) (inferior-ess-program . 
inferior-R-program-name) (inferior-ess-objects-command . 
inferior-R-objects-command) (inferior-ess-font-lock-keywords . 
inferior-ess-R-font-lock-keywords) (inferior-ess-search-list-command . 
search()
) (inferior-ess-help-command . help("%s", htmlhelp=FALSE)
) (inferior-ess-help-filetype) (inferior-ess-exit-command . q()) 
(inferior-ess-exit-prompt . Save workspace image? [y/n/c]: ) 
(inferior-ess-primary-prompt . \([A-Z][][A-Za-z0-9.]*\)*> ) 
(inferior-ess-secondary-prompt . + ?) (inferior-ess-start-file) 
(inferior-ess-start-args . ) (ess-STERM . iESS) (ess-editor . R-editor) 
(ess-pager . R-pager) (ess-language . S) (inferior-ess-exit-command . q()
) (inferior-ess-language-start eval inferior-S-language-start) 
(comint-use-prompt-regexp-instead-of-fields . t))
(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 . t) 
(comment-start . #) (comment-add . 1) (comment-start-skip . #+ *) 
(comment-column . 40) (indent-line-function quote S-indent-line) 
(parse-sexp-ignore-comments . t) (ess-set-style . ess-default-style) 
(ess-local-process-name) (ess-mode-syntax-table . S-syntax-table) 
(add-log-current-defun-header-regexp . ^\(.+\)\s-+<-[ 	
]*function) (font-lock-defaults quote (ess-R-mode-font-lock-keywords nil 
nil ((46 . w) (95 . w)))))
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=nil, 
comint..echoes=nil, comint..sender=comint-simple-send

Finished setting up ESS-mode.


Emacs  : GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
  of 2007-06-02 on RELEASE
Package: ess-mode 5.3.5

current state:
==============
(setq
  ess-language "Initial"
  ess-dialect nil
  ess-ask-for-ess-directory t
  ess-ask-about-transfile nil
  ess-directory nil
  ess-keep-dump-files "always"
  ess-source-directory "D:\\Temp\\Michael"
  )



More information about the ESS-bugs mailing list