Also, M-x R-mode but that would need to be done again every time... If you don't want to rename to model.R Add a line
## -*- R -*- at the top (or close enough to the very top; this tells emacs to use R-mode ; there are several (more flexible, more to write) versions of such so-called "file local variables" in emacs.. Emacs manuals and also Google "Emacs file local variables" should help. Martin Maechler, ETH Zurich On Fri, Dec 2, 2016 at 8:35 PM, Simon Bonner <sbonn...@uwo.ca> wrote: > Hi Paul, > > An easy way to do this is to rename your file as model.R. The syntax for BUGS > is almost identical to the syntax for R, and BUGS doesn’t care what the model > extension is. > > Wish I could say that I thought of that but kudos go to Matthew Schofield. > > Cheers, > > Simon > > Simon Bonner > Assistant Professor of Environmetrics/Director MMASc > Department of Statistical and Actuarial Sciences/Department of Biology > University of Western Ontario > > Office: Western Science Centre rm 276 > > Email: sbonn...@uwo.ca | Telephone: 519-661-2111 x88205 | Fax: 519-661-3813 > Twitter: @bonnerstatslab | Website: http://simon.bonners.ca/bonner-lab/wpblog/ > > > On 2016-12-02, 1:21 PM, "ESS-help on behalf of Paul Johnson" > <ess-help-boun...@r-project.org on behalf of pauljoh...@gmail.com> wrote: > > I have a student here who wants to edit an OpenBugs file named > "model.txt" in Emacs. I can't understand how to tell Emacs to use a > bugs mode so that things like M-; understand what to do. > > If you have an idea, let me know. > > We don't want to run the bugs code with an emacs session, we just want > to edit the bugs text model file and then we can run with R2OpenBugs > or something else. > > -- > Paul E. Johnson http://pj.freefaculty.org > Director, Center for Research Methods and Data Analysis > http://crmda.ku.edu > > To write to me directly, please address me at pauljohn at ku.edu. > > ______________________________________________ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help > > > ______________________________________________ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help ______________________________________________ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help