~ubuntu-branches/ubuntu/precise/ess/precise

« back to all changes in this revision

Viewing changes to lisp/ess-r-d.el

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2010-06-04 09:59:22 UTC
  • mfrom: (3.1.16 sid)
  • Revision ID: james.westby@ubuntu.com-20100604095922-bcy1mi3adwayxckb
Tags: 5.9.1-2
lisp/*: Upgraded to svn revision 5352 with a fix by Sebastian Luque 
for the XEmacs incompatibility                  (Closes: #583857)

Show diffs side-by-side

added added

removed removed

Lines of Context:
581
581
                          "&idxname=Rhelp02a&idxname=functions&idxname=docs")))))
582
582
 
583
583
 
 
584
(defun ess-dirs ()
 
585
  "Set Emacs' current directory to be the same as the *R* process.
 
586
If you change directory within *R* using setwd(), run this command so that
 
587
Emacs can update its `default-directory' variable for the *R* buffer.
 
588
 
 
589
Currently this function has been tested only for *R*, but should also work for 
 
590
*S* buffers."
 
591
  (interactive)
 
592
  (let ((dir))
 
593
    (setq dir (car (ess-get-words-from-vector "getwd()\n")))
 
594
    (setq default-directory (file-name-as-directory dir))))
 
595
 
 
596
 
584
597
 ; provides
585
598
 
586
599
(provide 'ess-r-d)