Doom Emacs - accessing Google Drive via gdrive yields 'Copying failed' (Ubuntu 20.04 LTS / GNOME ) - emacs

I'm using Doom Emacs v3.0.0 on Ubuntu 20.04 LTS, and I'm trying to access files in my Google Drive by following this instruction: https://emacsnotes.wordpress.com/2018/07/08/your-google-drive-now-within-your-emacs/ . My file manager displays my Google Drive, and I have gvfsd and gvfsd-google running on my computer.
There are two issues:
When I try to access my Google Drive with '/gdrive:(youremail)#gmail.com' it shows:
Copying /gdrive:(youremail)#gmail.com:/ to /tmp/tramp.Q4o2Rw...
Copying failed, see buffer ‘*tramp/gdrive (youremail)#gmail.com*’ for details.
I can open files in my drive by opening the folder and simply drag-and-dropping the files into Emacs. I can then access, modify and save those files. But the file name displayed in minibuffer is file ID, not the file name.
If I press SPC . to browse the folder in Emacs minibuffer, it shows file IDs and not file names.
What am I missing here? Is this a problem with Google Drive or Emacs?
According to the instruction, I should be able to access my Google Drive with 'gdrive', and the Dired buffer should show file names, instead of file IDs.

Related

How to access mongoshell from the hyperterminal?

How to link/access mongosh.exe file (which is installed from mongoDB downloads) with hyperterminal command line
Make the directory “”home”” in Hyper Terminal.
cd ~
Check if you see the .bash_profile. If it isn’t there, create one with the command touch. That’s the same as using the Windows command prompt and the command new file.
touch .bash_profile
The vim editor is what you’ll use to open the .bash_profile.
vim .bash_profile
Go to the C:\Program Files and locate the \MongoDB\Server directory. You should see the recently installed MongoDB version identified by its version number.
Right-click the folder to see the full path. Select “Copy” to copy it.
Go to the .bash_profile again in the Hyper Terminal and right-click and select “Paste” or do a CTRL+P to paste the MongoDB installation’s entire path in an instance of the .bash_profile.
alias mongod=""/c/Program\ files/MongoDB/Server/4.0/bin/mongod.exe""
alias mongo=""/c/Program\ Files/MongoDB/Server/4.0/bin/mongo.exe""
Here is the link for setup

Problem with saving and reopening a vscode workspace initiated from WSL

I open my vscode with code . command from WSL terminal because I want to work directly in my WSL. It works fine and for example, the file explorer of vscode shows directory structures based on WSL machine and not based on my Windows machine.
My problem is however that, when I save a workspace using File -> Save Workspace As, it saves it again as a workspace in my Windows machine. So when I close and open my vscode again and use Open Workspace... to open the already saved workspace(in previous step), explorer reads directories from Windows machine.
You might ask what's the difference between saving files in /mnt/c/Users/[user]/Desktop or C:\Users\[user]\Desktop, but the problem is two things:
I might open a session from a directory in WSL that is (unlike Desktop) inaccessible from Windows.
Even if my Desktop is my current working directory, I may add another directory to my workspace (using Add Folder to Workspace...) and even if it is a path accessible from Windows, the next time I open the workspace, I will get an exclamation mark and such an error near that directory in explorer:
C:\mnt\d\Files_And_Downloads\Google Drive_Code . Can not resolve workspace folder
I suspect this is a bug, vscode has mixed the WSL path and Windows path. So anyone who uses Remote - WSL extension and can tell me what's going on here?

VSCode can't write to files in Bash for Windows

I've been using Bash for Windows recently (its the Ubuntu "app") and I can open VSCode from the bash command line but when I try to save any modifications I've made to the file, it just says permission denied.
I've tried creating the files directly from VS Code's terminal but in that case it doesn't print out an error message but it also doesn't save anything.
That happens because you dont have permissions to write in the system32 folder. If you run the Ubuntu application as an administrator, you'll get the permissions to write. However, you won't be really in that file, because of the way that the virtualization of files and errors might happear doing so, and I do not recommend to run the console in a privilege mode (for seccurity issues).
Fortunately, in version 1903 of Windows 10, this will change, and you'll be able to navigate the WSL folders via Windows Explorer, and for sure that issue will disappear.
Edit: the best practice, you do the work in a folder in the Windows File System, and cd to there in the WSL console. VSCode has this integrated very well, if you have an open file in VSCode you can just do New Terminal and choose a WSL terminal. The terminal will already be in the folder where you file is.

Atom - Unable to save file: Permission denied (Windows)

I've been a long time user of notepad++ and I enjoy it a lot, but a friend recently recommended me to use Atom, so I gave it a try. However, when I try to save anything in my project folder (or any file at all), I receive this message that I am unable to save file: permission denied.
I've tried typing the command sudo atom /path/to/file in my PowerShell for Windows, but I get the following message:
I understand that sudo is a Linux-based command and thus would not work in a Windows environment but would there be an alternative route to get Atom working on my machine?
Thanks a lot!
The files were made "Read Only" somehow (maybe your anti-virus software or something, who knows...).
Solution:
Go to the folder in the Explorer, highlight all of the files in your project. Right click, open the properties. Deselect "Read-Only" and push ok. When it asks if you would like to apply to only the selected files or also to the files in any sub-folders, click yes if you need to.
This should fix your problem.

Accessing remote tags file with Emacs

I use Emacs (run natively in OSX) to edit files (mostly python code) on Ubuntu VMs. I run a VM locally, but also access code on EC2. I recently learned about exuberant-ctags and was able to successfully create a tags file on my local VM. The tags file is fairly large (30 MB). I'm accessing the tags file in Emacs using tramp via ssh. My first question is should I expect the access to take a long time? It takes Emacs a few minutes to load the tags file, even though its pulling the file off of a VM running on the same machine.
The second problem I have is that after the tags file is loaded, Emacs (again, running natively in OSX) thinks that the code base is on my local drive, not on the drive of the VM and so gives me a file not found error. So if function X is defined in file Y, how do I get Emacs to figure out that file Y is on the remote machine, not in my local path?
Thanks!