Skip to content
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
Labels
bug It's a bug cli CLI app specific issue desktop All desktop platforms

Comments

@MarkQueppet
Copy link

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?

@laurent22 laurent22 added bug It's a bug essential desktop All desktop platforms cli CLI app specific issue labels Oct 21, 2018
@moltenform
Copy link
Contributor

moltenform 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.

moltenform pushed a commit to moltenform/joplin that referenced this issue Oct 31, 2018
…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
@moltenform
Copy link
Contributor

Opened a pull request from downpoured/joplin/win32_backslashes

laurent22 pushed a commit that referenced this issue Nov 20, 2018
#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
Copy link
Owner

Fixed

@lock lock bot locked and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug cli CLI app specific issue desktop All desktop platforms
Projects
None yet
Development

No branches or pull requests

3 participants