[ESS] better ess-site.el {was " Release of ESS 5.3.5"}
Phillip Lord
phillip.lord at newcastle.ac.uk
Wed Aug 22 19:42:13 CEST 2007
>>>>> "RS" == Rodney Sparapani <rsparapa at mcw.edu> writes:
>> I understand; but no; we have no real "autoload only" setup:
>>
>> (require 'ess-site) or similar no has now too many (require ...) things.
>>
>> I don't know if its just a matter of a few hours of diligent collecting
>> (autoload .) lines from the various *.el files and put these into a new
>> ess-autoload.el
>>
>> But then, if it was so easy, we'd probably have done it in the past?
>> Does any other ESS-core member know?
>>
>> Martin
>>
PL> Thanks for the software!
>>
>> you're welcome. Martin
>>
>>
RS> Hi Martin:
RS> The XEmacs package attempted to do this. However, there also were alot
RS> of hacks in there that made "warnings"/"errors" go away. Unfortunately,
RS> in one case that still burns me up, the hack actually made the feature
RS> go away and it was an arduous process to figure out what the hell was
RS> going on. So, I don't think we should try to be too cute. Of course,
RS> Tony had alot to do with the XEmacs package so maybe he would like to
RS> comment on the autoloading mechanism. But, I believe that they are
RS> slightly different between emacs and xemacs. Another reason to not do
RS> it.
Well, the technique I gave works for JDEE which works for both emacs. It
should all work. Where it's going to fail is if the various files don't
have all their requires sorted -- at the moment if you are always loading them
in the same order (with ess-site) then there is a good chance that they are
not.
Another possible solution would be to make a file called "ess-autoload" as
below. Then remove the equivalent form auto-mode-alist from ess-site and
replace it with (require 'ess-autoload). Then people running can
(require 'ess-autoload)
and it will autoload the first time they open a file, or
(load-library "ess-site")
and it will work as now.
Of course, you might need some more commands autoloaded -- I don't know how
many different ways people come into ess. If it's a lot, then clearly this is
a pain in the ass to maintain.
Anyway, this is just a suggestion. I can understand why you might not be keen
to go through the work, and I am a very minor user of ESS -- blame it all on
Stephen Eglen, it's his fault I am doing this.
Cheers
Phil
(setq auto-mode-alist
(append
'(("\\.sp\\'" . S-mode) ;; re: Don MacQueen <macq at llnl.gov>
("\\.[qsS]\\'" . S-mode) ;; q,s,S [see ess-restore-asm-extns above!]
("\\.ssc\\'" . S-mode) ;; Splus 4.x script files.
("\\.[rR]\\'" . R-mode)
("\\.[rR]nw\\'" . Rnw-mode)
("\\.[sS]nw\\'" . Snw-mode); currently identical to Rnw-mode
("\\.[rR]profile\\'" . R-mode)
("NAMESPACE\\'" . R-mode)
("\\.omg\\'" . omegahat-mode)
("\\.hat\\'" . omegahat-mode) ;; Duncan's pref'd...
("\\.lsp\\'" . XLS-mode)
("\\.do\\'" . STA-mode)
("\\.ado\\'" . STA-mode)
("\\.[Ss][Aa][Ss]\\'" . SAS-mode)
;; Many .log/.lst files, not just SAS
;;("\\.log\\'" . SAS-log-mode)
;;("\\.lst\\'" . SAS-listing-mode)
("\\.[Ss]t\\'" . S-transcript-mode)
("\\.[Ss]out" . S-transcript-mode)
("\\.[Rr]t\\'" . R-transcript-mode)
("\\.[Rr]out" . R-transcript-mode)
("\\.Rd\\'" . Rd-mode)
;;("\\.[Bb][Uu][Gg]\\'" . ess-bugs-mode)
("\\.[Bb][Oo][Gg]\\'" . ess-bugs-mode)
("\\.[Bb][Mm][Dd]\\'" . ess-bugs-mode)
("\\.[Jj][Mm][Dd]\\'" . ess-jags-mode)
)
auto-mode-alist))
(autoload 'R-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'S-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'Rnw-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'Snw-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'omegahat-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'XLS-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'STA-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'SAS-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'S-transcript-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'R-transcript-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'Rd-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'ess-bugs-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(autoload 'ess-jags-mode "ess-site" "Documentation not available till the function is autoloaded" t)
(provide 'ess-autoload)
--
Phillip Lord, Phone: +44 (0) 191 222 7827
Lecturer in Bioinformatics, Email: phillip.lord at newcastle.ac.uk
School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord
Claremont Tower Room 909, skype: russet_apples
Newcastle University,
NE1 7RU
More information about the ESS-help
mailing list