GithubHelp home page GithubHelp logo

Comments (10)

RyotaUshio avatar RyotaUshio commented on September 27, 2024 1

@programlich Hi, I will close this issue since the original problem has already been resolved and it's been a while since the last comment. But feel free to open a new issue if necessary. Thanks again for the reports!

from obsidian-pdf-plus.

RyotaUshio avatar RyotaUshio commented on September 27, 2024

@programlich
Just to confirm, when you say "hover editor opens a new window", do you mean this "No file is open" window pops up?

image

I still can't reproduce this in my environment (macOS & iOS). It might be a Windows-specific issue.

(One of my rough guesses is that the line break characters are doing something evil.)

Can you install the following main.js (put it under .obsidiain/plugins/pdf-plus and reload the app), and send a screen recording of the situation where the hover editor bug is happening, with the developer console open?

https://github.com/RyotaUshio/obsidian-pdf-plus/releases/tag/0.35.21-debug

You can open the dev console by ctrl+shift+I.

  • Please start by opening a single PDF file only and reloading the app
  • Then open the dev console and repeat copying a link (hopefully with several formats) with auto-focus enabled.

Thanks!

from obsidian-pdf-plus.

programlich avatar programlich commented on September 27, 2024

hey there,

thanks a lot for your effort and sorry for my late reply.

I would absolutely not be surprised if your feeling about the line break characters is right. Woudn´t be the first time, that Windows specific formats mess everything up^^. Sadly I am not free to choose my OS at work. Sorry for you having to fiddle around with Windows now.

Anyway, I did what you asked for and moved the debug main.js to the specified location and proceeded as specified by you. Sadly I cannot share a screencast with you, because its a buisness laptop (IT rules, etc.) but I took screenshots which I hope will also help.

I opened one single pdf and reloaded the obsidian app. Then I selected some text with auto focus and select text to copy mode turned on and the popup showed up, that you showed in your last post (No file is open). In this window I selected the desired md file and pasted the annotation. Here is how the console looked right after executing the pasting:
console_after_pasting

Then I selected some other text and again the same window (No file is open) popped up. Again I selected the desired md file and pasted the annotation. Heres the console after the second paste command. I think it´s exactly the same as after the first time as far as I can see:
console_after_pasting_no2

Let me know what kind of further information I can get to you.

from obsidian-pdf-plus.

RyotaUshio avatar RyotaUshio commented on September 27, 2024

@programlich Thank you, this helps me a lot!

Sorry for you having to fiddle around with Windows now.

No worries. Not having a Windows machine, I can't check this plugin's Windows compatibility without the help of Windows users. So I really appreciate your cooperation.

So from your screenshots, the line-ending characters indeed seem to be causing the problem.
I guess I was able to fix it; can you try updating PDF++ to 0.35.24?

from obsidian-pdf-plus.

programlich avatar programlich commented on September 27, 2024

Nice work, @RyotaUshio!
Selecting text with "auto focus" and "select text to copy" now works as expected. The first time the "No file is open" window pops up but the second time PDF++ correctly remembers the last pasted file and opens the hover editor correspondingly. Well done!

Here are a few things that I still noted when testing:

  • The hotkey for "Copy link to selection or annotation" and "Copy & auto-paste link to selection or annotation" do not seem to have an effect. In the top menu bar the corresponding note appears (e.g., link copied) but the hover editor does not open. When there is no last pasted file to find, the hover editor correctly opens the "No file is open" window. The next time the command gets executed without opening hover editor, even though "Copy & auto-paste link to selection or annotation" correctly pastes into the right file.
  • I tried getting the console output for you with the main_debug.js that you sent previously but there was no output to the console when running the commands. However in the console running obsidian with the regular PDF++ 0.35.24 I got this error message when starting obsidian. Maybe its related:
pdf-plus-console
  • Another minor issue that I noted is when I open a new file from the hover editor the cursor is set to the start of the opened md file. If it could be placed at the end it would be even more comfortable.

from obsidian-pdf-plus.

RyotaUshio avatar RyotaUshio commented on September 27, 2024

@programlich Glad it worked!

The hotkey for "Copy link to selection or annotation" and "Copy & auto-paste link to selection or annotation" do not seem to have an effect. In the top menu bar the corresponding note appears (e.g., link copied) but the hover editor does not open. When there is no last pasted file to find, the hover editor correctly opens the "No file is open" window. The next time the command gets executed without opening hover editor, even though "Copy & auto-paste link to selection or annotation" correctly pastes into the right file.

So you mean

  • when copying a PDF selection link for the first time and hence there is no specific markdown file to paste into, everything works as expected.
  • from the next time on,
    • using hotkeys won't open a hover editor
    • whereas "select to copy" properly opens the last pasted file in a hover editor window

right?

I have a few things to confirm:

  1. Is the behavior observed also in the sandbox vault where only PDF++ and Hover Editor are enabled?
  2. Does this problem also happen when you set the "how to open target markdown file when not opened" option to values other than Hover Editor, e.g. split right or right sidebar?
  3. When the same option is set to Hover Editor, the command "PDF++: Create new note for auto-focus or auto-paste" is expected to open a newly created note in a hover editor window. Does it work as expected?
image

Another minor issue that I noted is when I open a new file from the hover editor the cursor is set to the start of the opened md file. If it could be placed at the end it would be even more comfortable.

This would be a nice addition. I will consider adding this in a future release.

from obsidian-pdf-plus.

RyotaUshio avatar RyotaUshio commented on September 27, 2024

Sorry, I just recalled that I have a very old Windows 10 machine, and I turned it on for the first time in these 2 years or so.
I installed Obsidian v1.5.8, PDF++, and Hover Editor. And then it turned out PDF++ & Hover Editor works without any problems. So I guess this is not Windows-specific.

from obsidian-pdf-plus.

programlich avatar programlich commented on September 27, 2024

when copying a PDF selection link for the first time and hence there is no specific markdown file to paste into, everything works as expected. from the next time on, using hotkeys won't open a hover editor whereas "select to copy" properly opens the last pasted file in a hover editor window

Yes, thats exactly the behavior, I observe.

Does this problem also happen when you set the "how to open target markdown file when not opened" option to values other than Hover Editor, e.g. split right or right sidebar?

No, in this case everything works as expected, including the hotkey shortcuts for auto copy and focus/paste.

When the same option is set to Hover Editor, the command "PDF++: Create new note for auto-focus or auto-paste" is expected to open a newly created note in a hover editor window. Does it work as expected?

Yes, this works as expected

And then it turned out PDF++ & Hover Editor works without any problems. So I guess this is not Windows-specific.

Hmm, thats strange. However as I am totally fine with the current status of the plugin, I guess it´s not too important to dig further into this. I will try out the plugin on another machine and report back. Does that sound good to you?

from obsidian-pdf-plus.

RyotaUshio avatar RyotaUshio commented on September 27, 2024

I will try out the plugin on another machine and report back. Does that sound good to you?

Thanks, let's go with it if you're okay with it.

from obsidian-pdf-plus.

programlich avatar programlich commented on September 27, 2024

hey, thats totally fine for me. If anything pops up on my side regarding this issue again, I will let you know

from obsidian-pdf-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.