[ESS] Problem with preview of Rd files

Robert Sams Robert at sanctumfi.com
Tue Nov 15 13:05:29 CET 2011


I have a similar problem. When I generate an Rd buffer from a roxygen file via ess-roxy-preview-Rd and C-c C-p in the resulting RoxygenPreview buffer, I get this 

Warning in file(con, "r") :
  cannot open file 'nil': No such file or directory
Error in file(con, "r") : cannot open the connection
Execution halted

... because buffer-file-name is set to nil. If I write the buffer to a file and C-c C-p I get 

Error: exactly one Rd file must be specified
Execution halted

... because (?) buffer-file-name has a local value set to the file and a global value set to nil.

Apologies if it's not appropriate to tag my issue onto this thread, but I think the two issues have the same source. 

GNU Emacs 23.1.1 on XP with ess-5.11

Robert


-----Original Message-----
From: ess-help-bounces at r-project.org [mailto:ess-help-bounces at r-project.org] On Behalf Of Stephen Eglen
Sent: 27 October 2011 10:19
To: David Scott
Cc: ess-help at stat.math.ethz.ch
Subject: Re: [ESS] Problem with preview of Rd files

David Scott <d.scott at auckland.ac.nz> wrote:

> I am getting an error message when I try to preview a .Rd file file 
> with C-c C-p:
> 
> Warning in file(con, "r") :
>   cannot open file
> ''c:/Users/dsco036/Documents/Research/Packages/hwriterPlusDevel/hwriterPlus/man/hwriterPlus-package.Rd'':
> Invalid argument
> Error in file(con, "r") : cannot open the connection Execution halted

A couple of things to check.  

1. when in the .Rd buffer, what does the following give?
  C-h v buffer-file-name

Is it the same as what R thinks, above (c:/Users...)

2. From a shell, can you try something like 

   R CMD Rd2txt "c:/Users...-package.Rd"

as that is what Emacs is doing.

Stephen

______________________________________________
ESS-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


-----
No virus found in this message.
Checked by AVG - www.avg.com



More information about the ESS-help mailing list