Re: [patch] fix warning on branch

2012-09-27 Thread Scott Kostyshak
On Mon, Sep 24, 2012 at 1:04 PM, Richard Heck rgh...@lyx.org wrote: On 09/23/2012 04:54 PM, Jean-Marc Lasgouttes wrote: Le 23/09/12 00:06, Scott Kostyshak a écrit : How many users *compile* anything :) True. And out of those who do, how many look at the warnings? :) Personally, I still

[PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Scott Kostyshak
When /tmp was on a different file system (e.g. encrypted home), lyxknitr.R failed to move files to /tmp because it relied on R's 'file.rename' function, which in turn relied on the rename function in stdio.h, which was failing with the EXDEV errno. Now lyxknitr.R relies on 'file.copy'. Yihui,

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Kornel Benko
Am Donnerstag, 27. September 2012 um 07:18:36, schrieb Scott Kostyshak skost...@lyx.org When /tmp was on a different file system (e.g. encrypted home), lyxknitr.R failed to move files to /tmp because it relied on R's 'file.rename' function, which in turn relied on the rename function in

Re: [patch] fix warning on branch

2012-09-27 Thread Jean-Marc Lasgouttes
Le 27/09/2012 13:17, Scott Kostyshak a écrit : OK. I'm trying to stay away from branch as much as possible for now. But attached are the three patches. Can someone check them and make sure they are risk free? They seem OK to me. I am not sure what the lexer code does, but the patch does not

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Yihui Xie
I was bitten by this problem as well a few days ago, but I forgot to work on it. I think I have a better fix which does not involve with copying or renaming files at all. I'll do it soon. Thanks! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Yihui Xie
Hi Scott, Attached is my patch. Now lyxknitr.R does not move files at all; all old tricks are gone, and the R script is much cleaner. I have tested it under Ubuntu. I'm not sure you can commit it to the git repository, so I cc JMarc. BTW, I also updated the homepage of the knitr package from

Re: [patch] fix warning on branch

2012-09-27 Thread Julien Rioux
On 27/09/2012 7:17 AM, Scott Kostyshak wrote: - ::write(pipefd, cmd.c_str(), cmd.length()); +if (::write(pipefd, cmd.c_str(), cmd.length()) 0) +LYXERR0(Cannot write to pipe!); You're space-indenting in a tab-indented file here. -- Julien

Re: [LyX 2.0.x] Fix bug #8349: Cannot compile 2.0.x: unresolved external symbol

2012-09-27 Thread Vincent van Ravesteijn
Op 25-9-2012 10:24, Jean-Marc Lasgouttes schreef: Le 24/09/12 19:33, Vincent van Ravesteijn a écrit : Op 24-9-2012 16:28, Jean-Marc Lasgouttes schreef: That's amusing. This is a patch from Stephan that I backported, and it looks like Stephan did the backport, which does not help communication.

Re: [patch] fix warning on branch

2012-09-27 Thread Scott Kostyshak
On Thu, Sep 27, 2012 at 1:51 PM, Julien Rioux jri...@physics.utoronto.ca wrote: On 27/09/2012 7:17 AM, Scott Kostyshak wrote: - ::write(pipefd, cmd.c_str(), cmd.length()); +if (::write(pipefd, cmd.c_str(), cmd.length()) 0) +LYXERR0(Cannot

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Scott Kostyshak
On Thu, Sep 27, 2012 at 1:40 PM, Yihui Xie x...@yihui.name wrote: Hi Scott, Attached is my patch. Now lyxknitr.R does not move files at all; all old tricks are gone, and the R script is much cleaner. I have tested it under Ubuntu. It looks a lot cleaner indeed. I'm not sure you can commit

Re: [patch] fix warning on branch

2012-09-27 Thread Scott Kostyshak
On Mon, Sep 24, 2012 at 1:04 PM, Richard Heck wrote: > On 09/23/2012 04:54 PM, Jean-Marc Lasgouttes wrote: >> >> Le 23/09/12 00:06, Scott Kostyshak a écrit : How many users *compile* anything :) >>> >>> >>> True. And out of those who do, how many look at the warnings? :)

[PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Scott Kostyshak
When /tmp was on a different file system (e.g. encrypted home), lyxknitr.R failed to move files to /tmp because it relied on R's 'file.rename' function, which in turn relied on the rename function in , which was failing with the EXDEV errno. Now lyxknitr.R relies on 'file.copy'. Yihui, does this

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Kornel Benko
Am Donnerstag, 27. September 2012 um 07:18:36, schrieb Scott Kostyshak > When /tmp was on a different file system (e.g. encrypted home), > lyxknitr.R failed to move files to /tmp because it relied on R's > 'file.rename' function, which in turn relied on the rename function in >

Re: [patch] fix warning on branch

2012-09-27 Thread Jean-Marc Lasgouttes
Le 27/09/2012 13:17, Scott Kostyshak a écrit : OK. I'm trying to stay away from branch as much as possible for now. But attached are the three patches. Can someone check them and make sure they are risk free? They seem OK to me. I am not sure what the lexer code does, but the patch does not

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Yihui Xie
I was bitten by this problem as well a few days ago, but I forgot to work on it. I think I have a better fix which does not involve with copying or renaming files at all. I'll do it soon. Thanks! Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Yihui Xie
Hi Scott, Attached is my patch. Now lyxknitr.R does not move files at all; all old tricks are gone, and the R script is much cleaner. I have tested it under Ubuntu. I'm not sure you can commit it to the git repository, so I cc JMarc. BTW, I also updated the homepage of the knitr package from

Re: [patch] fix warning on branch

2012-09-27 Thread Julien Rioux
On 27/09/2012 7:17 AM, Scott Kostyshak wrote: - ::write(pipefd, cmd.c_str(), cmd.length()); +if (::write(pipefd, cmd.c_str(), cmd.length()) < 0) +LYXERR0("Cannot write to pipe!"); You're space-indenting in a tab-indented file here. --

Re: [LyX 2.0.x] Fix bug #8349: Cannot compile 2.0.x: unresolved external symbol

2012-09-27 Thread Vincent van Ravesteijn
Op 25-9-2012 10:24, Jean-Marc Lasgouttes schreef: Le 24/09/12 19:33, Vincent van Ravesteijn a écrit : Op 24-9-2012 16:28, Jean-Marc Lasgouttes schreef: That's amusing. This is a patch from Stephan that I backported, and it looks like Stephan did the backport, which does not help communication.

Re: [patch] fix warning on branch

2012-09-27 Thread Scott Kostyshak
On Thu, Sep 27, 2012 at 1:51 PM, Julien Rioux wrote: > On 27/09/2012 7:17 AM, Scott Kostyshak wrote: >> >> - ::write(pipefd, cmd.c_str(), cmd.length()); >> +if (::write(pipefd, cmd.c_str(), cmd.length()) < 0) >> +

Re: [PATCH] lyxknitr failed when /tmp on different fs

2012-09-27 Thread Scott Kostyshak
On Thu, Sep 27, 2012 at 1:40 PM, Yihui Xie wrote: > Hi Scott, > > Attached is my patch. Now lyxknitr.R does not move files at all; all > old tricks are gone, and the R script is much cleaner. I have tested > it under Ubuntu. It looks a lot cleaner indeed. > I'm not sure you can