Emacs cannot open files in Google Cloud Shell - google-cloud-shell

Starting from last week, Emacs stop working in my Google cloud shell.
emacs test.py will show an empty file. Other editor works. Please see the screenshot below,
cat test.py; showing the source code.
"emacs test.py" shows empty screen.
I tried to remove the .emacs file and didn't help.
Any idea is welcome. Thank you.

Related

Rstudio opens blank on user but works fine with sudo

I have a new archlinux installation and got rstudio-desktop-bin from AUR, as the project site says to. However, I get a blank screen (as below) when trying to open it. When using
sudo /usr/bin/rstudio-bin
It opens normally. I tried to reset rstudio from this tutorial
https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State
and in this question, the problem was solved changing file permission. Both did not work for me.
What could I do?
Rstudio when opening normally:
I found a suggestion that an update to electron may have caused an issue in the RStudio community forums. By disabling sandboxing, they were able to start RStudio as a user and it worked for me:
/usr/bin/rstudio-bin --no-sandbox
To make more permanent until the problem is resolved you can add a line to your .bashrc (or equivalent in another shell):
export RSTUDIO_CHROMIUM_ARGUMENTS="--no-sandbox"
There is also a suggestion in there about building from a weekly source instead. But this was easier for me so I can't vouch for it.

Jupyter notebook autocomplete shows too much

I tried to autocomplete the path in jupyter notebook. After I press 'tab', it shows much more than folder or file. I think those are build-in function of python. Is there any way to show only path and files while autocomplete the path?
Thanks!
This is a known issue, not critical and developers have just so much time. It should not be too hard to fix, IPython is open source, you are welcome ton contribute !

.R files not opening suddenly on anaconda

I use Anaconda for both python and R, I updated today, after that none of my R files are opening. I wrote a block of code, saved and tried to open, but after it opens, the entire file is empty.
I tried uninstalling and installing again, but its the same. Can anyone help me out with this please, my college project work is struck in between and I see all my developed codes gone suddenly.
Thank You in Advance
I’ve had this happen to me a few times. My work around is the navigate to the file in file explorer, right click on it, and open in a text editor. This should provide you your code. From there copy and paste back into your IDE. Further, saving the file with UTF-8 encoding supposedly helps as well, but I have yet to determine if this is a full workaround.

Creating an executable R-file

I want to make an executable R-file (for automation purposes). Therefore I concluded the following tutorial.
After completion however nothing happens... Only the .Rexec file opening in RStudio (in stead of running it and showing me the pop up...
Any more people experienced this? Any clues to where to look to fix this?
The tutorial you gave is useful. However, it missed something.
After done all the things in that blog, you still need to do one more thing. Right click on the "test.Rexec" file and choose "open with" and then select "RScript". Maybe you need to find RScript in your system which is usually here:
C:\Program Files\R\R-3.2.1\bin\Rscript.exe
Remeber to check the "Always use the selected program to open this kind of file".
Next time, when you double click the "test.Rexec" file, evethying would be okay.
I found no need to create Rexec file.
I created .bat file and then set it up in Task Scheduler.
The .bat file opens up the Rscript.exe, as shown in prev answer above. The .bat file then points to the .R file, that I want to be executed.
For some time, I could not get it to work, but solution was to point to Rscript.exe as mentioned above. Then it will not open up in compiler.
Works fine for me.

Unix - Tail Utility would open the file or not

Can anybody help me to sort this out.
What is the logic of Tail -f utility in Unix.
Is it open the log file to check the updated content or is there any other way to get this information. All the implimentation of Tail utility says that it will open the fileenter link description here
As per the source code of tail utility, it is opening the file in read mode not in write mode.
So the answer is, I would say TAIL is opening the file for checks. But along with that i would like to answer one more question, since it is opening in read mode the other process that tries to open the same file will not face any issues.

Resources