So I have 2 files, file1.sml & file2.sml both of which have correct code & I'm using a Windows operating system.
When I run Emacs and execute: use "file1.sml", it runs fine but then when I simply go to tab File->Close to close the file and then I drag file2.sml into Emacs and try to run it the same way, it gives the following error:
[use failed: Io: openIn failed on "file2.sml", Win32TextPrimIO:openRd: failed]
I tried restarting SML by doing c-c c-d but it's the same. So what I do is I quit Emacs and then start again and run file2.sml and it runs fine.
Why do I have to quit just to run another file?
there are few things you can right now do.
1. save the file you created before trying to open it.
i mean yes it sounds lame, but people new to programming ( as you tried to save it as "file.sml" , First save it.
2. try to change \ to //
Win32TextPrimIO:openRd: failed
because it cant find it.
Related
Context
Creating remappings to exit TERMINAL mode and enter NORMAL mode within neovim (ie. <C-\><C-N>).
I'm getting no-op behavior (ie. terminal stays in TERMINAL mode and simply ouputs , -- mapleader) when creating a new mapping as follows (in init.lua):
keymap.set("t", "<leader><Esc>", "<C-\\><C-N>")
Shell is zsh and I've set bindkey -v in .zshrc. Terminal application is iterm2.
When I set the following mapping:
keymap.set("t", "<leader>nn", "<C-\\><C-N>")
The expected behavior happens (ie. terminal exits TERMINAL mode and enter NORMAL mode).
Not sure how/where the first mapping is getting interrupted to not exit TERMINAL mode.
Question
Why is the first mentioned mapping not working, which the second mentioned mapping is working?
Effort
Looked on other posts and they all indicate there should be no problem with the first mapping.
I'm using the Mypy extension in VSCode, and it's giving me the error mypy failed with error: Daemon has died . See Output panel for details.
When I open the Output panel, it doesn't give me much more info than just telling my that it tried to run dmymy.EXE but that it had died.
How do I get the Mypy extension working again?
I've tried searching for this error on Google to no avail, and I've also tried rebooting VSCode, which gives me the same error every time.
Open up a Command Prompt (on Windows) or Terminal (non-Windows). Copy/paste the location of the dmypy.EXE script that it tried to run (from the output panel). Put start after the script. This will start the daemon.
The command looked like this for me:
C:\Users\MyUsername\AppData\Local\Programs\Python\Python38\Scripts\dmypy.EXE start
Now, reboot VS Code (I'm not sure if this is even needed), and the mypy extension should work again.
I am following some tutorials on how to work with Mongodb but they don't explain how to close the CLI. I usually just use "exit" but after running mongod it now does nothing, and if I try to leave by just closing the window I get a message saying "processes running in session".
I get the same problem with the other gitbash window after running npm run dev (I think the "dev" part is just specific to what I do now?).
Normally you can press 'ctrl' + 'c' on your keyboard and it should stop the process running on your command line tool.
Have a look here thing might be more MongoDB specific help
https://stackoverflow.com/a/11776728/4389143
The command to save a file in Vim and quit the editor is :wq . To save the file and exit the editor simultaneously, press Esc to switch to normal mode, type :wq and hit Enter .
Check this.
So I'm getting some pretty strange behaviour when I try to use an Automator service to open new emacs (GNU Version 25.2 with spacemacs) buffers.
In my terminal, the command emacsclient -a '' -c works as expected, opening a new buffer through emacsclient. However, when I make a service in Automator which simply runs a (/bin/bash) shell script:
emacsclient -a '' -c
I get an error message:
The action “Run Shell Script” encountered an error: “emacsclient: could not get terminal name”
On suspicions that this was due to Automator not using some default PATH variable, I tried the following instead:
PATH=/usr/local/bin:$PATH
emacsclient -c
which produced the same error as before.
Next I tried
PATH=/usr/bin:/usr/local/bin export PATH;
emacsclient -c
which produced a different error message:
The action “Run Shell Script” encountered an error: “emacsclient: invalid option -- c
Try `emacsclient --help' for more information”
however why I try that script in my terminal it also gives a similar error which doesn't make much sense to me.
If anyone has suggestions for how to fix this I'd really appreciate it.
The problem is the shell script is running an old version of emacsclient in /usr/bin you need to run the one in Emacs.app/Contents/MacOS/bin/emacsclient. Delete the PATH line and you can use a solution listed here for running emacsclient inside automator Running a macOS service for open with emacs failed with "emacsclient: could not get terminal name mac"
I wana use the pyoo.py package to control libreOffice via Python.
There are good tutorials available. First step is to open a socket with following command.
soffice --nologo --norestore --nodefault --accept="socket,host=localhost,port=2002;urp;"
But it does not work, it stucks.(Stucks means I enter the command in the cmd but no response)
If I kill the sOffice Process in the Task-Manger it will continue.
It worked once and than never again.
I use Win7 64bit and LibreOffice 5
First be sure that all instances and processes of soffice are closed, because if office is already open, it will not start listening on a socket.
Well there is something wrong with your command; it isn't working for me. What I normally use is:
chdir "%ProgramFiles(x86)%\LibreOffice 5\program\"
start soffice -accept=socket,host=0,port=2002;urp;
On Linux I use the following command, and the same arguments work on Windows:
loffice "--accept=socket,host=localhost,port=2002;urp;" --writer
EDIT:
From your comment, it sounds like you were able to get it to work by removing various arguments to see which one was causing the problem.