Zettlr: [BUG] Note doesn't open in the editor when Zettlr was not running

Created on 23 May 2020  Â·  13Comments  Â·  Source: Zettlr/Zettlr

Description

Using "open with ..." action in the mac context menu results in file appearing in "Files" section in the sidebar, but the editor window is empty, "no open files"

This behaviour I observed only for notes not contained in already opened folder in Zettlr.

Reproducing

Expected behaviour

Editor window should show the content of the note instead of being empty

Screenshots

Platform

Additional information

bug [non-critical] confirmed v1.7.x

All 13 comments

@nathanlesage This is quite critical behaviour ...

  1. Set Zettlr as default editor for markdown
  2. Close Zettlr
  3. Open any markdown file

Behaviour

Zettlr will start but without this specific file opened as a tab
Only when Zettlr is already opened, the file will open aa a New Tab

Expected behaviour
The markdown file will open in the editor

I thiiiiiink (?) I fixed it, just check this in the next beta (comes tomorrow after an extensive and long breakfast)

This is unfortunately still the case that this doesn't work in latet 1.7beta9

In Zettlr 1.6 this feature works

In Zettlr 1.6 this feature works

What? o.O Umm … wait a moment … well, I added a log entry as soon as files are being added both by opening the first Zettlr instance and the second — would you mind checking the logs? And you're using macOS, right? Because here for me it worked (and I assume that this means at least on macOS it should work on all systems)

When I open first instance everything seems normal

[13:32:59]  Config provider booting up ...
[13:32:59]  Appearance provider booting up ...
[13:32:59]  Watchdog provider booting up ...
[13:32:59]  Citeproc provider booting up ...
[13:32:59]  Dictionary provider booting up ...
[13:32:59]  Recent documents provider booting up ...
[13:32:59]  Tag provider booting up ...
[13:32:59]  Target provider booting up
[13:32:59]  CSS provider booting up ...
[13:32:59]  Translation provider booting up ...
[13:32:59]  FSAL booting up ...
[13:33:02]  Loaded all roots in 2.698 seconds
[13:33:02]  The translation string was malformed: Open Logs!
[13:33:02]  <<< IPC OUT: file-open
[13:33:03]  >>> IPC IN: get-custom-css-path
[13:33:03]  >>> IPC IN: get-tags
[13:33:03]  Trying to run command through Application: get-tags
[13:33:03]  No command registered with the application for command get-tags
[13:33:03]  <<< IPC OUT: set-tags
[13:33:03]  >>> IPC IN: get-tags-database
[13:33:03]  Trying to run command through Application: get-tags-database
[13:33:03]  No command registered with the application for command get-tags-database
[13:33:03]  <<< IPC OUT: tags-database
[13:33:03]  >>> IPC IN: get-paths
[13:33:03]  Trying to run command through Application: get-paths
[13:33:03]  No command registered with the application for command get-paths
[13:33:03]  <<< IPC OUT: paths-update
[13:33:03]  <<< IPC OUT: dir-set-current
[13:33:03]  >>> IPC IN: citeproc-get-ids
[13:33:03]  Trying to run command through Application: citeproc-get-ids
[13:33:03]  No command registered with the application for command citeproc-get-ids
[13:33:03]  <<< IPC OUT: citeproc-ids
[13:33:03]  >>> IPC IN: update-check
[13:33:03]  Trying to run command through Application: update-check
[13:33:04]  <<< IPC OUT: notify
[13:33:04]  <<< IPC OUT: invalidate-dict
[13:33:04]  <<< IPC OUT: invalidate-dict

and the [13:33:02] <<< IPC OUT: file-open has the content of the right file
(but the file doesnt open)

When I open second file

[13:43:31]  <<< IPC OUT: dir-set-current
[13:43:31]  <<< IPC OUT: file-open
[13:43:31]  >>> IPC IN: set-active-file
[13:43:31]  Trying to run command through Application: set-active-file
[13:43:31]  No command registered with the application for command set-active-file

TLDR;>>> IPC IN: set-active-filenot appear when first instance is started

and the [13:33:02] <<< IPC OUT: file-open has the content of the right file
(but the file doesnt open)

This sounds as if the renderer is too slow to open the file in time … hmm, I'll have a look

Still doesn't open in the beta10

Alright, the big problem I had was, and which led to me not understanding what was going wrong, was simple:

Zettlr ALWAYS successfully loaded the files into the FSAL (hence it was "open" to me in the file tree), but not opened it in the form of actually opening up a tab. But now that's done.

So it was not a bug that the file was not loaded but an enhancement request to also OPEN the respective files in tabs :D

So much for communication 🎆 But now it works!

I could confirm that now it works!

Not happy to writing again in this thread :P

  1. Open Note1 in Zettlr
  2. Close Zettlr
  3. Open file Note2 from File Manager
  4. Note2 will open as tab, but the Editor will be centred on Note1

Expected behaviour:
Editor Pane will be centred on Note2

MacOS Catalina 10.15.5
Zettlr 1.7beta13

Yeah, I know. What's worse is the app will actually open up the files pretty much in a random order (random being: They'll be requested in the right order, but depending on size they'll load in a different order, and the editor currently will always activate the last thing to open). All we need is there (the app actually keeps track of the correct active file), but due to the massive changes I made I didn't want to risk breaking this thing. For now it's a minor nuisance, and you are well right that this needs fixing — so please don't tell anyone for 1.7, and then we'll quietly ship that in 1.7.1, okay? 🤫

Was this page helpful?
0 / 5 - 0 ratings