New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting external editor on Windows requires you to change file path from backslash to forward slash #906

Closed
MarkQueppet opened this Issue Oct 19, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@MarkQueppet

MarkQueppet commented Oct 19, 2018

Operating system

  • Windows

Application

  • Desktop

I was struggling to get Joplin to open my notes in emacs on Windows. Turns out I needed to change all the backslashes used in normal Windows filepaths to the unix forward slash and it worked fine.

So instead of

E:\Dropbox\user\my-TOOLS\Emacs\bin\runemacs.exe

Which produces the error message of
Error opening note in editor: spawn E:Dropboxusermy-TOOLSEmacsbinrunemacs.exe

It needed to be

E:/Dropbox/user/my-TOOLS/Emacs/bin/runemacs.exe

Which worked fine.

I'm thinking that the backslashes are actually viewed as escape characters due to the error message which could cause some problems for other people.

Maybe this is super obvious, but being able to use an external editor is one of the killer features of Joplin for me so I figured I'd drop this in here in case anyone else struggles with this. Maybe the documentation should be updated?

@moltenjs

This comment has been minimized.

Contributor

moltenjs commented Oct 29, 2018

Although this wasn't marked as 'hacktober fest', it looks like one I could look into submitting a pull request for. Issue does consistently repro for me, it does look like a backslash escaping issue.

moltenjs pushed a commit to moltenjs/joplin that referenced this issue Oct 31, 2018

Ben Fisher
fix for laurent22#906, 1) windows paths like C:\a\b weren't accepted …
…because backslashes were treated as escape sequences, 2) common paths like C:\Program Files\Foo\Foo.exe weren't accepted because of the space in the path
@moltenjs

This comment has been minimized.

Contributor

moltenjs commented Oct 31, 2018

Opened a pull request from downpoured/joplin/win32_backslashes

laurent22 added a commit that referenced this issue Nov 20, 2018

fix for #906, 1) windows paths like C:\a\b weren't accepted because b… (
#935)

* fix for #906, 1) windows paths like C:\a\b weren't accepted because backslashes were treated as escape sequences, 2) common paths like C:\Program Files\Foo\Foo.exe weren't accepted because of the space in the path

* Using anothing approach,
a) backslashes are no longer treated as escape characters,
b) string change to remind people to add spaces

* Removing joplin.pot from the patch, it will be updated later.

* Removing unused code.
@laurent22

This comment has been minimized.

Owner

laurent22 commented Nov 20, 2018

Fixed

@laurent22 laurent22 closed this Nov 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment