asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
355 stars 145 forks source link

Pandoc release naming convention changed for mac (M1 v x86) #1349

Closed snowe2010 closed 1 year ago

snowe2010 commented 1 year ago

Observed vs. expected behavior

Trying to paste an image into an adoc file.

Failed to download 'https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-macOS.zip':

Tried disconnecting from my wifi, connecting to cellular connection.

Looking at the Pandoc releases it seems that they changed the naming convention due to adding support for arm. https://github.com/jgm/pandoc/releases/

Steps to reproduce

Paste an image in?

Environment

Plugin Version: 0.38.13

IntelliJ Details:

IntelliJ IDEA 2023.1.1 (Ultimate Edition)
Build #IU-231.8770.65, built on April 27, 2023
Licensed to Tyler Thrailkill
You have a perpetual fallback license for this version.
Subscription is active until April 24, 2024.
Runtime version: 17.0.6+10-b829.9 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 16384M
Cores: 10
Metal Rendering is ON
Registry:
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true

Non-Bundled Plugins:
    manjaro.zpb (1.1)
    https://github.com/DUNNIK (1.7)
    com.emonadeo.tanne (0.4.0)
    com.github.zcg.love-your-eye-theme (1.0.5)
    com.jetbrains.CyanTheme (1.3)
    com.jetbrains.darkPurpleTheme (1.3)
    light.flat.theme (0.14)
    com.github.openmindculture.intellijcutepinklighttheme (0.8.0)
    com.daynight.plugin (1.2.7)
    com.mroche.JsonHelper (1.2.0)
    name.kropp.intellij.makefile (231.8109.91)
    com.redhat.devtools.intellij.telemetry (1.0.0.44)
    com.facebook.ktfmt_idea_plugin (1.1.0.42)
    com.arcticicestudio.nord.jetbrains (0.13.0)
    com.jetbrains.grayTheme (1.3)
    dev.thull.polar (1.0.5)
    org.jetbrains.plugins.ruby (231.8770.53)
    com.alex.tokyonight (0.1.6)
    rasarts.espresso.light.theme (1.2.0)
    com.intellij.nativeDebug (231.8770.15)
    com.intellij.drools (231.8770.17)
    pl.kpiska.jsondiff (0.2)
    com.intellij.graalvm (231.8770.17)
    String Manipulation (9.7.1)
    com.redhat.devtools.intellij.quarkus (1.17.1.346)
    com.github.rxyor.plugin.pom.assistant (1.6)
    com.dmarcotte.handlebars (231.8770.3)
    org.asciidoctor.intellij.asciidoc (0.38.13)
    Pythonid (231.8770.65)
    uk.co.ben-gibson.remote.repository.mapper (4.3.2)
    kotest-plugin-intellij (1.3.68-IC-2023.1)
    ru.serafimarts.roboticket (1.1.3)
    com.blai30.lotus.theme (1.10)
    aws.toolkit (1.67-231)

Kotlin: 231-1.8.21-IJ8770.65
ahus1 commented 1 year ago

Thanks for letting me know and sorry that I missed this. As a workaround, please download the x86 file. In the notification area of IntelliJ, there should be a prompt where you can pick the manually downloaded file.

I'm about to prepare an update there this manual step is no longer necessary. Thanks!

ahus1 commented 1 year ago

There is now a pre-release 0.38.15 which includes this fix. I'd be happy if you could give it a try. Thanks!

The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

snowe2010 commented 1 year ago

Seems to work if I use the image button to insert the image, but not if I copy/paste an image into the doc. Not sure if that worked before though 🤔

pOH7 commented 1 year ago

Can I use the system's pandoc if I've already installed it via Homebrew?

ahus1 commented 1 year ago

@snowe2010 - Pandoc is only used when using "Paste Formatted Text" in the toolbar, or when converting AsciiDoc content to DOCX.

Pasting of images with the "Past Image..." icon is a different functionality. I'll have another look that the shortcut of pasting a simple image doesn't trigger Pandoc.

So before I release this to the public: Does the download of Pandoc now work?

ahus1 commented 1 year ago

@pOH7 - no, the plugin will always download its own version, so that it is compatible with the CLI options and the functionality. So if you download the preview version listed in the previous comment, does it work for you?

ahus1 commented 1 year ago

@pOH7 / @snowe2010 - there is now pre-release 0.38.16 which fixes the functionality to paste an image with a keyboard shortcut. Please let me know if it works for you. If it works for you, I'll roll it out to the public. Thanks!

The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

pOH7 commented 1 year ago

@ahus1 Since pre-release versions 0.38.15 and 0.38.16, I have noticed that when I copy text from outside IntelliJ IDEA and paste it into the program, the paste action does not work and it causes the program take several seconds to response to every click. This makes IntelliJ IDEA unusable, and I have had to downgrade the plugin to version 0.38.12. As version 0.38.13 asks to download pandoc from a 404 address, which is another problem.

ahus1 commented 1 year ago

@pOH7 - at least the download problem should be gone in 0.38.15 and 0.38.16. Once you upgrade the AsciiDoc plugin version, a restart of the IDE is required to make the changes effective.

About the pasting: There are multiple ways to paste contents and one configuration that might impact it:

I hope this will allow me to reproduce the problem.

pOH7 commented 1 year ago

@ahus1 Thank you for your suggestions. After some testing, I found out that the problem with pasting was due to the "Enable conversion of clipboard text via Pandoc" option being enabled. Once I disabled this option, the issue was resolved.

To answer your other questions, I was copying content from both a browser and a Word processor and trying to paste it using various methods (keyboard shortcut, menu entry, and toolbar icon "Paste formatted text"). None of these methods worked until I used the "Paste as Plain Text" option.

Thank you for your help in resolving this issue.

ahus1 commented 1 year ago

The option is a preview option and I tried it myself for some time. Besides calling Pandoc on paste, I pastes AsciiDoc content when I wanted plain text more often than I actually want AsciIDoc content.

Let's see, maybe the option in the settings will eventually vanish.

ahus1 commented 1 year ago

Closing it, as I'm releasing 0.38.16 to the public today. Thank you for everyone providing input.

snowe2010 commented 1 year ago

Hey sorry for the delayed response! I was on a beach 😀 . Sounds like you made some awesome improvements! I'll check them out! Thank you so much for the awesome feature!