panwriter icon indicating copy to clipboard operation
panwriter copied to clipboard

Export problem with AppImage 0.8.4 on Linux Slackware

Open fhouweli opened this issue 3 years ago • 8 comments

Hi, when trying to export my document to html, the pandoc command has an empty --to argument (and therefore --standalone is interpreted as a format. Screenshot_2022-08-26_19-30-52

fhouweli avatar Aug 26 '22 17:08 fhouweli

I cannot reproduce... what's the exact input you were using?

mb21 avatar Aug 26 '22 18:08 mb21

Thanks for looking into it. My working file is called "sql.md". When I choose "Export..." a dialog opens with "sql" in the "Name" field (highlighted/selected) and "HTML" in the select box below. Changing the file format with the select box does not add an extension in the "Name" input field. Pressing "Export" causes the error. HOWEVER, if I manually add ".html" to the filename, the export succeeds!

It is just a problem of the (stupid?) user thinking the file extension would be added automatically.

I really enjoy using PanWriter.

Regards

frans

On 8/26/22 20:31, Mauro Bieg wrote:

I cannot reproduce... what's the exact input you were using?

— Reply to this email directly, view it on GitHub https://github.com/mb21/panwriter/issues/114#issuecomment-1228798458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQABTAAQ7BR6MOHRBTHYJ33V3EEPFANCNFSM57XPQ73Q. You are receiving this because you authored the thread.Message ID: @.***>

fhouweli avatar Aug 26 '22 18:08 fhouweli

Changing the file format with the select box does not add an extension in the "Name" input field.

that's odd. because it does for me on macOS. are you on the latest PanWriter version?

can you reproduce on other linux distros?

mb21 avatar Aug 27 '22 08:08 mb21

I am on latest Panwriter and I can confirm same problem exists on Mint Linux 19.3.

mbozkurt avatar Aug 29 '22 19:08 mbozkurt

hm.. we're just using electron's dialog.showSaveDialog filters option.

you're saying only the default name is missing the html extension (that we could probably fix in PanWriter)? And when you switch to an other format in the dropdown the extension is added?

mb21 avatar Aug 30 '22 07:08 mb21

No, switching to another format has no effect.

On 8/30/22 09:16, Mauro Bieg wrote:

hm.. we're just using https://github.com/mb21/panwriter/blob/master/electron/pandoc/export.ts#L38 electron's dialog.showSaveDialog https://www.electronjs.org/docs/latest/api/dialog#dialogshowsavedialogbrowserwindow-options |filters| option.

you're saying only the default name is missing the html extension (that we could probably fix in PanWriter)? And when you switch to an other format in the dropdown the extension is added?

— Reply to this email directly, view it on GitHub https://github.com/mb21/panwriter/issues/114#issuecomment-1231246848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQABTAF27WBYXCMHMJJRHY3V3WYMPANCNFSM57XPQ73Q. You are receiving this because you authored the thread.Message ID: @.***>

fhouweli avatar Aug 30 '22 09:08 fhouweli

uh, that seems like an Electron bug then, because all we get back is the filePath, so if that doesn't change when you change the dropdown, there's nothing we can do in PanWriter to fix it...

I'll try to update to the newest Electron version soonish... maybe they have fixed it already...

mb21 avatar Aug 30 '22 09:08 mb21

got exactly the same issue with panwriter 0.8.4 freshly installed at Manjaro Linux ... none of the formats can be exported. Will it be posted here, when a fix is available?

hwpf avatar Sep 20 '22 11:09 hwpf

Same here.

Debian 12 bookworm with Appimage 0.8.6 and pandoc 2.17.1.1 (Debian source)

Screenshot_2024-07-11_19-25-29

Merga189 avatar Jul 11 '24 17:07 Merga189

Okay, I found the relevant Electron issue. Apparently, that's just not something Electron supports on Linux, which is a bummer.

But from above in this thread:

Changing the file format with the select box does not add an extension in the "Name" input field. Pressing "Export" causes the error. HOWEVER, if I manually add ".html" to the filename, the export succeeds!

That's still a viable workaround, right? So perhaps we should just remove the selector dropdown on Linux to avoid confusion?

mb21 avatar Jul 13 '24 09:07 mb21

I implemented this approach in a draft PR: https://github.com/mb21/panwriter/pull/166

Can anybody test this on Linux? Check out that branch and see https://github.com/mb21/panwriter/#develop

mb21 avatar Jul 13 '24 10:07 mb21

I've merged this to the master branch. But apparently my friend's Apple Developer Certificate is expired so I cannot make a release. Perhaps the day has come I'll have to fork over 100.- to Apple 🙄

Anyway, for now, here's the Linux AppImage.

mb21 avatar Jul 14 '24 10:07 mb21

First of all thank you for reacting.

Now I have both appimages here on my Debian 12.

0.8.7 is working now and I can convert a *.md to *.odt

Screenshot_2024-07-14_13-05-25

But here a screenshot with 0.8.6 with a possibility to select the file extension

Screenshot_2024-07-14_12-58-18

and now 0.8.7, where that possibilty is missing.

Screenshot_2024-07-14_13-00-32

br Karl

Merga189 avatar Jul 14 '24 11:07 Merga189

@Merga189 thanks, yes. On Linux that electron-provided dropdown apparently isn't working correctly (that's the linked issue), so the only thing I could think of was to remove it. Instead, you just have to write the filename including extension (e.g. .odt).

mb21 avatar Jul 14 '24 11:07 mb21